mirror of
https://github.com/irmen/prog8.git
synced 2024-11-25 19:31:36 +00:00
fix grammar: if_xx with else part
This commit is contained in:
parent
db80417bd7
commit
f4b50368ba
@ -4,13 +4,17 @@
|
||||
|
||||
main {
|
||||
sub start() {
|
||||
const ubyte x=0
|
||||
sys.clear_carry()
|
||||
cx16.r0s=-42
|
||||
|
||||
if x==3 {
|
||||
txt.print("three")
|
||||
} else if x==4 {
|
||||
txt.print("four")
|
||||
}
|
||||
if_z
|
||||
txt.print("zero")
|
||||
else if_cs
|
||||
txt.print("carry")
|
||||
else if_neg
|
||||
txt.print("negative")
|
||||
else
|
||||
txt.print("nothing")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ if_stmt : 'if' expression EOL? (statement | statement_block) EOL? else_part? ;
|
||||
else_part : 'else' EOL? (statement | statement_block) ; // statement is constrained later
|
||||
|
||||
|
||||
branch_stmt : branchcondition EOL? (statement | statement_block) EOL? else_part? EOL ;
|
||||
branch_stmt : branchcondition EOL? (statement | statement_block) EOL? else_part? ;
|
||||
|
||||
branchcondition: 'if_cs' | 'if_cc' | 'if_eq' | 'if_z' | 'if_ne' | 'if_nz' | 'if_pl' | 'if_pos' | 'if_mi' | 'if_neg' | 'if_vs' | 'if_vc' ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user