class NewTypeAnalyzer: (source)
Undocumented
| Method | __init__ |
Undocumented |
| Method | analyze_newtype_declaration |
Return the NewType call expression if s is a newtype declaration or None otherwise. |
| Method | build_newtype_typeinfo |
Undocumented |
| Method | check_newtype_args |
Ananlyze base type in NewType call. |
| Method | fail |
Undocumented |
| Method | make_argument |
Undocumented |
| Method | process_newtype_declaration |
Check if s declares a NewType; if yes, store it in symbol table. |
| Instance Variable | api |
Undocumented |
| Instance Variable | msg |
Undocumented |
| Instance Variable | options |
Undocumented |
Undocumented
| Parameters | |
options:Options | Undocumented |
api:SemanticAnalyzerInterface | Undocumented |
msg:MessageBuilder | Undocumented |
s is a newtype declaration or None otherwise.| Parameters | |
s:AssignmentStmt | Undocumented |
| Returns | |
Tuple[ | Undocumented |
Check if s declares a NewType; if yes, store it in symbol table.
Return True if it's a NewType declaration. The current target may be deferred as a side effect if the base type is not ready, even if the return value is True.
The logic in this function mostly copies the logic for visit_class_def() with a single (non-Generic) base.
| Parameters | |
s:AssignmentStmt | Undocumented |
| Returns | |
bool | Undocumented |