Ejemplo n.º 1
0
Archivo: class.cs Proyecto: shugo/babel
 public RoutineDefinition(string name,
                          TypedNodeList arguments,
                          TypeSpecifier returnType,
                          StatementList statementList,
                          RoutineModifier modifier,
                          Location location)
     : base(name, arguments, returnType, location)
 {
     this.statementList = statementList;
     this.modifier = modifier;
 }
Ejemplo n.º 2
0
Archivo: class.cs Proyecto: shugo/babel
 public SharedAttrDefinition(string name,
                             TypeSpecifier typeSpecifier,
                             Expression value,
                             AttrModifier modifier,
                             Location location)
     : base(name, typeSpecifier, modifier, location)
 {
     this.value = value;
 }
Ejemplo n.º 3
0
 public DeclarationStatement(string name, TypeSpecifier typeSpecifier,
                             Location location)
     : base(location)
 {
     this.name = name;
     this.typeSpecifier = typeSpecifier;
 }
Ejemplo n.º 4
0
Archivo: class.cs Proyecto: shugo/babel
 public ParameterDeclaration(string name,
                             TypeSpecifier constrainingType,
                             Location location)
     : base(location)
 {
     this.name = name;
     this.constrainingType = constrainingType;
     builder = null;
 }
Ejemplo n.º 5
0
Archivo: class.cs Proyecto: shugo/babel
 public IncludeClause(TypeSpecifier typeSpecifier,
                      IncludeModifier modifier,
                      NodeList featureModifierList,
                      Location location)
     : base(location)
 {
     this.typeSpecifier = typeSpecifier;
     this.modifier = modifier;
     this.featureModifierList = featureModifierList;
 }
Ejemplo n.º 6
0
Archivo: class.cs Proyecto: shugo/babel
 public AbstractIterSignature(string name,
                              TypedNodeList arguments,
                              TypeSpecifier returnType,
                              Location location)
     : base(name, arguments, returnType, location)
 {
     typeBuilder = null;
     constructor = null;
     moveNext = null;
     getCurrent = null;
     moveNextArguments = null;
     creator = null;
     InitArguments();
 }
Ejemplo n.º 7
0
 public CallExpression(Expression receiver,
                       string name,
                       TypedNodeList arguments,
                       bool flip,
                       Location location)
     : base(location)
 {
     this.receiver = receiver;
     typeSpecifier = null;
     this.name = name;
     this.arguments = arguments;
     this.flip = flip;
     method = null;
     isBuiltin = false;
 }
Ejemplo n.º 8
0
Archivo: class.cs Proyecto: shugo/babel
 public AttrDefinition(string name,
                       TypeSpecifier typeSpecifier,
                       AttrModifier modifier,
                       Location location)
     : base(location)
 {
     this.name = name;
     this.typeSpecifier = typeSpecifier;
     this.modifier = modifier;
     fieldBuilder = null;
     reader = null;
     writer = null;
 }
Ejemplo n.º 9
0
 protected virtual MethodBuilder DefineReader(TypeBuilder type,
                  string name,
                  MethodAttributes attributes,
                  TypeSpecifier attrType)
 {
     CheckMethodConfliction(typeManager.GetTypeData(type),
                            name,
                            attrType.NodeType,
                            new TypedNodeList());
     return DefineMethod(type, name, attributes,
                         attrType.NodeType, new TypedNodeList());
 }
Ejemplo n.º 10
0
 protected virtual MethodBuilder DefineWriter(TypeBuilder type,
                  string name,
                  MethodAttributes attributes,
                  TypeSpecifier attrType)
 {
     Argument arg = new Argument(ArgumentMode.In, "value",
                                 attrType, Location.Null);
     arg.Index = 1;
     arg.NodeType = attrType.NodeType;
     TypedNodeList args = new TypedNodeList(arg);
     CheckMethodConfliction(typeManager.GetTypeData(type),
                            name,
                            typeManager.VoidType,
                            new TypedNodeList());
     return DefineMethod(type, name, attributes,
                         typeManager.VoidType, args);
 }
Ejemplo n.º 11
0
 public virtual TypeData GetType(TypeSpecifier typeSpecifier,
                                 ArrayList namespaces)
 {
     TypeData typeData = GetType(typeSpecifier.Name);
     if (typeData == null) {
         foreach (string ns in namespaces) {
             typeData = GetType(ns + Type.Delimiter +
                                typeSpecifier.Name);
             if (typeData != null)
                 break;
         }
     }
     if (typeData == null)
         return null;
     TypedNodeList typeParameters = typeSpecifier.TypeParameters;
     if (typeParameters.Length == 0) {
         return typeData;
     }
     else {
         TypeData genericTypeDef = typeData.GetGenericTypeDefinition();
         return genericTypeDef.BindGenericParameters(typeParameters);
     }
 }
Ejemplo n.º 12
0
 public TypecaseWhen(TypeSpecifier typeSpecifier,
                     StatementList thenPart,
                     Location location)
     : base(location)
 {
     this.typeSpecifier = typeSpecifier;
     this.thenPart = thenPart;
     localVariable = null;
 }
Ejemplo n.º 13
0
 public ProtectWhen(TypeSpecifier typeSpecifier,
                    StatementList thenPart,
                    Location location)
     : base(location)
 {
     this.typeSpecifier = typeSpecifier;
     this.thenPart = thenPart;
 }
Ejemplo n.º 14
0
Archivo: class.cs Proyecto: shugo/babel
 public AbstractRoutineSignature(string name,
                                 TypedNodeList arguments,
                                 TypeSpecifier returnType,
                                 Location location)
     : base(location)
 {
     this.name = name;
     this.arguments = arguments;
     this.returnType = returnType;
     this.methodBuilder = null;
     InitArguments();
 }
Ejemplo n.º 15
0
 public CallExpression(TypeSpecifier typeSpecifier,
                       string name,
                       TypedNodeList arguments,
                       Location location)
     : base(location)
 {
     receiver = null;
     this.typeSpecifier = typeSpecifier;
     this.name = name;
     this.arguments = arguments;
     flip = false;
     method = null;
     isBuiltin = false;
 }
Ejemplo n.º 16
0
Archivo: class.cs Proyecto: shugo/babel
 public Argument(ArgumentMode mode,
                 string name, TypeSpecifier typeSpecifier,
                 Location location)
     : base(location)
 {
     this.mode = mode;
     this.name = name;
     this.typeSpecifier = typeSpecifier;
 }
Ejemplo n.º 17
0
 public CallExpression(TypeSpecifier typeSpecifier,
                       string name,
                       TypedNodeList arguments)
     : this(typeSpecifier, name, arguments, Location.Null)
 {
 }
Ejemplo n.º 18
0
Archivo: class.cs Proyecto: shugo/babel
 public ConstDefinition(string name,
                        TypeSpecifier typeSpecifier,
                        object value,
                        ConstModifier modifier,
                        Location location)
     : base(location)
 {
     this.name = name;
     this.typeSpecifier = typeSpecifier;
     this.value = value;
     this.modifier = modifier;
     fieldBuilder = null;
     reader = null;
 }
Ejemplo n.º 19
0
 public NewExpression(TypeSpecifier typeSpecifier,
                      TypedNodeList arguments,
                      Location location)
     : base(location)
 {
     this.typeSpecifier = typeSpecifier;
     this.arguments = arguments;
     this.constructor = null;
 }
Ejemplo n.º 20
0
Archivo: class.cs Proyecto: shugo/babel
 public IterDefinition(string name,
                       TypedNodeList arguments,
                       TypeSpecifier returnType,
                       StatementList statementList,
                       RoutineModifier modifier,
                       Location location)
     : base(name, arguments, returnType,
            statementList, modifier, location)
 {
     typeBuilder = null;
     typeParameters = null;
     boundType = null;
     self = null;
     current = null;
     currentPosition = null;
     constructor = null;
     moveNext = null;
     getCurrent = null;
     creator = null;
     localVariables = new Hashtable();
     resumePoints = new ArrayList();
     resumePoints.Add(new ResumePoint());
     InitArguments();
     bridgeMethods = new ArrayList();
 }
Ejemplo n.º 21
0
 public override void VisitTypeSpecifier(TypeSpecifier typeSpecifier)
 {
     typeSpecifier.TypeParameters.Accept(this);
     if (typeSpecifier.Kind == TypeKind.Same) {
         typeSpecifier.NodeType = currentClass.BoundTypeData;
     }
     else {
         TypeData type =
             currentClass.GetTypeParameter(typeSpecifier.Name);
         if (type == null) {
             type = typeManager.GetType(typeSpecifier,
                                 currentSouceFile.ImportedNamespaces);
         }
         if (type == null) {
             report.Error(typeSpecifier.Location,
                          "there is no class named {0}",
                          typeSpecifier);
             return;
         }
         typeSpecifier.NodeType = type;
     }
 }
Ejemplo n.º 22
0
 static TypeSpecifier()
 {
     Null = new NullTypeSpecifier();
 }
Ejemplo n.º 23
0
Archivo: node.cs Proyecto: shugo/babel
 public virtual void VisitTypeSpecifier(TypeSpecifier typeSpecifier)
 {
 }