Add annotations support for files with semicolon comments#263
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Adds support for Configuration Wizard annotations in files that use semicolon (;) line comments (commonly seen in assembly sources), by making the parser/tokenizer/value-edit logic aware of the active line-comment prefix and updating detection logic and tests accordingly.
Changes:
- Introduced a shared
comment-styledefinition ('//'vs';') and threaded the selected prefix through parsing/tokenization and edit generation. - Updated the parser to auto-detect the comment prefix from the start marker line, and propagate it through the parsed item tree.
- Extended the annotation checker (and tests) to recognize semicolon-prefixed wizard start markers.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/views/config-wizard/parser/tokenizer.ts | Makes annotation tokenization prefix-aware via a configurable line comment prefix. |
| src/views/config-wizard/parser/tokenizer.test.ts | Adds coverage for semicolon-prefixed tokenization. |
| src/views/config-wizard/parser/rw-value.ts | Makes comment detection/edit generation prefix-aware for value read/write operations. |
| src/views/config-wizard/parser/parser.ts | Detects the comment prefix from wizard markers and parses annotations using that prefix. |
| src/views/config-wizard/parser/gui-tree.test.ts | Adds integration tests for parsing semicolon marker files and semicolon-based block comment edits. |
| src/views/config-wizard/parser/cw-string.ts | Passes the detected comment prefix into RwValue for string values. |
| src/views/config-wizard/parser/cw-option.ts | Passes the detected comment prefix into RwValue for option read/write paths. |
| src/views/config-wizard/parser/cw-item.ts | Stores and propagates the active line comment prefix across the parsed item tree. |
| src/views/config-wizard/parser/cw-heading.ts | Passes the detected comment prefix into RwValue for heading enable read/write logic. |
| src/views/config-wizard/parser/cw-comment.ts | Uses the detected comment prefix when generating edits to (un)comment blocks. |
| src/views/config-wizard/parser/comment-style.ts | New shared definitions for supported line comment prefixes and defaults. |
| src/utils/config-wizard-annotation-checker.ts | Extends wizard marker detection regex to accept ;-prefixed markers. |
| src/utils/config-wizard-annotation-checker.test.ts | Adds tests for semicolon marker detection within/outside the scan limit. |
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (10)
🛟 Help
|

Fixes
#262
Changes
Screenshots
Checklist