Skip to content

Conversation

jakesylvestre
Copy link

No description provided.

@@ -647,7 +644,7 @@ var parser = function() {
}
if (!this.options.flex) break;
}
return match ? (token = this.test_match(match, rules[index]), token !== !1 && token) : "" === this._input ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
return match ? !1 !== (token = this.test_match(match, rules[index])) && token : "" === this._input ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confusing use of '!'.

if (match = tempMatch, index = i, this.options.backtrack_lexer) {
if (token = this.test_match(tempMatch, rules[i]), token !== !1) return token;
if (!1 !== (token = this.test_match(tempMatch, rules[i]))) return token;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confusing use of '!'.

var errStr = "";
expected = [];
for (p in table[state]) this.terminals_[p] && p > TERROR && expected.push("'" + this.terminals_[p] + "'");
for (p in table[state]) this.terminals_[p] && p > 2 && expected.push("'" + this.terminals_[p] + "'");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected an assignment or function call and instead saw an expression.

yy: {}
};
for (var k in this.yy) Object.prototype.hasOwnProperty.call(this.yy, k) && (sharedState.yy[k] = this.yy[k]);
lexer.setInput(input, sharedState.yy), sharedState.yy.lexer = lexer, sharedState.yy.parser = this,
"undefined" == typeof lexer.yylloc && (lexer.yylloc = {});
void 0 === lexer.yylloc && (lexer.yylloc = {});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected an assignment or function call and instead saw an expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants