public override object VisitParameter(ParameterContext context) { var p = (new Parameter()); var id = ((Result)Visit(context.id())); p.id = id.text; p.permission = id.permission; if (context.annotationSupport() != null) { p.annotation = ((string)Visit(context.annotationSupport())); } p.type = ((string)Visit(context.typeType())); if (context.Dot_Dot_Dot() != null) { p.type = (new System.Text.StringBuilder().Append("params ").Append(p.type).Append("[]")).To_Str(); } if (context.Bang() != null) { p.type = (new System.Text.StringBuilder().Append("ref ").Append(p.type)).To_Str(); } if (context.expression() != null) { p.value = " = " + ((Result)Visit(context.expression())).text; } return(p); }
public override object VisitParameter([NotNull] ParameterContext context) { var p = new Parameter(); var id = (Result)Visit(context.id()); p.id = id.text; p.permission = id.permission; if (context.annotationSupport() != null) { p.annotation = (string)Visit(context.annotationSupport()); } if (context.expression() != null) { p.value = "=" + (Visit(context.expression()) as Result).text; } p.type = (string)Visit(context.type()); return(p); }