-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
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
Use pattern matching internally #15
Comments
Trying to pattern match on AST nodes causes the pattern matcher to barf because they don't have normal |
I just pushed a small change which makes positional matching as needed using generators. This should fix things. |
and...tests |
This: with switch(tree):
if Str(s=s):
return q%Parser.Raw(ast%tree), stop
TypeError: <slot wrapper '__init__' of '_ast.AST' objects> is not a Python function Is still blowing up on me. Do you want to try refactoring our macros to use pattern matching? I feel like you'll have a better shot at getting stuff working, since I suspect it will require substantial fixes to the pattern matcher to get it to work. |
ok. yeah ugh that's annoying. |
A lot of our transformers could use pattern matching. It would make our code nicer.
The text was updated successfully, but these errors were encountered: