~ubuntu-branches/ubuntu/feisty/monodevelop/feisty

« back to all changes in this revision

Viewing changes to Core/src/NRefactory/NRefactoryASTGenerator/AST/GlobalLevel.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-08-18 00:51:23 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060818005123-5iit07y0j7wjg55f
Tags: 0.11+svn20060818-0ubuntu1
* New SVN snapshot
  + Works with Gtk# 2.9.0
* debian/control:
  + Updated Build-Depends
* debian/patches/use_nunit2.2.dpatch,
  debian/patches/use_real_libs.dpatch:
  + Updated
* debian/patches/versioncontrol_buildfix.dpatch:
  + Fix build failure in the version control addin

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// <file>
 
2
//     <copyright see="prj:///doc/copyright.txt"/>
 
3
//     <license see="prj:///doc/license.txt"/>
 
4
//     <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
 
5
//     <version>$Revision: 1388 $</version>
 
6
// </file>
 
7
 
 
8
using System;
 
9
using System.Collections.Generic;
 
10
 
 
11
namespace NRefactoryASTGenerator.AST
 
12
{
 
13
        [CustomImplementation, HasChildren]
 
14
        class CompilationUnit : AbstractNode {}
 
15
        
 
16
        [HasChildren]
 
17
        class NamespaceDeclaration : AbstractNode
 
18
        {
 
19
                string name;
 
20
                
 
21
                public NamespaceDeclaration(string name) {}
 
22
        }
 
23
        
 
24
        class TemplateDefinition : AttributedNode
 
25
        {
 
26
                [QuestionMarkDefault]
 
27
                string name;
 
28
                List<TypeReference> bases;
 
29
                
 
30
                public TemplateDefinition(string name, List<AttributeSection> attributes) : base(attributes) {}
 
31
        }
 
32
        
 
33
        class DelegateDeclaration : AttributedNode
 
34
        {
 
35
                [QuestionMarkDefault]
 
36
                string          name;
 
37
                TypeReference   returnType;
 
38
                List<ParameterDeclarationExpression> parameters;
 
39
                List<TemplateDefinition> templates;
 
40
                
 
41
                public DelegateDeclaration(Modifier modifier, List<AttributeSection> attributes) : base(modifier, attributes) {}
 
42
        }
 
43
        
 
44
        enum ClassType { Class }
 
45
        
 
46
        [HasChildren]
 
47
        class TypeDeclaration : AttributedNode
 
48
        {
 
49
                // Children of Struct:    FieldDeclaration, MethodDeclaration, EventDeclaration, ConstructorDeclaration,
 
50
                //                        OperatorDeclaration, TypeDeclaration, IndexerDeclaration, PropertyDeclaration, in VB: DeclareDeclaration
 
51
                // Childrean of class:    children of struct, DestructorDeclaration
 
52
                // Children of Interface: MethodDeclaration, PropertyDeclaration, IndexerDeclaration, EventDeclaration, in VB: TypeDeclaration(Enum) too
 
53
                // Children of Enum:      FieldDeclaration
 
54
                string name;
 
55
                ClassType type;
 
56
                List<TypeReference> baseTypes;
 
57
                List<TemplateDefinition> templates;
 
58
                Point bodyStartLocation;
 
59
                
 
60
                public TypeDeclaration(Modifier modifier, List<AttributeSection> attributes) : base(modifier, attributes) {}
 
61
        }
 
62
        
 
63
        [IncludeBoolProperty("IsAlias", "return !alias.IsNull;")]
 
64
        class Using : AbstractNode
 
65
        {
 
66
                [QuestionMarkDefault]
 
67
                string name;
 
68
                TypeReference alias;
 
69
                
 
70
                public Using(string name) {}
 
71
                public Using(string name, TypeReference alias) {}
 
72
        }
 
73
        
 
74
        [IncludeMember("public UsingDeclaration(string nameSpace) : this(nameSpace, null) {}")]
 
75
        [IncludeMember("public UsingDeclaration(string nameSpace, TypeReference alias) {" +
 
76
                       " usings = new List<Using>(1);" +
 
77
                       " usings.Add(new Using(nameSpace, alias)); " +
 
78
                       "}")]
 
79
        class UsingDeclaration : AbstractNode
 
80
        {
 
81
                List<Using> usings;
 
82
                
 
83
                public UsingDeclaration(List<Using> usings) {}
 
84
        }
 
85
        
 
86
        enum OptionType { None }
 
87
        
 
88
        class OptionDeclaration : AbstractNode
 
89
        {
 
90
                OptionType optionType;
 
91
                bool       optionValue;
 
92
                
 
93
                public OptionDeclaration(OptionType optionType, bool optionValue) {}
 
94
        }
 
95
}