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 | 1x 1x 1x 1x 71868x 71868x 71865x 71865x 3x 3x | import {AbstractToken} from "../1_lexer/tokens/abstract_token";
import {SyntaxInput, syntaxIssue} from "./_syntax_input";
/** "me" is the self reference in classes, it cannot be declared as a parameter, attribute or variable */
export function checkReservedName(token: AbstractToken | undefined, input: SyntaxInput): void {
if (token === undefined || token.getStr().toLowerCase() !== "me" || input.scope.isAnyOO() === false) {
return;
}
input.issues.push(syntaxIssue(input, token, "\"me\" is a reserved name, it cannot be declared"));
}
|