MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / HandleStructDeclCursor

Function HandleStructDeclCursor

Scripts/StructPackVerifier.py:179–204  ·  view source on GitHub ↗
(Arch, Cursor, NameOverride = "")

Source from the content-addressed store, hash-verified

177 Arch.CurrentNamespace = Arch.CurrentNamespace + Namespace + "::"
178
179def HandleStructDeclCursor(Arch, Cursor, NameOverride = ""):
180 # Append namespace
181 CursorName = ""
182 StructType = Cursor.type
183 if (len(StructType.spelling) == 0):
184 CursorName = NameOverride
185 else:
186 CursorName = StructType.spelling
187
188 if (len(CursorName) != 0):
189 Arch.NamespaceScope.append(CursorName)
190 SetNamespace(Arch)
191
192 Struct = StructDefinition(
193 Name = CursorName,
194 Size = StructType.get_size())
195
196 # Handle children
197 Arch.Structs[Struct.Name] = HandleStructElements(Arch, Struct, Cursor)
198
199 # Pop namespace off
200 if (len(CursorName) != 0):
201 Arch.NamespaceScope.pop()
202 SetNamespace(Arch)
203
204 return Arch
205
206def HandleUnionDeclCursor(Arch, Cursor, NameOverride = ""):
207 # Append namespace

Callers 3

HandleStructElementsFunction · 0.70
HandleTypeDefDeclFunction · 0.70
HandleCursorFunction · 0.70

Calls 5

appendMethod · 0.80
popMethod · 0.80
SetNamespaceFunction · 0.70
StructDefinitionClass · 0.70
HandleStructElementsFunction · 0.70

Tested by

no test coverage detected