mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
parser:: ifz function
This commit is contained in:
parent
d82ac26ef0
commit
0c7a429985
8
util.cpp
8
util.cpp
@ -323,6 +323,14 @@ cld exp_parser::parse(int prio) {
|
||||
cld no = parsepar();
|
||||
res = real(cond) > 0 ? yes : no;
|
||||
}
|
||||
else if(eat("ifz(")) {
|
||||
cld cond = parse(0);
|
||||
force_eat(",");
|
||||
cld yes = parse(0);
|
||||
force_eat(",");
|
||||
cld no = parsepar();
|
||||
res = abs(cond) < 1e-8 ? yes : no;
|
||||
}
|
||||
else if(eat("wallif(")) {
|
||||
cld val0 = parse(0);
|
||||
force_eat(",");
|
||||
|
Loading…
Reference in New Issue
Block a user