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
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/repl/lib/tokenizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function tokenizer( line, context ) {
*/
function onToken( token ) {
// Ignore placeholders & EOF tokens:
if ( token.start === token.end ) {
if ( token.start >= token.end ) {
return;
}
if ( token.type.isLoop || isControlKeyword( token.type.keyword ) || ( token.type.label === 'name' && isUnrecognizedControlKeyword( token.value ) ) ) {
Expand Down Expand Up @@ -196,7 +196,7 @@ function tokenizer( line, context ) {
var i;

// Ignore placeholder nodes:
if ( node.start === node.end ) {
if ( node.start >= node.end ) {
return true;
}
// Ignore node if it is an unrecognized `keyword`:
Expand Down Expand Up @@ -275,7 +275,7 @@ function tokenizer( line, context ) {
var obj;

// Ignore placeholder nodes:
if ( node.start === node.end ) {
if ( node.start >= node.end ) {
return;
}

Expand Down Expand Up @@ -308,7 +308,7 @@ function tokenizer( line, context ) {
property = properties.next();
while ( !property.done ) {
// Ignore placeholder nodes:
if ( property.value.start === property.value.end ) {
if ( property.value.start >= property.value.end ) {
return;
}
// Case: 'bar' in `foo['bar']` - property already pushed as a string token. Ignore...
Expand Down