Open GreasySlug opened 1 year ago
The following collections allow elements to be declared by using whitespace Different error occurs instead of error due to delimitation
But these are syntax error
[1 2 3] (1 2 3) {"a": 1 "b": 2 "c": 3} {1 2 3} {name = "John" age = 21}
syntax error needs comma or semicolon
Error[#0000]: File <stdin>, line 1, 1 | [1 2 3] : - SyntaxError: invalid syntax >>> (1 2 3) Error[#0000]: File <stdin>, line 1, 1 | (1 2 3) : - SyntaxError: invalid syntax >>> {"a": 1 "b": 2} Error[#3374]: File <stdin>, line 1, 1 | {"a": 1 "b": 2} : - SyntaxError: invalid syntax Error[#0000]: File <stdin>, line 1, 1 | {"a": 1 "b": 2} : - SyntaxError: invalid syntax >>> {name = "John" age = 21} Record(name='John', age=21)
When I look at how it is parsed using cargo dprs, we see that each syntax is parsed differently, and a patch is needed for each of them.
cargo dprs
Erg 0.6.0-beta.3
python3.10.8
Windows 10
Describe the bug?
The following collections allow elements to be declared by using whitespaceDifferent error occurs instead of error due to delimitationBut these are syntax error
Reproducible code
[1 2 3] (1 2 3) {"a": 1 "b": 2 "c": 3} {1 2 3} {name = "John" age = 21}
Expected result
syntax error needs comma or semicolon
Actual result
Additional context
When I look at how it is parsed using
cargo dprs
, we see that each syntax is parsed differently, and a patch is needed for each of them.Erg version
Erg 0.6.0-beta.3
Python version
python3.10.8
OS
Windows 10