Skip to content
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

make parser capable of treating AST instuctions as first-class symbols #3

Closed
hhefesto opened this issue Feb 3, 2020 · 0 comments
Closed

Comments

@hhefesto
Copy link
Contributor

hhefesto commented Feb 3, 2020

Original Issue: sfultong/stand-in-language#29

E.G. you should be able to pass AST instructions as arguments, like app (pair zero zero) left

so right now in a .sil file, we could have a line like
test = left {0,0}

left is a keyword, and the parser always expects it to be followed by an argument.

So if I wanted to use it in a function, I'd have to do something like
test = (\f -> f {0,0}) (\x -> left x)

I want to be able to do this instead:
test = (\f -> f {0,0}) left

So we can parse left as a regular function, but it should also generate the same grammar as before when parsing old syntax (e.g. left {0,0})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant