fix: parse negative annotation coordinates#494
Conversation
Symptom: `@position(-150, -210)` parsed without errors, but the stored coordinates became `(0, 0)`. Re-executing described microflows then moved activities whose canvas coordinates were negative. Root cause: annotation parameters allow expressions, so a leading minus is parsed as a unary expression rather than a `NUMBER_LITERAL`. The annotation integer helper only read direct numeric literals and silently fell back to zero for unary-negative values. Fix: parse the raw annotation parameter text as an integer before falling back to the literal-only path, preserving both positive and negative integer coordinates without evaluating arbitrary expressions. Tests: added a synthetic microflow visitor test for negative `@position` coordinates; `make build`; `make lint-go`; `make test`.
Review: fix: parse negative annotation coordinatesVerdict: Approve What the PR doesFixes issue #493: The fix calls No blockersMinor observationThe Positive notes
|
Closes #493.
Summary
@position(-150, -210)Validation
go test ./mdl/visitor -run 'NegativeCoordinates|PositionAnnotation' -vmake buildmake lint-gomake test