/*
* producao de uma declaracao IF
*/
private SyntaxTree statementIf(){
SyntaxTree node = new SyntaxTree( SyntaxType.Tree.STATEMENT, SyntaxType.StatementKind.IF, this.currentToken );
this.match( TokenType.Element.IF );
node.appendChild( this.expression() );
this.match( TokenType.Element.THEN );
node.appendChild( this.statementSequence() );
if( this.currentToken.getType() == TokenType.Element.ELSE ){
this.match( TokenType.Element.ELSE );
node.appendChild( this.statementSequence() );
}
this.match( TokenType.Element.END );
return node;
}