X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fparser.c;h=ec1dfcc43941a6bac49116d27103676969179b81;hb=c130e597b013e37c94afd6651be1e8859ba7e5ac;hp=b86cafd9ca0f2ee2cc11fe52b3912c3d7acf4312;hpb=59bcc726b6ecf668aa1b8805cba84ec880bbf61e;p=cc65 diff --git a/src/cc65/parser.c b/src/cc65/parser.c index b86cafd9c..ec1dfcc43 100644 --- a/src/cc65/parser.c +++ b/src/cc65/parser.c @@ -79,9 +79,7 @@ ExprNode* Expression (void); static int IsTypeExpr (void) -/* Return true if some sort of variable or type is waiting (helper for cast - * and sizeof() in hie10). - */ +/* Return true if some sort of variable or type is waiting */ { SymEntry* Entry; @@ -137,7 +135,7 @@ static ExprNode* GetIntNode (int Value) /*****************************************************************************/ -/* Code */ +/* Code */ /*****************************************************************************/ @@ -179,7 +177,7 @@ ExprNode* DoAsm (void) * will fail if the next token is also a string token, but that's a * syntax error anyway, because we expect a right paren. */ - ResetLiteralOffs (CurTok.IVal); + ResetLiteralPoolOffs (CurTok.IVal); } /* Skip the string token */ @@ -589,7 +587,7 @@ static ExprNode* DoFunctionCall (ExprNode* Left) } } else if (!Ellipsis) { /* Too many arguments. Do we have an open param list? */ - if ((Func->Flags & FD_ELLIPSIS) == 0) { + if ((Func->Flags & FD_VARIADIC) == 0) { /* End of param list reached, no ellipsis */ Error ("Too many function arguments"); } @@ -661,6 +659,7 @@ static ExprNode* DoPostIncDec (ExprNode* Left) static ExprNode* PostfixExpr (void) +/* Handle a postfix expression */ { /* Get the lower level expression */ ExprNode* Root = Primary (); @@ -909,7 +908,7 @@ static ExprNode* DoAddress (void) static ExprNode* DoIndirect (void) -/* Handle the indirection operaror * */ +/* Handle the indirection operator * */ { ExprNode* Op; type* ResultType; @@ -1021,7 +1020,7 @@ static ExprNode* DoTypeCast (void) } else { /* Must be casted. Setup the expression tree and return the new node */ - Root = AllocExprNode (NT_BOOL_NOT, TargetType, RVALUE); + Root = AllocExprNode (NT_TYPECAST, TargetType, RVALUE); SetLeftNode (Root, Op); return Root; @@ -1608,4 +1607,3 @@ static ExprNode* ConditionalExpr (void) -