mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-05-29 15:44:31 +00:00
Added tests for tokens
This commit is contained in:
@@ -20,6 +20,9 @@ program = esprima.parseScript('"use strict"; with (x) {}', { tolerant: true });
|
||||
program = esprima.parseScript('answer = 42', { range: true });
|
||||
program = esprima.parseScript('answer = 42', { range: true });
|
||||
program = esprima.parseScript('const answer = 42', { tokens: true });
|
||||
if (program.tokens) {
|
||||
token = program.tokens[0];
|
||||
}
|
||||
program = esprima.parseScript('answer = 42 // TODO: why', { comment: true });
|
||||
program = esprima.parseScript('answer = 42 // TODO: why', { comment: true, range: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user