ChangeExplicitTypeOfAny
A type translator used to change type of Any's, if explicit.
Attributes
| Attribute | Type | Description |
|---|---|---|
| _type_of_any | int | The target integer representation of the TypeOfAny enum used to replace explicit Any types during type translation. |
Constructor
Signature
def ChangeExplicitTypeOfAny(
type_of_any: int
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| type_of_any | int | The integer representation of the type to be used for explicit Any types. |
Signature
def ChangeExplicitTypeOfAny(
type_of_any: int
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| type_of_any | int | The integer representation of the TypeOfAny enum value to apply to explicit Any types |
Methods
visit_any()
@classmethod
def visit_any(
t: AnyType
) - > Type
Updates the type of Any to the target value if the current type is marked as explicit, otherwise returns the type unchanged.
Parameters
| Name | Type | Description |
|---|---|---|
| t | AnyType | The AnyType instance being visited and potentially modified |
Returns
| Type | Description |
|---|---|
Type | A copy of the AnyType with the modified type_of_any attribute if it was explicit, or the original type instance |