Skip to content

Commit

Permalink
fbc: internal rename for searching
Browse files Browse the repository at this point in the history
- prefer 'previous_check_array' to save/restore global fbGetCheckArray() value
  • Loading branch information
jayrm committed Jul 28, 2023
1 parent c91bbc3 commit 05cf096
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/compiler/parser-expr-binary.bas
Expand Up @@ -43,11 +43,11 @@ function cExpression _
end function

function cExpressionWithNIDXARRAY( byval allow_nidxarray as integer ) as ASTNODE ptr
dim as integer oldcheckarray = any
oldcheckarray = fbGetCheckArray( )
dim as integer previous_check_array = any
previous_check_array = fbGetCheckArray( )
fbSetCheckArray( not allow_nidxarray )
function = cExpression( )
fbSetCheckArray( oldcheckarray )
fbSetCheckArray( previous_check_array )
end function

'':::::
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/parser-expr-variable.bas
Expand Up @@ -1402,18 +1402,18 @@ function cVarOrDeref _
byval options as FB_VAREXPROPT _
) as ASTNODE ptr

dim as integer last_isexpr = any, check_array = any
dim as integer last_isexpr = any, previous_check_array = any

if( options and FB_VAREXPROPT_ISEXPR ) then
last_isexpr = fbGetIsExpression( )
fbSetIsExpression( TRUE )
end if
check_array = fbGetCheckArray( )
previous_check_array = fbGetCheckArray( )
fbSetCheckArray( ((options and FB_VAREXPROPT_NOARRAYCHECK) = 0) )

dim as ASTNODE ptr expr = cHighestPrecExpr( NULL, NULL )

fbSetCheckArray( check_array )
fbSetCheckArray( previous_check_array )
if( options and FB_VAREXPROPT_ISEXPR ) then
fbSetIsExpression( last_isexpr )
end if
Expand Down

0 comments on commit 05cf096

Please sign in to comment.