]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/Eot/CodeFragment.py
2 # fragments of source file
4 # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
6 # This program and the accompanying materials
7 # are licensed and made available under the terms and conditions of the BSD License
8 # which accompanies this distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 ## The description of comment contents and start & end position
22 # @param self The object pointer
23 # @param Str The message to record
24 # @param Begin The start position tuple.
25 # @param End The end position tuple.
26 # @param CommentType The type of comment (T_COMMENT_TWO_SLASH or T_COMMENT_SLASH_STAR).
28 def __init__(self
, Str
, Begin
, End
, CommentType
):
32 self
.Type
= CommentType
34 ## The description of preprocess directives and start & end position
40 # @param self The object pointer
41 # @param Str The message to record
42 # @param Begin The start position tuple.
43 # @param End The end position tuple.
45 def __init__(self
, Str
, Begin
, End
):
50 ## The description of assignment expression and start & end position
53 class AssignmentExpression
:
56 # @param self The object pointer
57 # @param Str The message to record
58 # @param Begin The start position tuple.
59 # @param End The end position tuple.
61 def __init__(self
, Lvalue
, Op
, Exp
, Begin
, End
):
68 ## The description of predicate expression and start & end position
71 class PredicateExpression
:
74 # @param self The object pointer
75 # @param Str The message to record
76 # @param Begin The start position tuple.
77 # @param End The end position tuple.
79 def __init__(self
, Str
, Begin
, End
):
84 ## The description of function definition and start & end position
87 class FunctionDefinition
:
90 # @param self The object pointer
91 # @param Str The message to record
92 # @param Begin The start position tuple.
93 # @param End The end position tuple.
94 # @param LBPos The left brace position tuple.
96 def __init__(self
, ModifierStr
, DeclStr
, Begin
, End
, LBPos
, NamePos
):
97 self
.Modifier
= ModifierStr
98 self
.Declarator
= DeclStr
101 self
.LeftBracePos
= LBPos
102 self
.NamePos
= NamePos
104 ## The description of variable declaration and start & end position
107 class VariableDeclaration
:
110 # @param self The object pointer
111 # @param Str The message to record
112 # @param Begin The start position tuple.
113 # @param End The end position tuple.
115 def __init__(self
, ModifierStr
, DeclStr
, Begin
, End
):
116 self
.Modifier
= ModifierStr
117 self
.Declarator
= DeclStr
118 self
.StartPos
= Begin
121 ## The description of enum definition and start & end position
124 class EnumerationDefinition
:
127 # @param self The object pointer
128 # @param Str The message to record
129 # @param Begin The start position tuple.
130 # @param End The end position tuple.
132 def __init__(self
, Str
, Begin
, End
):
134 self
.StartPos
= Begin
137 ## The description of struct/union definition and start & end position
140 class StructUnionDefinition
:
143 # @param self The object pointer
144 # @param Str The message to record
145 # @param Begin The start position tuple.
146 # @param End The end position tuple.
148 def __init__(self
, Str
, Begin
, End
):
150 self
.StartPos
= Begin
153 ## The description of 'Typedef' definition and start & end position
156 class TypedefDefinition
:
159 # @param self The object pointer
160 # @param Str The message to record
161 # @param Begin The start position tuple.
162 # @param End The end position tuple.
164 def __init__(self
, FromStr
, ToStr
, Begin
, End
):
165 self
.FromType
= FromStr
167 self
.StartPos
= Begin
170 ## The description of function calling definition and start & end position
173 class FunctionCalling
:
176 # @param self The object pointer
177 # @param Str The message to record
178 # @param Begin The start position tuple.
179 # @param End The end position tuple.
181 def __init__(self
, Name
, Param
, Begin
, End
):
183 self
.ParamList
= Param
184 self
.StartPos
= Begin