You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Garrit Franke
06588aa272
Garrit Franke (74):
Initial commit
Add license
Add curly braces
Parse functions
Fix function parsing
Update math example
Refactor TokenType
Implement return statement
Fix keyword recognition
Fix test compilation
Fix tests and comments
Add variable declarations
Implement returning variables
Pretty print AST output
Add strings
Rename flex -> sabre
Fix example filename
Add parser tests
Add multiple functions test
Add token positions
Add token positions
Allow empty returns
Add x86 generator scaffolding
Generate assembly
Add JS generator
Fix warnings
Implement return generation
Refactor x86 generator
Print result of main for js target
Fix infinite loop when parsing strings
Add CI
Add function arguments
Add function arguments
Tokenize Comma
Fix return with expression
Remove uneeded compount statement
Add math operations
Fix parsing of complex compound expressions
Clean up expression parsing
Refactor function call parsing
Change function declaration syntax
Add greeter example
Add fib example
Add basic conditionals; remove semicolons
Allow multiple statements in if conditional
Add TODO file
Add js generator for variable declarations
Add remaining comparison operators
Add Readme
Add backend-state to README
Add CLI TODO
Add error reporting TODO
Fix typo
Add builds.sr.ht badge
Add basic CLI
Revert "Change function declaration syntax"
Fix production build
Fix examples
Fix readme
Fix compound op with identifier first
Fix fib example
Add conditional else if branch
Generalize block into own statement
Add else branch
Add copyright notices
Fix warnings
Add integer arrays
Clean up error handling
Refactor parser module structure
Fix warnings
Add docs
Add placeholder for documentation
docs: add placeholder for CLI
docs: add placeholders for developers
|
3 years ago |
.builds
|
Add CI
|
3 years ago |
.github/workflows
|
Fix run command
|
3 years ago |
docs
|
Add build_docs script
|
3 years ago |
examples
|
Add integer arrays
|
3 years ago |
src
|
Garrit Franke (74):
|
3 years ago |
.gitignore
|
Add docs
|
3 years ago |
Cargo.lock
|
Add basic CLI
|
3 years ago |
Cargo.toml
|
Add basic CLI
|
3 years ago |
LICENSE
|
Add license
|
3 years ago |
README.md
|
Fix readme
|
3 years ago |
TODO
|
Generalize block into own statement
|
3 years ago |
book.toml
|
Add docs
|
3 years ago |
build_docs.py
|
Garrit Franke (74):
|
3 years ago |
The Sabre Programming language
Sabre is a bullshit-free (©) programming language that gets out of your way.
It is meant to "just work", without adding unnecessary and bloated language features.
State of this projects
Basic algorithms like the fibonacci sequence should compile fine. More sophisticated programs will not work yet. See TODO for a roadmap.
The Sabre compiler emits JavaScript, until the language has matured sufficiently. Backends for WASM, C, x86 and ARM are planned.
Examples
// examples/fib.sb
fn main() {
let num = 10
return fib(num)
}
fn fib(n) {
if n <= 1 {
return n
}
return fib(n-1) + fib(n-2)
}
// -> 55
License
This software is licensed under the Apache-2.0 license.