You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SyntaxError: match expression is not implemented yet at line 1 column 1 #4770
I'm trying to run awesome python-powered xonsh shell using RustPython.
I removed all import ctype because it is not implemented yet (#1217).
But after this I'm facing with this error:
...
File"/Users/usr/.local/lib/rustpython3.11/site-packages/xonsh/execer.py", line9, in<module>fromxonsh.parserimportParserSyntaxError: matchexpressionisnotimplementedyetatline1column1"""Implements the xonsh parser."""^
What is "match expression" in this case?
Any plans to implement this?
Many thanks!
This most likely refers to the syntax introduced in PEP 634.
(Maintainers, correct me if I'm wrong on this.) I think RustPython's parser can parse match statements (likely thanks to the work of Ruff contributors), but RustPython's VM doesn't know what to do with them. RustPython doesn't know how to transform that into bytecode.
Is this something you're interested in working on?
What @fanninpm said. match is currently supported until the AST step of the pipeline. The generation into bytecode and then the evaluation of said bytecode is to be added.
Activity
fanninpm commentedon Mar 25, 2023
This most likely refers to the syntax introduced in PEP 634.
(Maintainers, correct me if I'm wrong on this.) I think RustPython's parser can parse
matchstatements (likely thanks to the work of Ruff contributors), butRustPython's VM doesn't know what to do with them.RustPython doesn't know how to transform that into bytecode.Is this something you're interested in working on?
anki-code commentedon Mar 25, 2023
Because I'm not Rust developer I tend to change xonsh code first if you advice how to have workaround. Or I'll wait for support this.
DimitrisJim commentedon Mar 25, 2023
What @fanninpm said.
matchis currently supported until the AST step of the pipeline. The generation into bytecode and then the evaluation of said bytecode is to be added.