Пример #1
0
 public FunctionDeclarationAST(string id, FormalParameterList parameterList,
                               ExpressionAst exprInstructions,
                               string retType)
     : this(id, parameterList, exprInstructions)
 {
     ReturnTypeId = retType;
 }
Пример #2
0
 private FunctionDeclarationAST(string id, FormalParameterList parameterList,
                                ExpressionAst exprInstructions)
 {
     FunctionId          = id;
     FormalParameterList = parameterList;
     ParameterList       = (parameterList ?? new FormalParameterList())
                           .Parameters
                           .Select(x => new KeyValuePair <string, string>(x.Name, x.TypeIdentifier)).ToList();
     ExprInstructions = exprInstructions;
     ReturnType       = TigerType.GetType <NoType>();
 }
Пример #3
0
 /// <summary>
 /// Inicializa una nueva instancia de record declaration
 /// </summary>
 /// <param name="typeID">Nombre del record que se declara</param>
 /// <param name="parameterList"></param>
 public RecordDeclarationAST(string typeID, FormalParameterList parameterList)
     : base(typeID)
 {
     Fields = (parameterList ?? new FormalParameterList()).Parameters
              .Select(x => new KeyValuePair <string, string>(x.Name, x.TypeIdentifier)).ToList();
 }