Skip to content

Conversation

jakesylvestre
Copy link

No description provided.

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 '!'.

for (var rules = this._currentRules(), i = 0; i < rules.length; i++) if ((tempMatch = this._input.match(this.rules[rules[i]])) && (!match || tempMatch[0].length > match[0].length)) {
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.

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