Parser

The TypeScript parser uses the scanner to traverse our source code files and transform them into a stream of tokens.

The TypeScript parser then transforms the stream of tokens into a tree-like data structure known as an abstract syntax tree (AST). Each of the elements in this tree-like data structure is known as a node. A node is the basic building block of the AST.

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.