PleaseLangCompiler~Lexer(source)

A lexer class that takes care of the lexical analysis

new Lexer(source)

The constructor of the lexer
Parameters:
Name Type Description
source string The source code of the program to analyze

Members

constant WHITE :RegExp

Methods

advanceToken()

A method that returns the next token of the source
Throws:
Will throw if there are invalid tokens

getLookAhead() → {Object}

A method that returns the actual token
Returns:
Object - The actual token

isEmpty() → {boolean}

A function to check if there are more tokens in the input
Returns:
boolean - Whether is it empty or not