Currently, the saccharine language does not support comments of any type. This prevents proper documentation of code, among other things.
Proposed Solution
Add '#' comment syntax. This should operate just like in Python, or any other language that supports it.
# A comment can take up a whole line. This code '(\x.x y)' is not processed.
fn x := x # Everything after that '#' is not processed either.
Acceptance Criteria
Update the Tokenizer to identify a '#'.
On seeing a '#', ignore all characters until the next newline, or until EOF.
Add a new test to tests/ that incorporates comments in various ways. Make sure this new test passes.
## Context
Currently, the `saccharine` language does not support comments of any type. This prevents proper documentation of code, among other things.
## Proposed Solution
Add '#' comment syntax. This should operate just like in Python, or any other language that supports it.
```txt
# A comment can take up a whole line. This code '(\x.x y)' is not processed.
fn x := x # Everything after that '#' is not processed either.
```
## Acceptance Criteria
- Update the Tokenizer to identify a '#'.
- On seeing a '#', ignore all characters until the next newline, or until EOF.
- Add a new test to `tests/` that incorporates comments in various ways. Make sure this new test passes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
Currently, the
saccharinelanguage does not support comments of any type. This prevents proper documentation of code, among other things.Proposed Solution
Add '#' comment syntax. This should operate just like in Python, or any other language that supports it.
Acceptance Criteria
tests/that incorporates comments in various ways. Make sure this new test passes.