public override ZenNode VisitAttr(ZenParser.AttrContext ctx) { string[] rside = ctx.Value().GetText().Split(':', 2); string type = rside[0]; string textValue = rside[1]; Object value = GetValue(type, textValue); return(new ZenAttrNode { Name = ctx.Name().GetText(), Type = type, TextValue = textValue, Value = value, }); }
/// <summary> /// Visit a parse tree produced by <see cref="ZenParser.attr"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitAttr([NotNull] ZenParser.AttrContext context) { return(VisitChildren(context)); }