Skip to content

Commit 09c27fc

Browse files
Wrongly parsed FILESIZE / FILE SIZE if non constant #1154
1 parent 91ee20b commit 09c27fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ugbc/src/ugbc.y

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4393,6 +4393,10 @@ exponential_less:
43934393
$$ = variable_temporary( _environment, VT_BYTE, "(note)" )->name;
43944394
variable_store( _environment, $$, $2 );
43954395
}
4396+
| filesize OP const_expr_string CP {
4397+
$$ = variable_temporary( _environment, VT_WORD, "(size)" )->name;
4398+
variable_store( _environment, $$, file_size( _environment, $3 ) );
4399+
}
43964400
| IF OP const_expr OP_COMMA const_expr OP_COMMA const_expr CP {
43974401
$$ = variable_temporary( _environment, ((struct _Environment *)_environment)->defaultVariableType, "(if)" )->name;
43984402
if ( $3 ) {

0 commit comments

Comments
 (0)