New function ReplaceType
git-svn-id: svn://svn.cc65.org/cc65/trunk@1520 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -110,3 +110,13 @@ void PrintExprDesc (FILE* F, ExprDesc* E)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
type* ReplaceType (ExprDesc* Expr, const type* NewType)
|
||||||
|
/* Replace the type of Expr by a copy of Newtype and return the old type string */
|
||||||
|
{
|
||||||
|
type* OldType = Expr->Type;
|
||||||
|
Expr->Type = TypeDup (NewType);
|
||||||
|
return OldType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
#define EXPRDESC_H
|
#define EXPRDESC_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* cc65 */
|
/* cc65 */
|
||||||
#include "datatype.h"
|
#include "datatype.h"
|
||||||
|
|
||||||
@@ -94,6 +94,9 @@ void MakeConstIntExpr (ExprDesc* Expr, long Value);
|
|||||||
void PrintExprDesc (FILE* F, ExprDesc* Expr);
|
void PrintExprDesc (FILE* F, ExprDesc* Expr);
|
||||||
/* Print an ExprDesc */
|
/* Print an ExprDesc */
|
||||||
|
|
||||||
|
type* ReplaceType (ExprDesc* Expr, const type* NewType);
|
||||||
|
/* Replace the type of Expr by a copy of Newtype and return the old type string */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of exprdesc.h */
|
/* End of exprdesc.h */
|
||||||
|
|||||||
Reference in New Issue
Block a user