Esempio n. 1
0
 /// <summary>
 /// Creates a new parse tree for a Sub declaration.
 /// </summary>
 /// <param name="attributes">The attributes for the parse tree.</param>
 /// <param name="modifiers">The modifiers for the parse tree.</param>
 /// <param name="keywordLocation">The location of the keyword.</param>
 /// <param name="name">The name of the declaration.</param>
 /// <param name="typeParameters">The type parameters on the declaration, if any.</param>
 /// <param name="parameters">The parameters of the declaration.</param>
 /// <param name="implementsList">The list of implemented members.</param>
 /// <param name="handlesList">The list of handled events.</param>
 /// <param name="statements">The statements in the declaration.</param>
 /// <param name="endDeclaration">The end block declaration, if any.</param>
 /// <param name="span">The location of the parse tree.</param>
 /// <param name="comments">The comments for the parse tree.</param>
 public SubDeclaration(
     AttributeBlockCollection attributes,
     ModifierCollection modifiers,
     Location keywordLocation,
     SimpleName name,
     TypeParameterCollection typeParameters,
     ParameterCollection parameters,
     NameCollection implementsList,
     NameCollection handlesList,
     StatementCollection statements,
     EndBlockDeclaration endDeclaration,
     Span span,
     IList <Comment> comments) :
     base(
         TreeType.SubDeclaration,
         attributes,
         modifiers,
         keywordLocation,
         name,
         typeParameters,
         parameters,
         Location.Empty,
         null,
         null,
         implementsList,
         handlesList,
         statements,
         endDeclaration,
         span,
         comments)
 {
 }
        protected GenericBlockDeclaration(TreeType type, AttributeBlockCollection attributes, ModifierCollection modifiers, Location keywordLocation, SimpleName name, TypeParameterCollection typeParameters, DeclarationCollection declarations, EndBlockDeclaration endStatement, Span span, IList <Comment> comments
                                          ) : base(type, attributes, modifiers, keywordLocation, name, declarations, endStatement, span, comments)
        {
            Debug.Assert(type == TreeType.ClassDeclaration || type == TreeType.InterfaceDeclaration || type == TreeType.StructureDeclaration);

            SetParent(typeParameters);
            _TypeParameters = typeParameters;
        }
Esempio n. 3
0
        protected MethodDeclaration(
            TreeType type,
            AttributeBlockCollection attributes,
            ModifierCollection modifiers,
            Location keywordLocation,
            SimpleName name,
            TypeParameterCollection typeParameters,
            ParameterCollection parameters,
            Location asLocation,
            AttributeBlockCollection resultTypeAttributes,
            TypeName resultType,
            NameCollection implementsList,
            NameCollection handlesList,
            StatementCollection statements,
            EndBlockDeclaration endDeclaration,
            Span span,
            IList <Comment> comments
            ) :
            base(
                type,
                attributes,
                modifiers,
                keywordLocation,
                name,
                typeParameters,
                parameters,
                asLocation,
                resultTypeAttributes,
                resultType,
                span,
                comments
                )
        {
            Debug.Assert(
                type == TreeType.SubDeclaration ||
                type == TreeType.FunctionDeclaration ||
                type == TreeType.ConstructorDeclaration ||
                type == TreeType.OperatorDeclaration ||
                type == TreeType.PropertyDeclaration
                );

            SetParent(endDeclaration);
            SetParent(implementsList);
            SetParent(handlesList);
            SetParent(statements);

            _ImplementsList = implementsList;
            _HandlesList    = handlesList;
            _Statements     = statements;
            _EndDeclaration = endDeclaration;
        }
Esempio n. 4
0
        protected SignatureDeclaration(
            TreeType type,
            AttributeBlockCollection attributes,
            ModifierCollection modifiers,
            Location keywordLocation,
            SimpleName name,
            TypeParameterCollection typeParameters,
            ParameterCollection parameters,
            Location asLocation,
            AttributeBlockCollection resultTypeAttributes,
            TypeName resultType,
            Span span,
            IList <Comment> comments
            ) :
            base(
                type,
                attributes,
                modifiers,
                span,
                comments
                )
        {
            SetParent(name);
            SetParent(typeParameters);
            SetParent(parameters);
            SetParent(resultType);
            SetParent(resultTypeAttributes);

            _KeywordLocation      = keywordLocation;
            _Name                 = name;
            _TypeParameters       = typeParameters;
            _Parameters           = parameters;
            _AsLocation           = asLocation;
            _ResultTypeAttributes = resultTypeAttributes;
            _ResultType           = resultType;
        }
Esempio n. 5
0
 /// <summary>
 /// Constructs a new parse tree for a Class declaration.
 /// </summary>
 /// <param name="attributes">The attributes for the parse tree.</param>
 /// <param name="modifiers">The modifiers for the parse tree.</param>
 /// <param name="keywordLocation">The location of the keyword.</param>
 /// <param name="name">The name of the declaration.</param>
 /// <param name="typeParameters">The type parameters of the type, if any.</param>
 /// <param name="declarations">The declarations in the block.</param>
 /// <param name="endStatement">The end block declaration, if any.</param>
 /// <param name="span">The location of the parse tree.</param>
 /// <param name="comments">The comments for the parse tree.</param>
 public ClassDeclaration(AttributeBlockCollection attributes, ModifierCollection modifiers, Location keywordLocation, SimpleName name, TypeParameterCollection typeParameters, DeclarationCollection declarations, EndBlockDeclaration endStatement, Span span, IList <Comment> comments) : base(TreeType.ClassDeclaration, attributes, modifiers, keywordLocation, name, typeParameters, declarations, endStatement, span, comments
                                                                                                                                                                                                                                                                                                 )
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Constructs a new parse tree for a delegate declaration.
 /// </summary>
 /// <param name="attributes">The attributes for the parse tree.</param>
 /// <param name="modifiers">The modifiers for the parse tree.</param>
 /// <param name="keywordLocation">The location of the keyword.</param>
 /// <param name="functionLocation">The location of the 'Function'.</param>
 /// <param name="name">The name of the declaration.</param>
 /// <param name="typeParameters">The type parameters of the declaration, if any.</param>
 /// <param name="parameters">The parameters of the declaration.</param>
 /// <param name="asLocation">The location of the 'As', if any.</param>
 /// <param name="resultTypeAttributes">The attributes on the result type, if any.</param>
 /// <param name="resultType">The result type, if any.</param>
 /// <param name="span">The location of the parse tree.</param>
 /// <param name="comments">The comments for the parse tree.</param>
 public DelegateFunctionDeclaration(AttributeBlockCollection attributes, ModifierCollection modifiers, Location keywordLocation, Location functionLocation, SimpleName name, TypeParameterCollection typeParameters, ParameterCollection parameters, Location asLocation, AttributeBlockCollection resultTypeAttributes, TypeName resultType,
                                    Span span, IList <Comment> comments) : base(TreeType.DelegateFunctionDeclaration, attributes, modifiers, keywordLocation, functionLocation, name, typeParameters, parameters, asLocation, resultTypeAttributes,
                                                                                resultType, span, comments)
 {
 }
Esempio n. 7
0
 /// <summary>
 /// Constructs a new parse tree for a delegate Sub declaration.
 /// </summary>
 /// <param name="attributes">The attributes for the parse tree.</param>
 /// <param name="modifiers">The modifiers for the parse tree.</param>
 /// <param name="keywordLocation">The location of the keyword.</param>
 /// <param name="subLocation">The location of the 'Sub'.</param>
 /// <param name="name">The name of the declaration.</param>
 /// <param name="typeParameters">The type parameters of the declaration, if any.</param>
 /// <param name="parameters">The parameters of the declaration.</param>
 /// <param name="span">The location of the parse tree.</param>
 /// <param name="comments">The comments for the parse tree.</param>
 public DelegateSubDeclaration(AttributeBlockCollection attributes, ModifierCollection modifiers, Location keywordLocation, Location subLocation, SimpleName name, TypeParameterCollection typeParameters, ParameterCollection parameters, Span span, IList <Comment> comments) : base(TreeType.DelegateSubDeclaration, attributes, modifiers, keywordLocation, subLocation, name, typeParameters, parameters, Location.Empty, null,
                                                                                                                                                                                                                                                                                       null, span, comments)
 {
 }
Esempio n. 8
0
        protected DelegateDeclaration(TreeType type, AttributeBlockCollection attributes, ModifierCollection modifiers, Location keywordLocation, Location subOrFunctionLocation, SimpleName name, TypeParameterCollection typeParameters, ParameterCollection parameters, Location asLocation, AttributeBlockCollection resultTypeAttributes,
                                      TypeName resultType, Span span, IList <Comment> comments) : base(type, attributes, modifiers, keywordLocation, name, typeParameters, parameters, asLocation, resultTypeAttributes, resultType,
                                                                                                       span, comments)
        {
            Debug.Assert(type == TreeType.DelegateSubDeclaration || type == TreeType.DelegateFunctionDeclaration);

            _SubOrFunctionLocation = subOrFunctionLocation;
        }
Esempio n. 9
0
 /// <summary>
 /// Creates a new parse tree for a Function declaration.
 /// </summary>
 /// <param name="attributes">The attributes for the parse tree.</param>
 /// <param name="modifiers">The modifiers for the parse tree.</param>
 /// <param name="keywordLocation">The location of the keyword.</param>
 /// <param name="name">The name of the declaration.</param>
 /// <param name="typeParameters">The type parameters on the declaration, if any.</param>
 /// <param name="parameters">The parameters of the declaration.</param>
 /// <param name="asLocation">The location of the 'As', if any.</param>
 /// <param name="resultTypeAttributes">The attributes on the result type, if any.</param>
 /// <param name="resultType">The result type, if any.</param>
 /// <param name="implementsList">The list of implemented members.</param>
 /// <param name="handlesList">The list of handled events.</param>
 /// <param name="statements">The statements in the declaration.</param>
 /// <param name="endDeclaration">The end block declaration, if any.</param>
 /// <param name="span">The location of the parse tree.</param>
 /// <param name="comments">The comments for the parse tree.</param>
 public FunctionDeclaration(AttributeBlockCollection attributes, ModifierCollection modifiers, Location keywordLocation, SimpleName name, TypeParameterCollection typeParameters, ParameterCollection parameters, Location asLocation, AttributeBlockCollection resultTypeAttributes, TypeName resultType, NameCollection implementsList,
                            NameCollection handlesList, StatementCollection statements, EndBlockDeclaration endDeclaration, Span span, IList <Comment> comments) : base(TreeType.FunctionDeclaration, attributes, modifiers, keywordLocation, name, typeParameters, parameters, asLocation, resultTypeAttributes, resultType,
                                                                                                                                                                        implementsList, handlesList, statements, endDeclaration, span, comments)
 {
 }