public ParameterMismatchWarning(string fname, int line, int order, FuncParamNode expected, FuncParamNode actual)
     : this(fname, line, variadicMismatch : false)
 {
     if (Equals(expected, actual))
     {
         throw new ArgumentException("Expected different objects");
     }
     this.Expected = expected;
     this.Actual   = actual;
     this.Order    = order;
 }
        public override ASTNode VisitParameterList([NotNull] ParameterListContext ctx)
        {
            FuncParamsNode @params;
            FuncParamNode  param = this.Visit(ctx.parameterDeclaration()).As <FuncParamNode>();

            if (ctx.parameterList() is null)
            {
                return(new FuncParamsNode(ctx.Start.Line, param));
            }

            @params = this.Visit(ctx.parameterList()).As <FuncParamsNode>();
            return(new FuncParamsNode(ctx.Start.Line, @params.Parameters.Concat(new[] { param })));
        }
示例#3
0
 public virtual TResult Visit(FuncParamNode node) => this.VisitChildren(node);