]> git.sur5r.net Git - cc65/blobdiff - src/ca65/expr.h
Merge remote-tracking branch 'upstream/master' into a5200
[cc65] / src / ca65 / expr.h
index 989a322bbdba9acfaeae8237fcb822f09e720cc4..0105bb68ff1c859f32fe17db5242b02f779d3f5b 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                 expr.h                                   */
+/*                                  expr.h                                   */
 /*                                                                           */
-/*            Expression evaluation for the ca65 macroassembler             */
+/*             Expression evaluation for the ca65 macroassembler             */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
@@ -55,7 +55,7 @@ struct ExprDesc;
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
@@ -109,6 +109,12 @@ ExprNode* GenByteExpr (ExprNode* Expr);
 ExprNode* GenWordExpr (ExprNode* Expr);
 /* Force the given expression into a word and return the result. */
 
+ExprNode* GenFarAddrExpr (ExprNode* Expr);
+/* Force the given expression into a far address and return the result. */
+
+ExprNode* GenDWordExpr (ExprNode* Expr);
+/* Force the given expression into a dword and return the result. */
+
 ExprNode* GenNE (ExprNode* Expr, long Val);
 /* Generate an expression that compares Expr and Val for inequality */
 
@@ -141,14 +147,6 @@ ExprNode* CloneExpr (ExprNode* Expr);
  * nodes, it will not resolve them.
  */
 
-ExprNode* FinalizeExpr (ExprNode* Expr, const Collection* LineInfos);
-/* Finalize an expression tree before it is written to the file. This will
- * replace EXPR_BANKRAW nodes by EXPR_BANK nodes, and replace constant
- * expressions by their result. The LineInfos are used when diagnosing errors.
- * Beware: The expression tree may get replaced in future versions, so don't
- * use Expr after calling this function.
- */
-
 void WriteExpr (ExprNode* Expr);
 /* Write the given expression to the object file */
 
@@ -170,10 +168,14 @@ ExprNode* FuncLoByte (void);
 ExprNode* FuncHiByte (void);
 /* Handle the .HIBYTE builtin function */
 
+ExprNode* MakeBoundedExpr (ExprNode* Expr, unsigned Size);
+/* Force the given expression into a specific size of ForceRange is true */
 
-/* End of expr.h */
+ExprNode* BoundedExpr (ExprNode* (*ExprFunc) (void), unsigned Size);
+/* Parse an expression and force it within a given size if ForceRange is true */
 
-#endif
 
 
+/* End of expr.h */
 
+#endif