Skip to content

Commit fcee44f

Browse files
committed
fix(parser): handle UTF-8 character boundaries in TypeScript visibility checks
- added safe_substring_window() utility for UTF-8-safe string slicing - TypeScript parser now uses safe utility instead of raw byte slicing - prevents panic when checking export modifiers before Unicode characters - handles box-drawing characters, emojis, and other multi-byte sequences - utility available to all language parsers through parsing module Fixes #38
1 parent 745a6f1 commit fcee44f

28 files changed

Lines changed: 161 additions & 26 deletions

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.5.17] - 2025-09-29
9+
10+
### Changed
11+
- Refactored relationship compatibility logic from indexer to language behaviors
12+
- Moved `is_compatible_relationship` from SimpleIndexer to ResolutionScope trait
13+
- Each language now controls its own relationship validation rules
14+
- Cleaner separation between orchestration and language-specific logic
15+
16+
### Fixed
17+
- UTF-8 character boundary parsing error when encountering Unicode characters
18+
- Added `safe_substring_window()` utility for UTF-8-safe string slicing
19+
- TypeScript parser now handles box-drawing characters and emojis correctly
20+
- Prevents panic when checking for export modifiers before symbols
21+
- Fixes Issue #38
22+
823
## [0.5.16] - 2025-09-28
924

1025
### Added

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codanna"
3-
version = "0.5.16"
3+
version = "0.5.17"
44
authors = ["Angel Bartolli <bartolli@gmail.com>"]
55
edition = "2024"
66
description = "Code Intelligence for Large Language Models"

contributing/parsers/c/AUDIT_REPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# C Parser Coverage Report
22

3-
*Generated: 2025-09-28 21:21:50 UTC*
3+
*Generated: 2025-09-29 13:24:54 UTC*
44

55
## Summary
66
- Nodes in file: 145

contributing/parsers/c/GRAMMAR_ANALYSIS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# C Grammar Analysis
22

3-
*Generated: 2025-09-28 21:21:50 UTC*
3+
*Generated: 2025-09-29 13:24:54 UTC*
44

55
## Statistics
66
- Total nodes in grammar JSON: 132

contributing/parsers/c/node_discovery.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=== C Language ABI-15 COMPREHENSIVE NODE MAPPING ===
2-
Generated: 2025-09-28 21:21:50 UTC
2+
Generated: 2025-09-29 13:24:54 UTC
33
ABI Version: 15
44
Node kind count: 145
55

contributing/parsers/cpp/AUDIT_REPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# C++ Parser Coverage Report
22

3-
*Generated: 2025-09-28 21:21:50 UTC*
3+
*Generated: 2025-09-29 13:24:54 UTC*
44

55
## Summary
66
- Nodes in file: 131

contributing/parsers/cpp/GRAMMAR_ANALYSIS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# C++ Grammar Analysis
22

3-
*Generated: 2025-09-28 21:21:50 UTC*
3+
*Generated: 2025-09-29 13:24:54 UTC*
44

55
## Statistics
66
- Total nodes in grammar JSON: 223

contributing/parsers/cpp/node_discovery.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=== C++ Language ABI-15 COMPREHENSIVE NODE MAPPING ===
2-
Generated: 2025-09-28 21:21:50 UTC
2+
Generated: 2025-09-29 13:24:54 UTC
33
ABI Version: 14
44
Node kind count: 131
55

contributing/parsers/go/AUDIT_REPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Go Parser Symbol Extraction Coverage Report
22

3-
*Generated: 2025-09-28 21:21:50 UTC*
3+
*Generated: 2025-09-29 13:24:54 UTC*
44

55
## Summary
66
- Nodes in file: 115

0 commit comments

Comments
 (0)