示例#1
0
        public Node parseWhileStatement(Node node)
        {
            Node test;
            List<Node> body;
            bool oldInIteration;

            expectKeyword("while");

            expect("(");

            test = parseExpression();

            expect(")");

            oldInIteration = state.inIteration;
            state.inIteration = true;

            body = new List<Node>() { parseStatement() };

            state.inIteration = oldInIteration;

            return node.finishWhileStatement(test, body);
        }