Add readme and tweak spec

This commit is contained in:
Nikita Lisitsa 2026-03-22 13:00:41 +03:00
parent d363be0eef
commit 78e6a5c0ee
2 changed files with 20 additions and 7 deletions

13
readme.md Normal file
View file

@ -0,0 +1,13 @@
This is the repository of an experimental toy programming language.
It is a statically & strictly-typed, imperative, eager-evaluated, low-level language, that should be efficient, simple but effective to use, and allow seamless C FFI.
What is currently done:
* Part of the base specification (see spec.txt)
* Bison-generated parser into AST
* Custom non-SSA IR
* Part of the AST -> IR compiler
* Aarch64 JIT compiler (independent from IR for now)
* Tree-walking interpreter (partially broken)
The project is currently in early stages and in active development. Inspecting its code might prove counter-productive; forking it is absolutely unnecessary.

View file

@ -50,7 +50,7 @@ Literals:
'a' -> u8 (ascii only?)
'猫'u -> u32
TODO: string literals? fixed-size arrays? built-in spans? Probably built-in spans (potentially defines in prelude.psl)
TODO: string literals? fixed-size arrays? built-in spans? Probably built-in spans (potentially defined in prelude.psl)
"hello, world" -> utf-8 string
"здарова, братки"u -> utf-32 string
@ -85,11 +85,11 @@ Logical (only bool type):
x || y // short-circuit
x ^ y
Equality (all built-in types, all struct types, only same type):
Equality (all built-in types, all pointer types, all array/struct types, only same type):
x == y
x != y
Comparison (all built-in types, all struct types, only same type):
Comparison (all built-in types, all pointer types, all array/struct types, only same type):
x < y
x > y
x <= y
@ -159,7 +159,7 @@ Struct types:
Creating a struct value:
let x = rect(10u, 20u)
let y = rect(width = 10u, height = 20u)
let y = rect(width = 10u, height = 20u) // named function arguments in general?
Struct field access:
let r = rect(1u, 2u)