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); }
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); }