savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
155 stars 12 forks source link

Allow `_` in numbers #373

Closed mneumann closed 1 year ago

mneumann commented 1 year ago

Related issues: #370

jemc commented 1 year ago

Where is the appropriate place to add test cases for this?

Technically we could add them in spec/parser_spec.cr (as a unit test for the parsing part of the compiler).

But for something like this I think it's better to add an end-to-end test for the language - inside the language specs in spec/language/semantics.

mneumann commented 1 year ago

@jemc Do you have any kind of "parse fail" tests, where you have Savi programs that should parse and others that should fail with a parser warning?

jemc commented 1 year ago

We currently don't have any kind of concept of a "warning" in the compiler, and I want to avoid those kinds of things until we have a proper linting system in place.

For parse error tests, search for "complains" in spec/parser_spec.cr for some examples of those.