~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/Libraries/NRefactory/NRefactoryASTGenerator/AST/Node.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
 
 
7
namespace NRefactoryASTGenerator.Ast
 
8
{
 
9
        interface INode {}
 
10
        interface INullable {}
 
11
        struct Location {}
 
12
        
 
13
        enum Modifiers { None }
 
14
        
 
15
        [CustomImplementation]
 
16
        abstract class AbstractNode : INode {}
 
17
        
 
18
        abstract class AttributedNode : AbstractNode
 
19
        {
 
20
                List<AttributeSection> attributes;
 
21
                Modifiers modifier;
 
22
                
 
23
                public AttributedNode() {}
 
24
                public AttributedNode(List<AttributeSection> attributes) {}
 
25
                public AttributedNode(Modifiers modifier, List<AttributeSection> attributes) {}
 
26
        }
 
27
        
 
28
        abstract class ParametrizedNode : AttributedNode
 
29
        {
 
30
                string name;
 
31
                List<ParameterDeclarationExpression> parameters;
 
32
                
 
33
                public ParametrizedNode() {}
 
34
                
 
35
                public ParametrizedNode(Modifiers modifier, List<AttributeSection> attributes,
 
36
                                        string name, List<ParameterDeclarationExpression> parameters)
 
37
                        : base(modifier, attributes)
 
38
                {}
 
39
        }
 
40
        
 
41
        [CustomImplementation]
 
42
        class TypeReference : AbstractNode, INullable
 
43
        {
 
44
                List<TypeReference> genericTypes;
 
45
        }
 
46
        
 
47
        [CustomImplementation]
 
48
        class InnerClassTypeReference : TypeReference
 
49
        {
 
50
                TypeReference baseType;
 
51
        }
 
52
        
 
53
        class AttributeSection : AbstractNode, INullable
 
54
        {
 
55
                string attributeTarget;
 
56
                List<Attribute> attributes;
 
57
        }
 
58
        
 
59
        class Attribute : AbstractNode
 
60
        {
 
61
                string name;
 
62
                List<Expression> positionalArguments;
 
63
                List<NamedArgumentExpression> namedArguments;
 
64
                
 
65
                public Attribute() {}
 
66
                public Attribute(string name, List<Expression> positionalArguments, List<NamedArgumentExpression> namedArguments) {}
 
67
        }
 
68
}