fix: defun
This commit is contained in:
parent
6e9195c767
commit
ea7b3f9da5
13
DragonLisp.y
13
DragonLisp.y
|
|
@ -101,10 +101,13 @@ S
|
||||||
;
|
;
|
||||||
|
|
||||||
statements
|
statements
|
||||||
: S-Exprs { std::printf("Parsed statements -> S-Exprs\n"); }
|
: statement { std::printf("Parsed statements -> statement\n"); }
|
||||||
| func-def { std::printf("Parsed statements -> func-def\n"); }
|
| statements statement { std::printf("Parsed statements -> statements statement\n"); }
|
||||||
| statements S-Exprs { std::printf("Parsed statements -> statements S-Exprs\n"); }
|
;
|
||||||
| statements func-def { std::printf("Parsed statements -> statements func-def\n"); }
|
|
||||||
|
statement
|
||||||
|
: S-Expr { std::printf("Parsed statement -> S-Expr\n"); }
|
||||||
|
| func-def { std::printf("Parsed statement -> func-def\n"); }
|
||||||
;
|
;
|
||||||
|
|
||||||
S-Exprs
|
S-Exprs
|
||||||
|
|
@ -210,7 +213,7 @@ S-Expr-loop
|
||||||
;
|
;
|
||||||
|
|
||||||
func-def
|
func-def
|
||||||
: DEFUN IDENTIFIER LPAREN identifier-list RPAREN ignored-func-doc S-Exprs { std::printf("Parsed func-def -> DEFUN IDENTIFIER LPAREN identifier-list RPAREN ignored-func-doc S-Exprs\n"); }
|
: LPAREN DEFUN IDENTIFIER LPAREN identifier-list RPAREN ignored-func-doc S-Exprs RPAREN { std::printf("Parsed func-def -> DEFUN IDENTIFIER LPAREN identifier-list RPAREN ignored-func-doc S-Exprs\n"); }
|
||||||
;
|
;
|
||||||
|
|
||||||
ignored-func-doc
|
ignored-func-doc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue