Exemplo n.º 1
0
        // list_if: 'if' old_test [list_iter]
        private ListComprehensionIf ParseListCompIf() {
            Eat(TokenKind.KeywordIf);
            SourceLocation start = GetStart();
            Expression expr = ParseOldExpression();
            ListComprehensionIf ret = new ListComprehensionIf(expr);

            ret.SetLoc(start, GetEnd());
            return ret;
        }
Exemplo n.º 2
0
        // list_if: 'if' old_test [list_iter]
        private ListComprehensionIf ParseListCompIf()
        {
            Eat(TokenKind.KeywordIf);
            Location start = GetStart();
            Expression test = ParseOldTest();
            ListComprehensionIf ret = new ListComprehensionIf(test);

            ret.SetLoc(GetExternal(), start, GetEnd());
            return ret;
        }