feat: regex for keywords, expect() to function as a parser

This commit is contained in:
2026-09-01 21:08:01 +05:30
parent 79a92f1d2d
commit 0370c48eee
3 changed files with 79 additions and 6 deletions
+25
View File
@@ -0,0 +1,25 @@
// import somefoo
//thisissomefoo
main() {
uint1 y = 1;
uint8 x = 0;
if x > 0 {
print("Hello World, x is zero");
} else {
print("Hello World, x is %", x);
}
while x < 10 {
x++;
}
print("x is % now", x);
string file_path = "../examples/print.sr";
fs.read(file_path);
uint8[] x = [1,2,3];
x.push(4);
x.push(1);
x.push(2);
}