Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/novara754/argon
A small (upcoming) compiler written in C++.
https://github.com/novara754/argon
Last synced: 30 days ago
JSON representation
A small (upcoming) compiler written in C++.
- Host: GitHub
- URL: https://github.com/novara754/argon
- Owner: novara754
- License: mit
- Created: 2019-10-12T21:39:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-27T13:55:06.000Z (about 5 years ago)
- Last Synced: 2024-10-14T22:14:27.757Z (2 months ago)
- Language: C++
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Argon
A small compiler (interpreter at the moment) written in C++.
## Examples
```
> 1 + 2 * 3.
7
> (1 + 2) * 3.
9
> true and false.
false.
> false or true.
true
> big_num <- 1_234_567.
1234567
> bigger_num <- 2352569206923602.
ValueError: 2352569206923602 is not a valid integer.
> true or 2.
TypeError: Unknown operator 'or' for operands Boolean and Integer.
> 1 <= 2.
true
> 1 > 0 or 2 > 3.
true
> x <- 123, y <- 2.
2
> x * y.
246
> x > 300.
false
> f <- \\() -> 123 end.
\#fun
> x().
123
> g <- true, g().
ValueError: Not a function.
```## License
Licensed under the [MIT License](LICENSE.md).