public ClassDefinition( Token classToken, Token nameToken, IList <Token> subclassTokens, IList <string> subclassNames, string ns, TopLevelConstruct owner, Library library, Token staticToken, Token finalToken, FileScope fileScope) : base(classToken, owner, fileScope) { this.Library = library; this.ClassID = ClassDefinition.classIdAlloc++; this.Namespace = ns; this.NameToken = nameToken; this.BaseClassTokens = subclassTokens.ToArray(); this.BaseClassDeclarations = subclassNames.ToArray(); this.StaticToken = staticToken; this.FinalToken = finalToken; if (staticToken != null && this.BaseClassTokens.Length > 0) { throw new ParserException(staticToken, "Class cannot be static and have base classes or interfaces."); } }
public FunctionDefinition( Token functionToken, Library library, TopLevelConstruct nullableOwner, bool isStaticMethod, Token nameToken, IList <Annotation> functionAnnotations, string namespyace, FileScope fileScope) : base(functionToken, nullableOwner, fileScope) { this.Library = library; this.IsStaticMethod = isStaticMethod; this.Namespace = namespyace; this.NameToken = nameToken; this.annotations = new Dictionary <string, Annotation>(); foreach (Annotation annotation in functionAnnotations) { this.annotations[annotation.Type] = annotation; } this.MemberID = -1; }
public ConstStatement(Token constToken, Token nameToken, string ns, TopLevelConstruct owner, Library library, FileScope fileScope) : base(constToken, owner, fileScope) { this.Library = library; this.NameToken = nameToken; this.Name = nameToken.Value; this.Namespace = ns; }
public Namespace(Token namespaceToken, string name, TopLevelConstruct owner, Library library, FileScope fileScope) : base(namespaceToken, owner, fileScope) { this.Library = library; this.Name = name; }
public ImportStatement(Token importToken, string path, Library callingLibrary, FileScope fileScope) : base(importToken, null, fileScope) { this.Library = callingLibrary; this.ImportPath = path; fileScope.Imports.Add(this); }
public EnumDefinition(Token enumToken, Token nameToken, string ns, TopLevelConstruct owner, Library library, FileScope fileScope) : base(enumToken, owner, fileScope) { this.Library = library; this.NameToken = nameToken; this.Name = nameToken.Value; this.Namespace = ns; }
public TopLevelConstruct(Token firstToken, TopLevelConstruct owner, FileScope fileScope) : base(firstToken, owner) { this.FileScope = fileScope; }