Options
All
  • Public
  • Public/Protected
  • All
Menu

Parser class that converts tokens into a abstract syntax three

Hierarchy

  • Parser

Index

Constructors

constructor

Properties

Private _ast

_ast: Array<ASTNode> = []

Private abstract syntax three

Private _semantic

_semantic: Array<SemanticAST> = []

Private contextual (semantic) syntax three

Private _tokens

_tokens: Array<Array<TokenContext>> = []

Private tokens array with token context

Accessors

ast

semantic

tokens

Methods

Private context

  • context(): void

Private generate

  • generate(): void

hasValue

  • hasValue(token: Token): boolean

isAnnotation

  • isAnnotation(token: Token): boolean

isKeyword

  • isKeyword(token: Token): boolean

isSeperate

  • isSeperate(token: Token): boolean

Private keywordTargetOptionals

  • keywordTargetOptionals(token: Token): Array<Token>

Private keywordValuesAnnotations

  • keywordValuesAnnotations(statement: Array<TokenContext>, startIndex: number): [Node, number]
  • Function that takes a statement array and an index to start looking for tokens with values and attach them with annotations if possible. Returns a node for the new keyword + values with annotations and the index it finished on so the main process can continue from there.

    Parameters

    • statement: Array<TokenContext>

      Array of TokenContext that forms a statement

    • startIndex: number

      Index to start looking for values + annotations

    Returns [Node, number]

Private keywordValuesOptionals

  • keywordValuesOptionals(token: Token): Array<Token>

Generated using TypeDoc