コード例 #1
0
        private Statement While()
        {
            WhileStatement whileNode  = new WhileStatement();
            Statement      stavedStmt = Statement.Enclosing;

            Statement.Enclosing = whileNode;

            Match(Tags.WHILE);
            Match('(');
            Expression condition = Bool();

            Match(')');

            whileNode.Init(condition, Stmt());
            Statement.Enclosing = stavedStmt; // Reset enclosing statement

            return(whileNode);
        }