pyfcstm.diagnostics.analyzers.const_fold
Constant-folding diagnostics for literal-only expressions.
Numeric diagnostic refs are limited to JSON-stable values so Python and jsfcstm agree on values that cross the JSON boundary.
ConstValue
- pyfcstm.diagnostics.analyzers.const_fold.ConstValue = typing.Any
Special type indicating an unconstrained type.
Any is compatible with every type.
Any assumed to have all methods.
All values assumed to be instances of Any.
Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance or class checks.
fold_numeric_expression
fold_condition_expression
collect_const_fold_warnings
- pyfcstm.diagnostics.analyzers.const_fold.collect_const_fold_warnings(machine: StateMachine | None) List[ModelDiagnostic][source]
Collect diagnostics that depend on constant folding.