Skip to content

Validate labels in generated LS output - #71

Open
robotbitdev wants to merge 1 commit into
kobbled:masterfrom
robotbitdev:master
Open

Validate labels in generated LS output#71
robotbitdev wants to merge 1 commit into
kobbled:masterfrom
robotbitdev:master

Conversation

@robotbitdev

Copy link
Copy Markdown
Contributor

Add label validation for generated LS to catch undefined or duplicate LBL[n] usages. Introduce TPPlus::LabelValidator and TPPlus::LabelValidationError (lib/tp_plus/label_validator.rb) that scan motion sections for direct label references and definitions. Track and preserve label names from inlined scopes in Interpreter (reset/merge/label_names_by_number) and call validation from bin/tpp and Function#to_ls so programs and inline outputs are checked before writing. Add tests covering validator behavior and inline-name preservation.

Add label validation for generated LS to catch undefined or duplicate LBL[n] usages. Introduce TPPlus::LabelValidator and TPPlus::LabelValidationError (lib/tp_plus/label_validator.rb) that scan motion sections for direct label references and definitions. Track and preserve label names from inlined scopes in Interpreter (reset/merge/label_names_by_number) and call validation from bin/tpp and Function#to_ls so programs and inline outputs are checked before writing. Add tests covering validator behavior and inline-name preservation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant