mys-lang / mys

The Mys programming language - an attempt to create a statically typed Python-like language that produces fast binaries. See https://mys-lang.org for more information.
Other
132 stars 5 forks source link

Pattern Matching invalid syntax #10

Closed phillvancejr closed 3 years ago

phillvancejr commented 3 years ago

Does pattern matching work currently? I'm copying the pattern matching example but getting an invalid syntax error.

eerimoq commented 3 years ago

No it does not. Not much work at the moment to be honest, just as the important message in the readme says. Pattern matching is implemented on branch in the CPython project. It will be part of Python 3.10 as I understand it, which is released late next year. Mys could of course use the parser implementation from the branch, but right now it's not prioritized.

You can have a look here if you want to know more about pattern matching in Python.

phillvancejr commented 3 years ago

Thanks! Also I was able to compile the transpiled Mys code to Webassembly as an interesting aside :D