fix some specs and add for parse

This commit is contained in:
yenru0 committed 2025-11-10 02:30:48 +09:00
1 parent 91f90419e1
commit 62b7024734
4 files changed
+15 -8

No files matched your search

+1
View File
@@ -0,0 +1 @@
.vscode
+10 -8
View File
@@ -26,10 +26,13 @@
```
program := defn*
defn := VAL type ID ;
| VAL type ID expr ;
expr := atom atom* ;
type := ID | [] | [type] | [ type* ARROW type? ]
expr := atom atom*
atom := ID
| NUM
@@ -40,10 +43,9 @@ atom := ID
| dereference
stmt := defn
| expr
stmt := defn | st
| expr ; // expr statement
| return expr ; // return statement
| $ ID expr ; // assignment statement
| if expr compound ; // if statement
| if expr compound else compound ; // if-else statement
```
View File
Whitespace-only changes.
+4
View File
@@ -0,0 +1,4 @@
#include "parse.h"
#include <stdlib.h>