loki.ir.nodes.stmt_nodes
Generic and specific statement node type definitions.
Classes
|
|
|
|
|
|
|
|
|
|
|
Catch-all generic node for corner-cases. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- class GenericStmt(text: str, source: Source | str | None = None, label: str | None = None)
Bases:
LeafNode,_GenericStmtBaseCatch-all generic node for corner-cases.
This is provided as a fallback for any statements that do not have an appropriate representation in the IR. These can either be language features for which support was not yet added, or statements that are not relevant in Loki’s scope of applications. This node retains the text of the statement in the original source as-is.
- Parameters:
text (str) – The statement as a string.
**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = None
- class ImplicitStmt(text: str | Tuple[Expression, ...] | None = 'NONE', source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theIMPLICITstatement.- Parameters:
text (str or
Expression, optional) – Either a tuple of variable specifiers or a string; default:NONE**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'IMPLICIT'
- classmethod ensure_str_or_tuple(value)
- class SaveStmt(text: Tuple[Expression, ...] | None = (), source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theSAVEstatement.- Parameters:
text (str or
Expression, optional) – Either a tuple of variable specifiers or a string; default:NONE**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'SAVE'
- classmethod ensure_tuple(value)
- class PublicStmt(text: Tuple[Expression, ...] | None = (), source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents thePUBLICspecifier.- Parameters:
text (str or tuple of
Expression, optional) – Either a tuple of variable specifiers or a string; default:NONE**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'PUBLIC'
- classmethod ensure_tuple(value)
- class PrivateStmt(text: Tuple[Expression, ...] | None = (), source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents thePRIVATEspecifier.- Parameters:
text (str or tuple of
Expression, optional) – Either a tuple of variable specifiers or a string; default:NONE**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'PRIVATE'
- classmethod ensure_tuple(value)
- class CommonStmt(text: Tuple[Expression, ...], source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theCOMMONspecifier.- Parameters:
text (str or tuple of
Expression, optional) – Either a tuple of variable specifiers or a string; default:NONE**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'COMMON'
- classmethod ensure_tuple(value)
- class ContainsStmt(text: None = None, source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theCONTAINSspecifier.- Parameters:
**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'CONTAINS'
- class ReturnStmt(text: None = None, source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theRETURNspecifier.- Parameters:
**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'RETURN'
- class CycleStmt(text: None = None, source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theCYCLEspecifier.- Parameters:
**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'CYCLE'
- class ContinueStmt(text: None = None, source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theCONTINUEspecifier.- Parameters:
**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'CONTINUE'
- class StopStmt(text: None = None, source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theSTOPspecifier.- Parameters:
**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'STOP'
- class GotoStmt(text: str, source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theGO TOspecifier.- Parameters:
**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'GO TO'
- class PrintStmt(text: Tuple[Expression, ...], source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents thePRINTspecifier.- Parameters:
text (str or tuple of
Expression, optional) – Either a tuple of variable specifiers or a string; default:NONE**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'PRINT'
- classmethod ensure_tuple(value)
- class FormatStmt(text: Tuple[Expression, ...] | None = (), source: Source | str | None = None, label: str | None = None)
Bases:
GenericStmtGenericStmtnode that represents theFORMATspecifier.- Parameters:
text (str or tuple of
Expression, optional) – Either a tuple of variable specifiers or a string; default:NONE**kwargs (optional) – Other parameters that are passed on to the parent class constructor.
- keyword = 'FORMAT'
- classmethod ensure_tuple(value)