- Compile:
npm run compile✅ (Already done) - Launch Extension Host: Press
F5in VS Code - Open Test File:
test-programs/scope-test-suite/UpdatePYAccount_IBSCommon.clw
Check that each END keyword and period terminator has the same color as its opening structure keyword:
Note: Clarion supports two ways to close structures:
ENDkeyword (e.g.,GROUP ... END)- Period
.terminator (e.g.,GROUP ... .)
Both should inherit the color of their parent structure.
| Lines | Structure | Expected Behavior |
|---|---|---|
| 30-34 | GROUP ... END |
GROUP and END should be same color |
| 35-37 | VIEW(IBSDPC) ... END |
VIEW and END should be same color |
| 38-41 | VIEW(BMBankAccount) ... END |
VIEW and END should be same color |
| 42-46 | QUEUE ... END |
QUEUE and END should be same color |
| 47-52 | QUEUE ... END |
QUEUE and END should be same color |
| 164-167 | QUEUE ... END |
QUEUE and END should be same color |
| 55-161 | WINDOW ... END |
WINDOW and END should be same color |
Lines 55-161 contain a WINDOW with nested SHEET/TAB structures:
- WINDOW at line 55 should close at line 161
- Each SHEET within should have matching colors for SHEET...END
- Each TAB within should have matching colors for TAB...END
- All structures should fold properly
Click the fold icons (▼) in the gutter and verify:
- ✅ GROUP structures fold (line 30)
- ✅ VIEW structures fold (lines 35, 38)
- ✅ QUEUE structures fold (lines 42, 47, 164)
- ✅ WINDOW structure folds (line 55)
- ✅ SHEET structures fold (within WINDOW)
- ✅ TAB structures fold (within SHEET)
Try multiple themes to ensure semantic tokens work universally:
- Dark+ (default dark)
- Light+ (default light)
- Monokai
- Solarized Dark
Command: Ctrl+K Ctrl+T → Select theme
- All END keywords had same color (generic keyword color)
- Period terminators had delimiter color (different from structures)
- No visual distinction between
ENDclosing GROUP vs WINDOW vs QUEUE - Visual inconsistency:
GROUPis blue, butENDis generic purple
- Each
ENDand.inherits color from its parent structure:GROUP ... ENDorGROUP ... .→ both GROUP and its terminator same color (e.g., blue)VIEW ... ENDorVIEW ... .→ both VIEW and its terminator same color (e.g., cyan)QUEUE ... ENDorQUEUE ... .→ both QUEUE and its terminator same color (e.g., cyan)WINDOW ... ENDorWINDOW ... .→ both WINDOW and its terminator same color (e.g., magenta)SHEET ... ENDorSHEET ... .→ both SHEET and its terminator same color (e.g., magenta)TAB ... ENDorTAB ... .→ both TAB and its terminator same color (e.g., magenta)
- Orphaned END keywords (no matching structure) remain generic color
- TextMate grammar still provides base coloring for all other tokens
- Semantic tokens only override when explicitly provided
- Check Output panel → "Clarion Language Server"
- Look for semantic token provider initialization
- Reload window:
Ctrl+Shift+P→ "Developer: Reload Window"
- Check that structures are properly recognized (unit tests passing ✅)
- Verify DocumentStructure sets
finishesAtfor END tokens - Check server logs for tokenization errors
- Semantic token generation should be <5ms
- Uses cached tokens from incremental tokenization
- Check CPU usage in VS Code process manager
✅ All 11 unit tests passing (7 Structure Parent + 4 Period Terminator tests) ✅ Compilation successful ✅ Visual verification: END and period colors match structure keywords ✅ Folding works for all structure types ✅ No performance degradation ✅ Works across multiple color themes
server/src/providers/ClarionSemanticTokensProvider.ts(new)server/src/server.ts(semantic tokens registration)server/src/DocumentStructure.ts(parent relationship fix)server/src/tokenizer/TokenPatterns.ts(pattern fixes)server/src/ClarionTokenizer.ts(structure recognition fix)package.json(semantic token contributions)
- If successful → Document in CHANGELOG.md
- Consider merging to main or keeping as experimental branch
- Gather user feedback on visual appearance
- Consider extending to other keyword contexts (IF/END, LOOP/END, etc.)