Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement DefExternal, with If(0) guard
def_if_else
checks for If(predicate == false) with no Else. It doesn't check for If(0) specifically, as the details of the predicate are not available when the check is done. This special-case code calls a new parser function,externals_list
, on thethen_branch
.externals_list
takes a list_length, and operates similar toterm_list
. It accepts any number of Externals, but if it gets something other than External, it just doestake_to_end_of_pkglength
and discards the result. This should allow it to still handle the case whereIf(false)
occurs in other situations, as it will just skip the content as it did previously. However, the case that Externals are mixed with other statements will not be processed completely. I don't know if this occurs in real-world examples.def_external
adds values and levels to the namespace. It considers the ObjectType when deciding if it should add it as a level.LevelType::External
. Values added areAmlType::External
.add_external_levels
optionally adds all parent levels when defining an External symbol. This is necessary because of real-world AML e.g. a table with this as the first declaration:External (_SB_.PR00._CST, UnknownObj)