This commit is contained in:
parent
754c2970af
commit
67b527a4df
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: parse.c 245 2008-07-15 05:56:32Z baconevi $
|
||||
* $Id: parse.c 246 2008-07-15 07:06:43Z baconevi $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -2685,9 +2685,8 @@ static ase_awk_nde_t* parse_increment (ase_awk_t* awk, ase_size_t line)
|
||||
* the primary should be treated specially.
|
||||
* for example, "abc" ++ 10 => "abc" . ++10
|
||||
*/
|
||||
/* TOOD: probably left->type == ASE_AWK_NDE_POS should
|
||||
* be inclued to handle $i++, $i--. */
|
||||
if (!is_var(left)) return left;
|
||||
/*if (!is_var(left)) return left; XXX */
|
||||
if (!is_var(left) && left->type != ASE_AWK_NDE_POS) return left;
|
||||
}
|
||||
|
||||
/* check for postfix increment operator */
|
||||
@ -4010,6 +4009,15 @@ static ase_awk_nde_t* parse_dowhile (ase_awk_t* awk, ase_size_t line)
|
||||
body = parse_statement (awk, awk->token.line);
|
||||
if (body == ASE_NULL) return ASE_NULL;
|
||||
|
||||
while (MATCH(awk,TOKEN_NEWLINE))
|
||||
{
|
||||
if (get_token(awk) == -1)
|
||||
{
|
||||
ase_awk_clrpt (awk, body);
|
||||
return ASE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!MATCH(awk,TOKEN_WHILE))
|
||||
{
|
||||
ase_awk_clrpt (awk, body);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: run.c 238 2008-07-09 14:07:47Z baconevi $
|
||||
* $Id: run.c 246 2008-07-15 07:06:43Z baconevi $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -4896,7 +4896,8 @@ static ase_awk_val_t* eval_incpre (ase_awk_run_t* run, ase_awk_nde_t* nde)
|
||||
* ugly as it is dependent of the values defined in tree.h.
|
||||
* but let's keep going this way for the time being. */
|
||||
if (exp->left->type < ASE_AWK_NDE_NAMED ||
|
||||
exp->left->type > ASE_AWK_NDE_ARGIDX)
|
||||
/*exp->left->type > ASE_AWK_NDE_ARGIDX) XXX */
|
||||
exp->left->type > ASE_AWK_NDE_POS)
|
||||
{
|
||||
ase_awk_setrunerror (
|
||||
run, ASE_AWK_EOPERAND, nde->line, ASE_NULL, 0);
|
||||
@ -5070,7 +5071,8 @@ static ase_awk_val_t* eval_incpst (ase_awk_run_t* run, ase_awk_nde_t* nde)
|
||||
* ugly as it is dependent of the values defined in tree.h.
|
||||
* but let's keep going this way for the time being. */
|
||||
if (exp->left->type < ASE_AWK_NDE_NAMED ||
|
||||
exp->left->type > ASE_AWK_NDE_ARGIDX)
|
||||
/*exp->left->type > ASE_AWK_NDE_ARGIDX) XXX */
|
||||
exp->left->type > ASE_AWK_NDE_POS)
|
||||
{
|
||||
ase_awk_setrunerror (
|
||||
run, ASE_AWK_EOPERAND, nde->line, ASE_NULL, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user