/*****************************************************************************/
/* */
-/* expr.h */
+/* expr.h */
/* */
-/* Expression evaluation for the ca65 macroassembler */
+/* Expression evaluation for the ca65 macroassembler */
/* */
/* */
/* */
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
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 */
* 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 */
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