Пример #1
0
 internal static GrapeVariable Create(GrapeSimpleType type, GrapeIdentifier name)
 {
     GrapeVariable variable = new GrapeVariable(type, name);
     variable.InitializeFromTemplate(type);
     variable.InitializeFromChildren(type.FileName, new GrapeEntity[] {type, name});
     return variable;
 }
Пример #2
0
 public GrapeClass(GrapeList<GrapeModifier> modifiers, GrapeIdentifier identifier, GrapeOptional<GrapeLiteralExpression<int>> size, GrapeOptional<GrapeSimpleType> inherits, GrapeList<GrapeClassItem> classItems)
     : base(modifiers)
 {
     GrapeLiteralExpression<int> sizeLiteral = size;
     this.size = (sizeLiteral == null) ? default(int?) : sizeLiteral.Value;
     this.inherits = inherits;
     this.classItems = classItems.ToList(this).AsReadOnly();
     name = identifier.Name;
 }
Пример #3
0
		public GrapeNameofExpression(GrapeSimpleType value) {
			this.value = value;
		}
Пример #4
0
		public GrapeCatchClause(GrapeSimpleType exceptionType, GrapeIdentifier variableIdentifier, GrapeList<GrapeStatement> statements): base(statements) {
			this.exceptionType = exceptionType;
			exceptionVariable = GrapeVariable.Create(exceptionType, variableIdentifier);
		}
Пример #5
0
		public GrapeCatchClause(GrapeSimpleType exceptionType, GrapeList<GrapeStatement> statements): this(exceptionType, null, statements) {}