Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions lib/node_modules/@stdlib/repl/lib/tokenizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,15 @@
var i;

// Parse the given line into tokens & comments...
ast = parse( line, {
'ecmaVersion': 'latest',
'onToken': onToken,
'onComment': onComment
});
try {
ast = parse( line, {
'ecmaVersion': 'latest',
'onToken': onToken,
'onComment': onComment
});
} catch ( error ) { // eslint-disable-line no-unused-vars
return tokens;
}

// Resolve variable declarations from the given line as tokens...
declarations = resolveLocalScopes( ast );
Expand Down Expand Up @@ -174,7 +178,7 @@
*/
function onComment( block, text, start, end ) {
if ( block ) {
// TODO: add support for highlighting multi-line comments.

Check warning on line 181 in lib/node_modules/@stdlib/repl/lib/tokenizer.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: add support for highlighting...'
return;
}
tokens.push({
Expand Down
Loading