- ignoreStack
outputs some debug information on current token
Kind: global class
Properties
Name | Type | Description |
---|---|---|
lexer | Lexer |
current lexer instance |
ast | AST |
the AST factory instance |
token | Integer | String |
current token |
extractDoc | Boolean |
should extract documentation as AST node |
extractTokens | Boolean |
should extract each token |
suppressErrors | Boolean |
should ignore parsing errors and continue |
debug | Boolean |
should output debug informations |
- parser
- .getTokenName()
- .parse()
- .raiseError()
- .error()
- .node()
- .expectEndOfStatement() ⇒
boolean
- .expect(token) ⇒
boolean
- .text() ⇒
String
- .next()
- .lex()
- .is()
helper : gets a token name
Kind: instance method of parser
main entry point : converts a source code to AST
Kind: instance method of parser
Raise an error
Kind: instance method of parser
handling errors
Kind: instance method of parser
Creates a new AST node
Kind: instance method of parser
expects an end of statement or end of file
Kind: instance method of parser
Force the parser to check the current token.
If the current token does not match to expected token, the an error will be raised.
If the suppressError mode is activated, then the error will
be added to the program error stack and this function will return false
.
Kind: instance method of parser
Throws:
- Error
Param | Type |
---|---|
token | String | Number |
Returns the current token contents
Kind: instance method of parser
consume the next token
Kind: instance method of parser
Eating a token
Kind: instance method of parser
Check if token is of specified type
stance method of parser
- oreStack">
- ignoreStack
outputs some debug information on current token
ck debug information on current token