示例#1
0
文件: Parser.cs 项目: borota/JTVS
        private WithItem ParseWithItem(List<string> itemWhiteSpace)
        {
            var start = GetStart();
            Expression contextManager = ParseExpression();
            Expression var = null;
            if (MaybeEat(TokenKind.KeywordAs)) {
                if (itemWhiteSpace != null) {
                    itemWhiteSpace.Add(_tokenWhiteSpace);
                }
                var = ParseExpression();
            }

            var res = new WithItem(contextManager, var);
            res.SetLoc(start, GetEnd());
            return res;
        }
示例#2
0
 public WithStatement(WithItem[] items, Statement body)
 {
     _items = items;
     _body = body;
 }