diff lwcc/tree.h @ 501:f3e9732973f1

Add basic integer operations to lwcc Add +, -, *, and / to lwcc parser and code generator. Multiplication and division require helper functions in a yet to be created support library. These operations are integer only for the moment.
author William Astle <lost@l-w.ca>
date Tue, 24 Sep 2019 22:07:56 -0600
parents 1bd2d590d734
children 14a40f8bb4eb
line wrap: on
line diff
--- a/lwcc/tree.h	Thu Aug 29 17:00:17 2019 -0600
+++ b/lwcc/tree.h	Tue Sep 24 22:07:56 2019 -0600
@@ -51,7 +51,11 @@
 #define NODE_BLOCK			23	// statement block
 #define NODE_STMT_RETURN    24  // return statement
 #define NODE_CONST_INT      25  // constant integer
-#define NODE_NUMTYPES		26	// the number of node types
+#define NODE_OPER_PLUS      26  // addition
+#define NODE_OPER_MINUS     27  // subtraction
+#define NODE_OPER_TIMES     28  // multiplcation
+#define NODE_OPER_DIVIDE    29  // division
+#define NODE_NUMTYPES		30	// the number of node types
 
 typedef struct node_s node_t;