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 scopeobject 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 keywordsobject The set of keywords Returns:
boolean - Whether this instance is a keyword or not