We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This snippet:
( foo, bar ) = 42
Returns a Prism::ParseError, unexpected write target error with Prism (though the AST seems to be parsed properly):
Prism::ParseError
#<Prism::ParseResult:0x0000000104abb1e8 @comments=[], @data_loc=nil, @errors= [#<Prism::ParseError @message="unexpected write target" @location=#<Prism::Location @start_offset=2 @length=8 start_line=2>>], @magic_comments=[], @source=#<Prism::Source:0x00000001018e15c8 @offsets=[0, 2, 7, 11], @source="(\nfoo,\nbar\n)=42", @start_line=1>, @value= @ ProgramNode (location: (1,0)-(4,4)) ├── locals: [:foo, :bar] └── statements: @ StatementsNode (location: (1,0)-(4,4)) └── body: (length: 1) └── @ MultiWriteNode (location: (1,0)-(4,4)) ├── lefts: (length: 2) │ ├── @ LocalVariableTargetNode (location: (2,0)-(2,3)) │ │ ├── name: :foo │ │ └── depth: 0 │ └── @ LocalVariableTargetNode (location: (3,0)-(3,3)) │ ├── name: :bar │ └── depth: 0 ├── rest: ∅ ├── rights: (length: 0) ├── lparen_loc: (1,0)-(1,1) = "(" ├── rparen_loc: (4,0)-(4,1) = ")" ├── operator_loc: (4,1)-(4,2) = "=" └── value: @ IntegerNode (location: (4,2)-(4,4)) └── flags: decimal, @warnings=[]>
The same code seems to execute normally with Ruby:
$ ruby snippet.rb 42
The text was updated successfully, but these errors were encountered:
I can't seem to reproduce this. Is this in 0.25.0?
Sorry, something went wrong.
I think this is what you ran: Prism.parse("(\nfoo,\nbar\n)=42"). It does not appear to be broken on main. I'll close as fixed.
Prism.parse("(\nfoo,\nbar\n)=42")
main
Indeed it's not happening on 0.25, my bad 👍
No branches or pull requests
This snippet:
Returns a
Prism::ParseError
, unexpected write target error with Prism (though the AST seems to be parsed properly):The same code seems to execute normally with Ruby:
The text was updated successfully, but these errors were encountered: