Skip to content

Latest commit

 

History

History
81 lines (45 loc) · 2.18 KB

File metadata and controls

81 lines (45 loc) · 2.18 KB

⬅️ README

ts-parser-from-scratch

TypeScript implementation of: Building a Parser from scratch

Commands

Setup

npm i

Single execution

to check the output at the terminal

Lexer

npm run lexer

Parser

npm run parser

Development

start the vitest environment

npm start

or

npm run test

Documentation

Token

  • Token.ts - defines the token data structure and the token identification rules (specs, which uses regexp)

Lexer

Parser

  • AST.ts - define the AST nodes and its factory helpers

  • Parser.ts - from a given source, produces the AST

References