Пример #1
0
		internal ClassDeclaration(DocumentRange location, ClassName className, AliasIdentifier alias, ClassName superclassName, QualifierList qualifiers, ClassFeatureList classFeatures) : base(location)
		{
			this.m_className = className;
			this.m_alias = alias;
			this.m_superclassName = superclassName;
			this.m_qualifiers = qualifiers;
			this.m_classFeatures = classFeatures;
			qualifiers.SetParent(this);
			classFeatures.SetParent(this);
		}
Пример #2
0
        private ClassDeclaration ParseClass(QualifierList qualifiers)
        {
            DocumentRange   location        = this.Consume(KeywordType.CLASS).Location;
            ClassName       className       = this.ParseClassName();
            AliasIdentifier aliasIdentifier = null;

            if (!this.PeekKeyword(KeywordType.AS))
            {
                ClassName className1 = null;
                if (this.TryConsume(TokenType.Colon))
                {
                    className1 = this.ParseClassName();
                }
                this.Consume(TokenType.OpenBrace);
                ClassFeatureList classFeatureList = this.ParseClassFeatureList();
                this.Consume(TokenType.Semicolon);
                return(new ClassDeclaration(location, className, aliasIdentifier, className1, qualifiers, classFeatureList));
            }
            else
            {
                throw new NotSupportedException();
            }
        }
Пример #3
0
		internal void SetParent(ClassFeatureList parent)
		{
			this.m_parent = parent;
		}