]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/Eot/CodeFragment.py
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / BaseTools / Source / Python / Eot / CodeFragment.py
1 ## @file
2 # fragments of source file
3 #
4 # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
5 #
6 # SPDX-License-Identifier: BSD-2-Clause-Patent
7 #
8
9
10 ## The description of comment contents and start & end position
11 #
12 #
13 class Comment :
14 ## The constructor
15 #
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).
21 #
22 def __init__(self, Str, Begin, End, CommentType):
23 self.Content = Str
24 self.StartPos = Begin
25 self.EndPos = End
26 self.Type = CommentType
27
28 ## The description of preprocess directives and start & end position
29 #
30 #
31 class PP_Directive :
32 ## The constructor
33 #
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.
38 #
39 def __init__(self, Str, Begin, End):
40 self.Content = Str
41 self.StartPos = Begin
42 self.EndPos = End
43
44 ## The description of assignment expression and start & end position
45 #
46 #
47 class AssignmentExpression :
48 ## The constructor
49 #
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.
54 #
55 def __init__(self, Lvalue, Op, Exp, Begin, End):
56 self.Name = Lvalue
57 self.Operator = Op
58 self.Value = Exp
59 self.StartPos = Begin
60 self.EndPos = End
61
62 ## The description of predicate expression and start & end position
63 #
64 #
65 class PredicateExpression :
66 ## The constructor
67 #
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.
72 #
73 def __init__(self, Str, Begin, End):
74 self.Content = Str
75 self.StartPos = Begin
76 self.EndPos = End
77
78 ## The description of function definition and start & end position
79 #
80 #
81 class FunctionDefinition :
82 ## The constructor
83 #
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.
89 #
90 def __init__(self, ModifierStr, DeclStr, Begin, End, LBPos, NamePos):
91 self.Modifier = ModifierStr
92 self.Declarator = DeclStr
93 self.StartPos = Begin
94 self.EndPos = End
95 self.LeftBracePos = LBPos
96 self.NamePos = NamePos
97
98 ## The description of variable declaration and start & end position
99 #
100 #
101 class VariableDeclaration :
102 ## The constructor
103 #
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.
108 #
109 def __init__(self, ModifierStr, DeclStr, Begin, End):
110 self.Modifier = ModifierStr
111 self.Declarator = DeclStr
112 self.StartPos = Begin
113 self.EndPos = End
114
115 ## The description of enum definition and start & end position
116 #
117 #
118 class EnumerationDefinition :
119 ## The constructor
120 #
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.
125 #
126 def __init__(self, Str, Begin, End):
127 self.Content = Str
128 self.StartPos = Begin
129 self.EndPos = End
130
131 ## The description of struct/union definition and start & end position
132 #
133 #
134 class StructUnionDefinition :
135 ## The constructor
136 #
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.
141 #
142 def __init__(self, Str, Begin, End):
143 self.Content = Str
144 self.StartPos = Begin
145 self.EndPos = End
146
147 ## The description of 'Typedef' definition and start & end position
148 #
149 #
150 class TypedefDefinition :
151 ## The constructor
152 #
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.
157 #
158 def __init__(self, FromStr, ToStr, Begin, End):
159 self.FromType = FromStr
160 self.ToType = ToStr
161 self.StartPos = Begin
162 self.EndPos = End
163
164 ## The description of function calling definition and start & end position
165 #
166 #
167 class FunctionCalling:
168 ## The constructor
169 #
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.
174 #
175 def __init__(self, Name, Param, Begin, End):
176 self.FuncName = Name
177 self.ParamList = Param
178 self.StartPos = Begin
179 self.EndPos = End