Ejemplo n.º 1
0
        public void process(WhileStatment whileStatment)
        {
            BoolStatment boolSatment = (BoolStatment)whileStatment.getTokensList()[0];

            _leftExpression = IfStatmentProcessor.getLeftExpression((BoolExpression)boolSatment.getTokensList()[0]);
            if (_leftExpression[0].kind == Constants.IDENTIFIER)
            {
                SemanticAnalizer.checkVarible(_leftExpression[0].value);
            }
            if (_leftExpression[2].kind == Constants.IDENTIFIER)
            {
                SemanticAnalizer.checkVarible(_leftExpression[2].value);
            }
            _rightExpression = IfStatmentProcessor.getElseAndThenStatments((StatmentPart)whileStatment.getTokensList()[1]);
            generate();
        }
Ejemplo n.º 2
0
 static public string visit(WhileStatment ifStatment)
 {
     return(Constants.WHILE_STATMENT);
 }