eolian: fix unary expression parsing (correctly consume tokens)

Also disable typed expression validation for now. The interfaces are not
finished yet so some things will fail validation because of unexistent
type definitions.

Fixes T2064.

@fix
This commit is contained in:
Daniel Kolesa 2015-01-29 11:12:04 +00:00
parent fc81ae40e3
commit 4a14bbd0f5
2 changed files with 9 additions and 1 deletions

View File

@ -128,8 +128,15 @@ _validate_expr(const Eolian_Expression *expr, const Eolian_Type *tp,
Eolian_Expression_Mask msk)
{
Eolian_Value val;
/* TODO: enable later, for now we can't (unfinished interfaces */
if (tp)
val = eolian_expression_eval_type(expr, tp);
{
#if 0
val = eolian_expression_eval_type(expr, tp);
#else
return EINA_TRUE;
#endif
}
else
val = eolian_expression_eval(expr, msk);
return (val.type != EOLIAN_EXPR_UNKNOWN);

View File

@ -316,6 +316,7 @@ parse_expr_simple(Eo_Lexer *ls)
if (unop >= 0)
{
int line = ls->line_number, col = ls->column;
eo_lexer_get(ls);
Eolian_Expression *exp = parse_expr_bin(ls, UNARY_PRECEDENCE);
pop_expr(ls);
expr = push_expr(ls);