pineforge-codegen 1.6.3__py3-none-any.whl → 1.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pineforge_codegen/__init__.py +6 -1
- pineforge_codegen/codegen/base.py +561 -5
- pineforge_codegen/codegen/capabilities.py +8 -0
- pineforge_codegen/codegen/checked_settings.py +13 -1
- pineforge_codegen/codegen/collection_history.py +95 -9
- pineforge_codegen/codegen/emit_top.py +141 -14
- pineforge_codegen/codegen/graph_journal.py +540 -0
- pineforge_codegen/codegen/helpers.py +22 -8
- pineforge_codegen/codegen/history_sharing.py +222 -0
- pineforge_codegen/codegen/host_members.py +1 -0
- pineforge_codegen/codegen/id_sites.py +260 -0
- pineforge_codegen/codegen/input.py +70 -7
- pineforge_codegen/codegen/security.py +706 -56
- pineforge_codegen/codegen/tables.py +160 -33
- pineforge_codegen/codegen/types.py +13 -1
- pineforge_codegen/codegen/visit_call.py +35 -32
- pineforge_codegen/codegen/visit_expr.py +26 -1
- pineforge_codegen/codegen/visit_stmt.py +15 -11
- pineforge_codegen/collection_history.py +1 -1
- pineforge_codegen/cpp_allowlist.py +3 -3
- pineforge_codegen/diagnostics_catalog.json +11 -2
- pineforge_codegen/lexer.py +62 -2
- pineforge_codegen/parser.py +76 -14
- pineforge_codegen/pragmas.py +3 -2
- pineforge_codegen/signatures.py +18 -0
- pineforge_codegen/support_checker.py +14 -10
- {pineforge_codegen-1.6.3.dist-info → pineforge_codegen-1.8.0.dist-info}/METADATA +10 -5
- {pineforge_codegen-1.6.3.dist-info → pineforge_codegen-1.8.0.dist-info}/RECORD +31 -28
- {pineforge_codegen-1.6.3.dist-info → pineforge_codegen-1.8.0.dist-info}/WHEEL +1 -1
- {pineforge_codegen-1.6.3.dist-info → pineforge_codegen-1.8.0.dist-info}/entry_points.txt +0 -0
- {pineforge_codegen-1.6.3.dist-info → pineforge_codegen-1.8.0.dist-info}/licenses/LICENSE +0 -0
pineforge_codegen/__init__.py
CHANGED
|
@@ -26,11 +26,14 @@ def _parse_bounded(pine_source: str, filename: str, budget: TimeBudget | None =
|
|
|
26
26
|
ensure_recursion_headroom()
|
|
27
27
|
check_source_size(pine_source, filename)
|
|
28
28
|
budget = budget or TimeBudget(filename)
|
|
29
|
+
# Normalize once before the pre-pass; all stages use the lexer's text.
|
|
30
|
+
lexer = Lexer(pine_source, filename=filename, budget=budget)
|
|
31
|
+
pine_source = lexer.source
|
|
29
32
|
pragmas = extract_pf_trace_pragmas(
|
|
30
33
|
pine_source, filename=filename, budget=budget,
|
|
31
34
|
)
|
|
32
35
|
budget.check(phase=Phase.LEXER)
|
|
33
|
-
tokens =
|
|
36
|
+
tokens = lexer.tokenize()
|
|
34
37
|
budget.check(phase=Phase.LEXER)
|
|
35
38
|
ast = Parser(tokens, source=pine_source, filename=filename,
|
|
36
39
|
budget=budget).parse()
|
|
@@ -170,6 +173,8 @@ def transpile_full(pine_source: str, *, check_support: bool = True,
|
|
|
170
173
|
``min`` / ``max`` / ``step`` / ``options`` (omitted when the
|
|
171
174
|
corresponding signature argument is absent or is not a literal the
|
|
172
175
|
receipt holds); an ``input.symbol`` entry also has ``kind: "symbol"``.
|
|
176
|
+
An ``input.color`` has ``type: "color"`` and an unsigned packed
|
|
177
|
+
``0xAARRGGBB`` integer default when its color expression is literal-foldable.
|
|
173
178
|
See :meth:`CodeGen.extract_input_manifest`.
|
|
174
179
|
- ``strategyParams``: the literal ``strategy(...)`` kwargs the analyzer
|
|
175
180
|
surfaced (e.g. ``initial_capital``, ``pyramiding``).
|