Parser

class Parser(tokens: Array<Token>)

Generates an Abstract Syntax Tree (AST) from a list of tokens. The tokens can be generated from a string input by an instance of Lexer

Parameters

tokens

A list of token objects to be parsed into an AST

Constructors

Link copied to clipboard
fun Parser(tokens: Array<Token>)

Functions

Link copied to clipboard
fun parseTree(): Block

Parse the tokens into an AST