"int a = *'" now reports an error

git-svn-id: http://picoc.googlecode.com/svn/trunk@316 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-06-02 06:30:14 +00:00
parent f4b2bdcc64
commit 2f8f365d46

View file

@ -1076,6 +1076,9 @@ int ExpressionParse(struct ParseState *Parser, struct Value **Result)
/* all that should be left is a single value on the stack */
if (Parser->Mode == RunModeRun)
{
if (StackTop->Order != OrderNone || StackTop->Next != NULL)
ProgramFail(Parser, "invalid expression");
*Result = StackTop->p.Val;
HeapPopStack(StackTop, sizeof(struct ExpressionStack));
}