Skip to content

SyntaxError: match expression is not implemented yet at line 1 column 1 #4770

Closed

Description

@anki-code

Hello! Thank you for this incredible initiative!

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", line 9, in <module>
    from xonsh.parser import Parser
SyntaxError: match expression is not implemented yet at line 1 column 1
"""Implements the xonsh parser."""
^

What is "match expression" in this case?
Any plans to implement this?
Many thanks!

Activity

  1. added
    C-bugSomething isn't working
    C-compatA discrepancy between RustPython and CPython
    on Mar 25, 2023
  2. fanninpm commented on Mar 25, 2023

    @fanninpm
    Contributor

    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?

  3. anki-code commented on Mar 25, 2023

    @anki-code
    Author

    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.

  4. DimitrisJim commented on Mar 25, 2023

    @DimitrisJim
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compilerArea: compilerA-vmArea: virtual machineC-bugSomething isn't workingC-compatA discrepancy between RustPython and CPython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions