public Argument makeArgument(Context context, IMethodDeclaration declaration) { IParameter parameter = Parameter; // when 1st argument, can be unnamed if (parameter == null) { if (declaration.getParameters().Count == 0) { throw new SyntaxError("Method has no argument"); } parameter = declaration.getParameters()[0]; } else { parameter = declaration.getParameters().find(this.GetName()); } if (parameter == null) { throw new SyntaxError("Method has no argument:" + this.GetName()); } IExpression expression = new ContextualExpression(context, this.getExpression()); return(new Argument(parameter, expression)); }
private IValue checkArrowValue(Context context, ContextualExpression expression) { IMethodDeclaration decl = getAbstractMethodDeclaration(context); return(new ArrowValue(decl, expression.Calling, (ArrowExpression)expression.Expression)); // TODO check }
private IValue checkArrowValue(Context context, ContextualExpression expression) { return(new ArrowValue(getDeclaration(context), expression.Calling, (ArrowExpression)expression.Expression)); // TODO check }