PleaseLangAST~Word(token)

A class representing a word

new Word(token)

The constructor
Parameters:
Name Type Description
token object A single token of type word

Methods

evaluate(scope) → {*}

Evaluate the node
Parameters:
Name Type Description
scope object The scope in which the node will be evaluated
Returns:
* - The result of the evaluation

getName() → {string}

Getter
Returns:
string - The inner value of the word

isKeyword(keywords) → {boolean}

Checks if the word is a keyword
Parameters:
Name Type Description
keywords object The set of keywords
Returns:
boolean - Whether this instance is a keyword or not