public override object VisitDictionaryAssign([NotNull] DictionaryAssignContext context) { var obj = ""; obj += "{"; for (int i = 0; i < context.dictionaryElement().Length; i++) { var r = (DicEle)Visit(context.dictionaryElement(i)); if (i == 0) { obj += r.text; } else { obj += "," + r.text; } } obj += "}"; return(obj); }
public override object VisitDictionaryAssign(DictionaryAssignContext context) { var obj = ""; obj += "{"; foreach (var i in range(0, context.dictionaryElement().Length - 1, 1, true, true)) { var r = (DicEle)(Visit(context.dictionaryElement(i))); if (i == 0) { obj += r.text; } else { obj += "," + r.text; } } obj += "}"; return(obj); }