Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Parser

Hierarchy

  • Parser

Index

Constructors

constructor

  • new Parser(tokens: Token[], file?: string): Parser

Properties

Private current

current: number = 0

Private file

file: string

Private tokens

tokens: Token[]

Methods

Private advance

  • advance(): Token

Private check

  • check(type: TokenType): boolean

Private comparison

  • This is part of a custom implementation of the binary operation. This function is tasked with comparison

    comparison = term (('>' | '>=' | '<' | '<=') term)*;

    Returns IExpr

Private componentStmt

Private consume

  • consume(token: TokenType, message: string): Token

Private declaration

Private destructure

Private doubleCheck

  • doubleCheck(type: TokenType): boolean

Private doublePeek

  • doublePeek(): Token

Private equality

  • This is part of a custom implementation of the binary operation. This function is tasked with equality

    equality = comparison (('!=' | '==') comparison)*;

    Returns IExpr

Private error

  • error(token: Token, message: string): void

Private exportDecl

Private expression

Private factor

  • This is part of a custom implementation of the binary operation. This function is tasked with factors

    factor = unary (('/' | '') unary);

    Returns IExpr

Private forStmt

Private ifStmt

Private importStmt

  • importStmt = '(' 'import' ((('(' destructure ')') | 'everything') 'from')? STRING ')'

    Returns IStmt

Private isAtEnd

  • isAtEnd(): boolean

Private match

  • match(...types: TokenType[]): boolean

Private memlProps

Private memlStmt

parse

Private peek

  • peek(): Token

Private previous

  • previous(): Token

Private primary

Private statement

Private synchronize

  • synchronize(): void

Private term

  • This is part of a custom implementation of the binary operation. This function is tasked with terms

    term = factor (('-' | '+') factor)*;

    Returns IExpr

Private unary

Generated using TypeDoc