You are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
Repair OpenSCAD range semantics
You are working in a frozen slice of the real openscad_parser source tree at
/app/vendor/openscad_parser. Repair the existing implementation; do not
replace it with a standalone parser, modify vendored metadata, or add/download
dependencies.
OpenSCAD uses [start:step:end] for a three-expression range and [start:end]
for a range whose implicit step is 1.0. The current AST path does not preserve
that contract consistently. Diagnose the PEG-to-AST flow and repair both
existing production modules involved in constructing and rendering
RangeLiteral values:
src/openscad_parser/ast/builder.py
src/openscad_parser/ast/nodes.py
The repaired tree must satisfy all of these behaviors:
Explicit positive, fractional, and descending steps occupy the AST step
field, while the final expression occupies end.
Two-expression ranges retain step = 1.0 and keep their second expression
as end.
String/pretty-print output uses valid [start : step : end] order and can be
parsed again without changing the three semantic fields.
AST dictionary/JSON serialization and deserialization preserve start,
step, and end, including a negative step expression.
Existing scope propagation continues to reach all three range expressions.
After repairing the source, parse /app/cad_models.scad with the public AST
API and write /app/output.json. Use this exact top-level schema:
Include one entry for every assignment in the input file. Derive all values and
rendered strings from the repaired AST; do not hard-code only the example.
Keep the run CPU-only and offline.