]> git.sur5r.net Git - cc65/blobdiff - src/cc65/expr.h
Fixed a bug
[cc65] / src / cc65 / expr.h
index 77f1b7a6019c75b95b03c1326e5eb5800eb50fa1..99a0af32dd45fc02aa609c00e1299506dba6e093 100644 (file)
@@ -37,14 +37,12 @@ void ConstSubExpr (int (*F) (ExprDesc*), ExprDesc* Expr);
  * from this input error.
  */
 
-unsigned assignadjust (type* lhst, ExprDesc* rhs);
-/* Adjust the type of the right hand expression so that it can be assigned to
- * the type on the left hand side. This function is used for assignment and
- * for converting parameters in a function call. It returns the code generator
- * flags for the operation.
+void CheckBoolExpr (ExprDesc* lval);
+/* Check if the given expression is a boolean expression, output a diagnostic
+ * if not.
  */
 
-void exprhs (unsigned flags, int k, ExprDesc *lval);
+void ExprLoad (unsigned flags, int k, ExprDesc *lval);
 /* Put the result of an expression into the primary register */
 
 void Store (ExprDesc* lval, const type* StoreType);
@@ -53,6 +51,16 @@ void Store (ExprDesc* lval, const type* StoreType);
  * is NULL, use lval->Type instead.
  */
 
+int hie0 (ExprDesc *lval);
+/* Parse comma operator. */
+
+int evalexpr (unsigned flags, int (*f) (ExprDesc*), ExprDesc* lval);
+/* Will evaluate an expression via the given function. If the result is a
+ * constant, 0 is returned and the value is put in the lval struct. If the
+ * result is not constant, ExprLoad is called to bring the value into the
+ * primary register and 1 is returned.
+ */
+
 void expression1 (ExprDesc* lval);
 /* Evaluate an expression on level 1 (no comma operator) and put it into
  * the primary register
@@ -61,13 +69,6 @@ void expression1 (ExprDesc* lval);
 void expression (ExprDesc* lval);
 /* Evaluate an expression and put it into the primary register */
 
-int evalexpr (unsigned flags, int (*f) (ExprDesc*), ExprDesc* lval);
-/* Will evaluate an expression via the given function. If the result is a
- * constant, 0 is returned and the value is put in the lval struct. If the
- * result is not constant, exprhs is called to bring the value into the
- * primary register and 1 is returned.
- */
-
 void ConstExpr (ExprDesc* lval);
 /* Get a constant value */
 
@@ -77,24 +78,25 @@ void ConstIntExpr (ExprDesc* Val);
 void intexpr (ExprDesc* lval);
 /* Get an integer expression */
 
-void boolexpr (ExprDesc* lval);
-/* Get a boolean expression */
-
-void test (unsigned label, int cond);
-/* Generate code to perform test and jump if false. */
-
 int hie10 (ExprDesc* lval);
 /* Handle ++, --, !, unary - etc. */
 
 int hie1 (ExprDesc* lval);
 /* Parse first level of expression hierarchy. */
 
-int hie0 (ExprDesc* lval);
-/* Parse comma operator (highest level of expression hierarchy) */
-
 void DefineData (ExprDesc* lval);
 /* Output a data definition for the given expression */
 
+void Test (unsigned Label, int Invert);
+/* Evaluate a boolean test expression and jump depending on the result of
+ * the test and on Invert.
+ */
+
+void TestInParens (unsigned Label, int Invert);
+/* Evaluate a boolean test expression in parenthesis and jump depending on
+ * the result of the test * and on Invert.
+ */
+
 
 
 /* End of expr.h */