Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 29x | /**
* Symbol template
* Will be used by our symbol class as template for new symbols/infix/prefix
*
*/
export class SymbolTemplate {
/**
* nud = null denotation
* A nud does not care about the tokens to the left. A led does
* A nud method is used by values (such as variables and literals) and by prefix operators
*
*/
public nud() {
console.error('Undefined.');
}
/**
* led = left denotation
* A led t care about the tokens to the left. A nud does not
* A led method is used by infix operators and suffix operators
*
*/
public led() {
console.error('Missing operator.');
}
/**
* note
* A token may have both a nud method and a led method.
* For example, - might be both a prefix operator (negation) and an infix operator (subtraction), so it would have both nud and led methods
*
*/
}
|