diff lwcc/tree.h @ 498:1bd2d590d734

Rejig parser to eliminate lemon No longer use lemon for building the parser. It adds too much complexity, really, and a hand written recursive descent parser is far more flexible. The current iteration can handle exactly one statement: "return <int>".
author William Astle <lost@l-w.ca>
date Thu, 08 Aug 2019 23:32:23 -0600
parents a3e277c58df9
children f3e9732973f1
line wrap: on
line diff
--- a/lwcc/tree.h	Mon Aug 05 21:38:23 2019 -0600
+++ b/lwcc/tree.h	Thu Aug 08 23:32:23 2019 -0600
@@ -49,7 +49,9 @@
 #define NODE_FUNDECL		21	// function declaration
 #define NODE_FUNARGS		22	// list of function args
 #define NODE_BLOCK			23	// statement block
-#define NODE_NUMTYPES		24	// the number of node types
+#define NODE_STMT_RETURN    24  // return statement
+#define NODE_CONST_INT      25  // constant integer
+#define NODE_NUMTYPES		26	// the number of node types
 
 typedef struct node_s node_t;