Skip to content

feat: add Vue SFC parsing support#40

Merged
tirth8205 merged 1 commit intomainfrom
feat/vue-sfc-parsing
Mar 20, 2026
Merged

feat: add Vue SFC parsing support#40
tirth8205 merged 1 commit intomainfrom
feat/vue-sfc-parsing

Conversation

@tirth8205
Copy link
Owner

Summary

  • Adds Vue Single File Component (.vue) parsing via tree-sitter
  • Extracts <script> and <script setup> blocks, detects lang="ts" for TypeScript
  • Offsets line numbers correctly within the .vue file
  • Includes parser hardening: recursion depth guard (180) and module cache eviction (15k cap)
  • Updates language count from 12 to 13 across all docs

Test plan

  • tests/test_multilang.py::TestVueParsing — 6 tests covering functions, imports, contains, calls, language tag
  • tests/test_parser.py — Vue-specific tests + recursion depth guard + cache bound tests
  • All 176 existing tests still pass
  • Manual: code-review-graph build on a Vue project

🤖 Generated with Claude Code

- Parse .vue Single File Components by extracting <script> blocks
- Detect lang="ts" attribute to switch between JS/TS parsing
- Offset line numbers to reflect position within .vue file
- Generate TESTED_BY edges for Vue test files
- Add recursion depth guard (_MAX_AST_DEPTH=180) for deeply nested ASTs
- Add module cache bound (_MODULE_CACHE_MAX=15000) to prevent unbounded memory
- Update language count to 13 in docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tirth8205 tirth8205 merged commit 859ebbf into main Mar 20, 2026
8 checks passed
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