public MethodHeader(SourceCodePosition pos, BType t, string ident, List <VarDeclaration> p) : base(pos) { this.ResultType = t; this.Identifier = ident; this.Parameter = p; if (ASTObject.IsKeyword(ident)) { throw new IllegalIdentifierException(Position, ident); } }
public ProgramHeader(SourceCodePosition pos, string ident, int w, int h) : base(pos) { this.Identifier = ident; if (ASTObject.IsKeyword(ident)) { throw new IllegalIdentifierException(Position, ident); } if (w * h == 0) { DisplayWidth = 0; DisplayHeight = 0; } else { DisplayWidth = w; DisplayHeight = h; } }
public VarDeclaration(SourceCodePosition pos, BType t, string ident, Literal init) : base(pos) { this.Type = t; this.Identifier = ident; this.ID = V_ID_COUNTER; this.IsConstant = false; if (ASTObject.IsKeyword(ident)) { throw new IllegalIdentifierException(Position, ident); } if (init == null) { this.Initial = t.GetDefaultValue(); HasCompleteUserDefiniedInitialValue = false; } else { this.Initial = init; HasCompleteUserDefiniedInitialValue = true; } }