Macroprocessor: error out when length() operator called on a string or an int

Closes DynareTeam/Dynare#1547
issue#70
Sébastien Villemot 2018-07-24 12:49:08 +02:00
parent 49e1c43aed
commit 937659747a
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ expr : INTEGER
}
| NAME LPAREN array_expr RPAREN
{ TYPERR_CATCH($$ = driver.eval_string_function(*$1, $3), @$); delete $1; }
| LENGTH LPAREN array_expr RPAREN
| LENGTH LPAREN expr RPAREN
{ TYPERR_CATCH($$ = $3->length(), @$); }
| LPAREN expr RPAREN
{ $$ = $2; }