]>
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 # SPDX-License-Identifier: BSD-2-Clause-Patent
10 ## The description of comment contents and start & end position
16 # @param self The object pointer
17 # @param Str The message to record
18 # @param Begin The start position tuple.
19 # @param End The end position tuple.
20 # @param CommentType The type of comment (T_COMMENT_TWO_SLASH or T_COMMENT_SLASH_STAR).
22 def __init__(self
, Str
, Begin
, End
, CommentType
):
26 self
.Type
= CommentType
28 ## The description of preprocess directives and start & end position
34 # @param self The object pointer
35 # @param Str The message to record
36 # @param Begin The start position tuple.
37 # @param End The end position tuple.
39 def __init__(self
, Str
, Begin
, End
):
44 ## The description of assignment expression and start & end position
47 class AssignmentExpression
:
50 # @param self The object pointer
51 # @param Str The message to record
52 # @param Begin The start position tuple.
53 # @param End The end position tuple.
55 def __init__(self
, Lvalue
, Op
, Exp
, Begin
, End
):
62 ## The description of predicate expression and start & end position
65 class PredicateExpression
:
68 # @param self The object pointer
69 # @param Str The message to record
70 # @param Begin The start position tuple.
71 # @param End The end position tuple.
73 def __init__(self
, Str
, Begin
, End
):
78 ## The description of function definition and start & end position
81 class FunctionDefinition
:
84 # @param self The object pointer
85 # @param Str The message to record
86 # @param Begin The start position tuple.
87 # @param End The end position tuple.
88 # @param LBPos The left brace position tuple.
90 def __init__(self
, ModifierStr
, DeclStr
, Begin
, End
, LBPos
, NamePos
):
91 self
.Modifier
= ModifierStr
92 self
.Declarator
= DeclStr
95 self
.LeftBracePos
= LBPos
96 self
.NamePos
= NamePos
98 ## The description of variable declaration and start & end position
101 class VariableDeclaration
:
104 # @param self The object pointer
105 # @param Str The message to record
106 # @param Begin The start position tuple.
107 # @param End The end position tuple.
109 def __init__(self
, ModifierStr
, DeclStr
, Begin
, End
):
110 self
.Modifier
= ModifierStr
111 self
.Declarator
= DeclStr
112 self
.StartPos
= Begin
115 ## The description of enum definition and start & end position
118 class EnumerationDefinition
:
121 # @param self The object pointer
122 # @param Str The message to record
123 # @param Begin The start position tuple.
124 # @param End The end position tuple.
126 def __init__(self
, Str
, Begin
, End
):
128 self
.StartPos
= Begin
131 ## The description of struct/union definition and start & end position
134 class StructUnionDefinition
:
137 # @param self The object pointer
138 # @param Str The message to record
139 # @param Begin The start position tuple.
140 # @param End The end position tuple.
142 def __init__(self
, Str
, Begin
, End
):
144 self
.StartPos
= Begin
147 ## The description of 'Typedef' definition and start & end position
150 class TypedefDefinition
:
153 # @param self The object pointer
154 # @param Str The message to record
155 # @param Begin The start position tuple.
156 # @param End The end position tuple.
158 def __init__(self
, FromStr
, ToStr
, Begin
, End
):
159 self
.FromType
= FromStr
161 self
.StartPos
= Begin
164 ## The description of function calling definition and start & end position
167 class FunctionCalling
:
170 # @param self The object pointer
171 # @param Str The message to record
172 # @param Begin The start position tuple.
173 # @param End The end position tuple.
175 def __init__(self
, Name
, Param
, Begin
, End
):
177 self
.ParamList
= Param
178 self
.StartPos
= Begin