Problem
The TypeScript parser does not track multi-line `/* ... */` block comments. Lines inside block comments that look like function/class definitions get incorrectly parsed as real symbols.
Raised by @sanderdewijs in #87.
Failing Test
```zig
test "issue-113: TypeScript block comments should not produce symbols" {
var arena = std.heap.ArenaAllocator.init(testing.allocator);
defer arena.deinit();
var explorer = Explorer.init(arena.allocator());
try explorer.indexFile("example.ts",
\\/*
\\function fakeFunction() {
\\}
\\class FakeClass {
\\}
\\*/
\\
\\function realFunction() {
\\}
);
var outline = (try explorer.getOutline("example.ts", testing.allocator)) orelse return error.TestUnexpectedResult;
defer outline.deinit();
var fn_count: usize = 0;
for (outline.symbols.items) |sym| {
if (sym.kind == .function) fn_count += 1;
}
// Should only find realFunction
try testing.expectEqual(@as(usize, 1), fn_count);
}
```
Expected
Only realFunction is indexed; symbols inside block comments are ignored.
Fix
Add in_block_comment state tracking to the TypeScript parser.
Problem
The TypeScript parser does not track multi-line `/* ... */` block comments. Lines inside block comments that look like function/class definitions get incorrectly parsed as real symbols.
Raised by @sanderdewijs in #87.
Failing Test
```zig
test "issue-113: TypeScript block comments should not produce symbols" {
var arena = std.heap.ArenaAllocator.init(testing.allocator);
defer arena.deinit();
var explorer = Explorer.init(arena.allocator());
}
```
Expected
Only
realFunctionis indexed; symbols inside block comments are ignored.Fix
Add
in_block_commentstate tracking to the TypeScript parser.