internal FunctionDeclarator(Declarator functionName, FunctionDeclarator template) : base(functionName.SourceLocation) { this.FunctionName = functionName; this.parameters = template.Parameters; this.templateParameters = template.TemplateParameters; this.Specifiers = template.Specifiers; this.Contract = new FunctionOrBlockContract(template.Contract); }
/// <summary> /// Create a shallow copy of the template /// </summary> internal FunctionOrBlockContract(FunctionOrBlockContract template) { this.HasContract = template.HasContract; this.Postconditions = template.Postconditions; this.Preconditions = template.Preconditions; this.Reads = template.Reads; this.Writes = template.Writes; this.IsPure = template.IsPure; this.Variants = template.Variants; }
internal FunctionDeclarator(Declarator functionName, List<Parameter> parameters, List<TemplateParameterDeclarator> templateParameters, ISourceLocation sourceLocation) : base(sourceLocation) { this.Contract = new FunctionOrBlockContract(); this.FunctionName = functionName; this.parameters = parameters; this.templateParameters = templateParameters; }