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

REPL: Node 12.0.0 unable to parse class properties #27391

Closed
AlvaroBernalG opened this issue Apr 24, 2019 · 4 comments
Closed

REPL: Node 12.0.0 unable to parse class properties #27391

AlvaroBernalG opened this issue Apr 24, 2019 · 4 comments
Assignees
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem.

Comments

@AlvaroBernalG
Copy link

  • Version: v12.0.0
  • Platform: Darwin XX.z 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64

Screenshot 2019-04-24 at 19 50 35

Screenshot 2019-04-24 at 19 52 05

@devsnek
Copy link
Member

devsnek commented Apr 24, 2019

unfortunately we parse the repl input with acorn before actually running it, so its not a 1:1 match to what node actually supports.

I'm not entirely sure what to do about this.

@devsnek devsnek added the repl Issues and PRs related to the REPL subsystem. label Apr 24, 2019
@AlvaroBernalG
Copy link
Author

I will close the issue then. Thanks @devsnek.

@BridgeAR BridgeAR self-assigned this Apr 24, 2019
@BridgeAR BridgeAR added the confirmed-bug Issues with confirmed bugs. label Apr 24, 2019
@BridgeAR
Copy link
Member

I am working on a fix.

@BridgeAR BridgeAR reopened this Apr 24, 2019
@BridgeAR
Copy link
Member

image

BridgeAR added a commit to BridgeAR/node that referenced this issue Apr 30, 2019
This adds bigint, class-fields, numeric-separators, static-class
features, private class methods and fields as dependency. That way
it's possible to use these in combination with acorn to parse these
language features.

This also removes a couple of files that were not necessary for
Node.js to reduce the code base.

PR-URL: nodejs#27400
Refs: nodejs#27391
Refs: nodejs#25835
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this issue Apr 30, 2019
This adds new language features to acorn. Otherwise BigInt and other
input would not be parsed correct and would not result in nice error
messages when using simple assert.

PR-URL: nodejs#27400
Refs: nodejs#27391
Refs: nodejs#25835
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this issue Apr 30, 2019
This adds stage-3 language features to acorn so that it's possible
to parse these features when using top level await in the REPL.

PR-URL: nodejs#27400
Refs: nodejs#27391
Refs: nodejs#25835
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit that referenced this issue Apr 30, 2019
This adds bigint, class-fields, numeric-separators, static-class
features, private class methods and fields as dependency. That way
it's possible to use these in combination with acorn to parse these
language features.

This also removes a couple of files that were not necessary for
Node.js to reduce the code base.

PR-URL: #27400
Refs: #27391
Refs: #25835
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit that referenced this issue Apr 30, 2019
This adds new language features to acorn. Otherwise BigInt and other
input would not be parsed correct and would not result in nice error
messages when using simple assert.

PR-URL: #27400
Refs: #27391
Refs: #25835
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit that referenced this issue Apr 30, 2019
This adds stage-3 language features to acorn so that it's possible
to parse these features when using top level await in the REPL.

PR-URL: #27400
Refs: #27391
Refs: #25835
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit that referenced this issue Apr 30, 2019
This adds stage-3 language features to acorn so that the REPL is
able to parse these features properly. Otherwise these would cause
SyntaxErrors.

PR-URL: #27400
Fixes: #27391
Fixes: #25835
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
3 participants