MCPcopy Index your code
hub / github.com/jquery/esprima / isLexicalDeclaration

Method isLexicalDeclaration

src/parser.ts:1873–1884  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1871 }
1872
1873 isLexicalDeclaration(): boolean {
1874 const state = this.scanner.saveState();
1875 this.scanner.scanComments();
1876 const next = this.scanner.lex();
1877 this.scanner.restoreState(state);
1878
1879 return (next.type === Token.Identifier) ||
1880 (next.type === Token.Punctuator && next.value === '[') ||
1881 (next.type === Token.Punctuator && next.value === '{') ||
1882 (next.type === Token.Keyword && next.value === 'let') ||
1883 (next.type === Token.Keyword && next.value === 'yield');
1884 }
1885
1886 parseLexicalDeclaration(options): Node.VariableDeclaration {
1887 const node = this.createNode();

Callers 1

Calls 4

saveStateMethod · 0.80
scanCommentsMethod · 0.80
lexMethod · 0.80
restoreStateMethod · 0.80

Tested by

no test coverage detected