Exemplo n.º 1
0
 /// <summary>Creates functions or procedure</summary>
 public Function(QualifiedName name, IList<ParameterDescription> inputs, IList<ParameterDescription> outputs, IList<ParameterDescription> inouts, ParameterDescription returning, AccessModifier visibility = AccessModifier.Private)
 {
     QualifiedName = name;
     Profile = new ParametersProfile();
     Profile.InputParameters  = inputs  ?? new List<ParameterDescription>();
     Profile.OutputParameters = outputs ?? new List<ParameterDescription>();
     Profile.InoutParameters  = inouts  ?? new List<ParameterDescription>();
     Profile.ReturningParameter = returning;
     Visibility = visibility;
 }
Exemplo n.º 2
0
 private ParameterDescription Validate(ParameterDescription parameter, string name)
 {
     if (parameter != null && parameter.Name.Equals(name)) return parameter;
     return null;
 }
Exemplo n.º 3
0
 private void CheckParameter(ParameterDescription parameter, CodeElement ce, ParserRuleContext context)
 {
     // TCRFUN_LEVEL_88_PARAMETERS
     if (parameter.CodeElement().LevelNumber.Value != 1)
     DiagnosticUtils.AddError(ce, "Condition parameter \""+parameter.Name+"\" must be subordinate to another parameter.", context);
     foreach(var child in parameter.Children) {
     var condition = (DataConditionEntry)child.CodeElement;
     if (condition.LevelNumber.Value != 88)
         DiagnosticUtils.AddError(ce, "Condition parameter \""+condition.Name+"\" must be level 88.");
     }
 }
Exemplo n.º 4
0
 /// <summary>Creates function.</summary>
 public Function(QualifiedName name, IList<ParameterDescription> inputs, ParameterDescription returning, AccessModifier visibility = AccessModifier.Private)
     : this(name, inputs, null, null, returning, visibility)
 {
 }
Exemplo n.º 5
0
 private static CallParameter Create(ParameterDescription pAsDefined, CallParameter pAsUsed)
 {
     if (pAsUsed != null) return pAsUsed;
     return new EmptyCallParameter();
 }
 private ParameterEntry CreateParameterEntry(ParameterDescription parameter, Compiler.CodeModel.SymbolTable table)
 {
     var generated = new ParameterEntry((ParameterDescriptionEntry)parameter.CodeElement, table);
     foreach(var child in parameter.Children) generated.Add(child);
     return generated;
 }