1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 11:11:20 +00:00

Fix $precompiler layout.

$ELSEIF FLAG THEN was being turned into $ELSEIF IF FLAG THEN THEN when a precompiler condition had already been met in an $IF block before the current $ELSEIF.
This commit is contained in:
FellippeHeitor 2016-03-20 22:19:35 -03:00
parent 8d459da508
commit 3557828e95
2 changed files with 3 additions and 3 deletions

View file

@ -3,5 +3,5 @@ DIM SHARED BuildNum AS STRING
Version$ = "1.000"
'BuildNum format is YYYYMMDD/id, where id is a ever-increasing
'integer. If you make a change, update the date and increase the id!
BuildNum$ = "20160320/2"
BuildNum$ = "20160320/3"

View file

@ -2928,11 +2928,11 @@ DO
IF DefineElse(ExecCounter) = 0 THEN a$ = "$ELSE IF without $IF": GOTO errmes
IF DefineElse(ExecCounter) AND 2 THEN a$ = "$ELSE IF cannot follow $ELSE": GOTO errmes
IF RIGHT$(temp$, 5) <> " THEN" THEN a$ = "$ELSE IF without THEN": GOTO errmes
temp$ = LTRIM$(MID$(temp$, 3)) 'strip off the IF and extra spaces
temp$ = RTRIM$(LEFT$(temp$, LEN(temp$) - 4)) 'and strip off the THEN and extra spaces
IF DefineElse(ExecCounter) AND 4 THEN 'If we executed code in a previous IF or ELSE IF statement, we can't do it here
ExecLevel(ExecCounter) = -1
ELSE
temp$ = LTRIM$(MID$(temp$, 3)) 'strip off the IF and extra spaces
temp$ = RTRIM$(LEFT$(temp$, LEN(temp$) - 4)) 'and strip off the THEN and extra spaces
result = EvalPreIF(temp$, a$)
IF a$ <> "" THEN GOTO errmes
IF result <> 0 THEN