/**
* Parse a template if block (<code>"#if...#end</code>).
*/
final public void p_template_if(Events events) throws ParseException {
String expression = null;
TemplateIf event = new TemplateIf(this);
jj_consume_token(T_TEMPLATE_IF);
pushState(EXPRESSION);
expression = p_expression_data();
popState();
p_block(event.addCondition(this, expression));
label_3:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case T_TEMPLATE_ELIF:
;
break;
default:
jj_la1[14] = jj_gen;
break label_3;
}
jj_consume_token(T_TEMPLATE_ELIF);
pushState(EXPRESSION);
expression = p_expression_data();
popState();
p_block(event.addCondition(this, expression));
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case T_TEMPLATE_ELSE:
jj_consume_token(T_TEMPLATE_ELSE);
p_block(event.addCondition(this));
break;
default:
jj_la1[15] = jj_gen;
;
}