diff lwlib/lw_expr.c @ 331:623b62ab774b

Allow ; as a delimiter for 6309 logic operations. Allow ; to terminate expression evaluation. This is required to allow the logic/memory operations on the 6309 to work using the ; as a delimiter. The semicolon makes it clearer that it is two different operands.
author William Astle <lost@l-w.ca>
date Sun, 13 Apr 2014 20:25:04 -0600
parents 346966cffeef
children 3b5a45c6ab92
line wrap: on
line diff
--- a/lwlib/lw_expr.c	Sun Apr 13 16:04:25 2014 -0600
+++ b/lwlib/lw_expr.c	Sun Apr 13 20:25:04 2014 -0600
@@ -1226,7 +1226,7 @@
 	int opern, i;
 	lw_expr_t term1, term2, term3;
 	
-	if (!**p || isspace(**p) || **p == ')' || **p == ',' || **p == ']')
+	if (!**p || isspace(**p) || **p == ')' || **p == ',' || **p == ']' || **p == ';')
 		return NULL;
 
 	term1 = lw_expr_parse_term(p, priv);
@@ -1234,7 +1234,7 @@
 		return NULL;
 
 eval_next:
-	if (!**p || isspace(**p) || **p == ')' || **p == ',' || **p == ']')
+	if (!**p || isspace(**p) || **p == ')' || **p == ',' || **p == ']' || **p == ';')
 		return term1;
 	
 	// expecting an operator here