1
0
Fork 0

undefined <condition>s are "true"

This commit is contained in:
mfranz 2007-03-19 18:17:05 +00:00
parent b2f57eab81
commit 5b812986fb

View file

@ -186,9 +186,11 @@ var setAll = func {
##
# Evaluates a <condition> property branch according to the rules
# set out in $FG_ROOT/Docs/README.condition.
# set out in $FG_ROOT/Docs/README.condition. Undefined conditions
# are true.
#
var condition = func(p) {
if(p == nil) { return 1; }
if(!isa(p, props.Node)) { p = props.globals.getNode(p); }
return _cond_and(p)
}
@ -251,3 +253,4 @@ var _cond_cmp = func(p, op) {
return op == "LT" ? left < right : op == "GT" ? left > right : left == right;
}