Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse ?. syntax ( Optional Chaining operator ) #35

Open
doggy8088 opened this issue Dec 5, 2023 · 0 comments
Open

Unable to parse ?. syntax ( Optional Chaining operator ) #35

doggy8088 opened this issue Dec 5, 2023 · 0 comments

Comments

@doggy8088
Copy link

doggy8088 commented Dec 5, 2023

This package seems unable to parse ?. syntax ( Optional Chaining operator )

Source:

ne?.()

Result:

C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1850
        throw this.createUnexpected(this.lookahead);
        ^

JsError: [1:4]: Unexpected token "."
    at GenericParser.createError (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\tokenizer.js:275:12)
    at GenericParser.createUnexpected (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\tokenizer.js:259:21)
    at GenericParser.parsePrimaryExpression (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1850:20)
    at GenericParser.parseLeftHandSideExpression (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1626:19)
    at GenericParser.parseUpdateExpression (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1515:24)
    at GenericParser.parseUnaryExpression (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1488:19)
    at GenericParser.parseExponentiationExpression (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1459:21)
    at GenericParser.parseBinaryExpression (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1409:21)
    at GenericParser.parseConditionalExpression (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1360:21)
    at GenericParser.parseAssignmentExpressionOrTarget (C:\Users\user\AppData\Local\npm-cache\_npx\3420e95e0b1ebc36\node_modules\shift-parser\src\parser.js:1154:21) {
  index: 3,
  line: 1,
  column: 4,
  parseErrorLine: 1,
  parseErrorColumn: 4,
  description: 'Unexpected token "."'
}

Node.js v18.16.0
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

No branches or pull requests

1 participant