示例#1
0
文件: Call.cs 项目: hwdef/feel-csharp
        public override object VisitDictionaryElement(DictionaryElementContext context)
        {
            var r1     = (Result)(Visit(context.expression(0)));
            var r2     = (Result)(Visit(context.expression(1)));
            var result = (new DicEle()
            {
                key = (string)(r1.data), value = (string)(r2.data), text = (new System.Text.StringBuilder().Append("{").Append(r1.text).Append(", ").Append(r2.text).Append("}")).to_str()
            });

            return(result);
        }
示例#2
0
        public override object VisitDictionaryElement([NotNull] DictionaryElementContext context)
        {
            var r1     = (Result)Visit(context.expression(0));
            var r2     = (Result)Visit(context.expression(1));
            var result = new DicEle {
                key   = (string)r1.data,
                value = (string)r2.data,
                text  = "{" + r1.text + "," + r2.text + "}"
            };

            return(result);
        }