1 Parser.Statement.If = Ext.extend(Parser.Statement, {
7 for (n in this.properties) {
8 if (!Parser.evaluate(n, this.properties[n])) {
14 return (this.isInverted ? !ret : ret);
17 parse: function(stream) {
18 if (this.evaluate()) {
19 this.satisfied = true;
22 Parser.Statement.If.superclass.parse.apply(this, arguments);
24 if (!this.satisfied) {
31 onSubStatement: function(statement, stream) {
32 var parsed = statement.parse(stream),
35 if (statement.type === 'elseif') {
36 if (!this.satisfied) {
37 if (statement.evaluate()) {
38 this.satisfied = true;
42 } else if (statement.type === 'else') {
43 if (!this.satisfied) {
44 this.satisfied = true;
48 this.pushBuffer(parsed);
54 this.pushBuffer(parsed);