minor changes for lex spec

This commit is contained in:
yenru0 committed 2025-11-04 13:43:56 +09:00
1 parent bbc1838b8a
commit 51773b4906
2 files changed
+13 -2

No files matched your search

+12 -1
View File
@@ -6,6 +6,8 @@
* RBRACK `]`
* LCURLY `{`
* RCURLY `}`
* LPAREN `(`
* RPAREN `)`
* ID `[all]`
* SEMI `;`
* COMMA `,`
@@ -16,4 +18,13 @@
* RETURN `return`
* IF `if`
* ELSE `else`
* STRING `"{any}"`
* STRING `"{any}"`
## Syntax Spec
```
decl := val typespec id stmt ;
typespec := id | [id* -> id?]
stmt :=
```
+1 -1
View File
@@ -1,6 +1,6 @@
val int s 3; # global
val [int->int] fib int n {
val [int->int] fib (int n) {
return if == n 0 {
1
} else {