Example #1
0
File: class.cs Project: 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;
 }
Example #2
0
File: class.cs Project: shugo/babel
 public SharedAttrDefinition(string name,
                             TypeSpecifier typeSpecifier,
                             Expression value,
                             AttrModifier modifier,
                             Location location)
     : base(name, typeSpecifier, modifier, location)
 {
     this.value = value;
 }
Example #3
0
 public DeclarationStatement(string name, TypeSpecifier typeSpecifier,
                             Location location)
     : base(location)
 {
     this.name = name;
     this.typeSpecifier = typeSpecifier;
 }
Example #4
0
File: class.cs Project: shugo/babel
 public ParameterDeclaration(string name,
                             TypeSpecifier constrainingType,
                             Location location)
     : base(location)
 {
     this.name = name;
     this.constrainingType = constrainingType;
     builder = null;
 }
Example #5
0
File: class.cs Project: shugo/babel
 public IncludeClause(TypeSpecifier typeSpecifier,
                      IncludeModifier modifier,
                      NodeList featureModifierList,
                      Location location)
     : base(location)
 {
     this.typeSpecifier = typeSpecifier;
     this.modifier = modifier;
     this.featureModifierList = featureModifierList;
 }
Example #6
0
File: class.cs Project: 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();
 }
Example #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;
 }
Example #8
0
File: class.cs Project: 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;
 }
Example #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());
 }
Example #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);
 }
Example #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);
     }
 }
Example #12
0
 public TypecaseWhen(TypeSpecifier typeSpecifier,
                     StatementList thenPart,
                     Location location)
     : base(location)
 {
     this.typeSpecifier = typeSpecifier;
     this.thenPart = thenPart;
     localVariable = null;
 }
Example #13
0
 public ProtectWhen(TypeSpecifier typeSpecifier,
                    StatementList thenPart,
                    Location location)
     : base(location)
 {
     this.typeSpecifier = typeSpecifier;
     this.thenPart = thenPart;
 }
Example #14
0
File: class.cs Project: 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();
 }
Example #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;
 }
Example #16
0
File: class.cs Project: shugo/babel
 public Argument(ArgumentMode mode,
                 string name, TypeSpecifier typeSpecifier,
                 Location location)
     : base(location)
 {
     this.mode = mode;
     this.name = name;
     this.typeSpecifier = typeSpecifier;
 }
Example #17
0
 public CallExpression(TypeSpecifier typeSpecifier,
                       string name,
                       TypedNodeList arguments)
     : this(typeSpecifier, name, arguments, Location.Null)
 {
 }
Example #18
0
File: class.cs Project: 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;
 }
Example #19
0
 public NewExpression(TypeSpecifier typeSpecifier,
                      TypedNodeList arguments,
                      Location location)
     : base(location)
 {
     this.typeSpecifier = typeSpecifier;
     this.arguments = arguments;
     this.constructor = null;
 }
Example #20
0
File: class.cs Project: 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();
 }
Example #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;
     }
 }
Example #22
0
 static TypeSpecifier()
 {
     Null = new NullTypeSpecifier();
 }
Example #23
0
File: node.cs Project: shugo/babel
 public virtual void VisitTypeSpecifier(TypeSpecifier typeSpecifier)
 {
 }