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

Implement compound arithmetic operators #30

Open
8 tasks
LefterisJP opened this issue Feb 14, 2017 · 0 comments
Open
8 tasks

Implement compound arithmetic operators #30

LefterisJP opened this issue Feb 14, 2017 · 0 comments

Comments

@LefterisJP
Copy link
Contributor

Compound arithmetic operators (+=, -=, *=, /=) are missing from the language at the moment.

This is an issue to track the implementation of their addition to the language.
TODO:

  • Add the appropriate lexer tokens to the lexer.
  • Test scanning of those tokens in the lexer.
  • Add them to the parsing stage during the AST generation
  • Test the parsing and AST generation of compound operators.
  • Do the same typechecking their non-compound binary operator equivalent does.
  • Make tests for the above.
  • Generate RIR and backend code for the compound operators in the same way the arithmetic
    binary operators do.
  • Add end to end backend tests

Note: This issue requires a lot of work, but is quite easy to do since the logic already exists throughout the code for the arithmetic operators. So implementation is just looking at what already exists and duplicating it with some modification.

For that reason it could be a nice deep-dive introduction to the codebase for someone who wants to learn how refu works.

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

No branches or pull requests

1 participant