yberreby / rgo

[STALLED] A Go compiler, written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Finish implementing the lexer

yberreby opened this issue · comments

Remaining work:

  • rune literals
  • floating-point literals
  • imaginary literals
  • hexadecimal integer literals
  • octal integer literals
  • adding back unit tests - they were removed at some point because of breaking changes
commented

When should strings be actually interpreted?

I think it's better to interpret strings during parsing. Here's the relevant section of the parser.

Oh, and thank you very much for your contributions :)

I fear you may have introduced an infinite loop, though, because the integration tests are hanging indefinitely since your change.

commented

Oh, I found the problem!

I think it might be a good idea to use GitHub PRs instead of pushing directly to master for non-trivial changes, so that this kind of change stands out and can be discussed in the GitHub UI.

commented

Yup, I will next time.

commented

So what needs to be done for interpreted strings in the lexer?

Well... nothing at all, it seems. It's in the parser that they must be interpreted so my checklist item was wrong.

commented

Didn't you just say that should be done in the parser?

Yes I did, I accidentally hit "comment" before realizing that belonged to the parser. Reload to see my edit, and sorry.