Skip to content

feat: multi-language code parsing and XML support (v3.6.0) - #22

Merged
lyonzin merged 1 commit into
masterfrom
feat/multi-language-parsers
Apr 23, 2026
Merged

lyonzin merged 1 commit into
masterfrom
feat/multi-language-parsers

Conversation

@lyonzin

@lyonzin lyonzin commented Apr 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Multi-language code parsing: C (.c), C++ (.cpp/.h), JavaScript (.js/.jsx), TypeScript (.ts/.tsx) with per-language regex extraction of functions, classes/structs/interfaces, imports/includes
  • XML parser (.xml) with root element and namespace metadata extraction
  • All 8 new formats default enabled — no config change needed
  • Code parser now reports correct language metadata per file type (was hardcoded to "python" for all code files including .mqh/.mq4)
  • Version bump 3.5.2 → 3.6.0

Changes

File What changed
mcp_server/ingestion.py LANGUAGE_PROFILES constant, language-aware _parse_code, new _parse_xml, dispatch table updated
mcp_server/config.py _SUPPORTED_SUFFIXES + supported_formats default + fallback list
config.example.yaml New extensions added with comments
presets/developer.yaml All code formats enabled
presets/cybersecurity.yaml C/C++/XML enabled
tests/conftest.py 5 new fixtures: sample_c, sample_cpp, sample_js, sample_ts, sample_xml
tests/test_ingestion.py 12 new tests including Python regression guard
tests/test_config.py 2 new tests for format validation
README.md Format table 12→20, changelog v3.6.0
pyproject.toml Version 3.6.0

Safety

  • Zero regression: Python _parse_code uses character-identical regex patterns via LANGUAGE_PROFILES[".py"]
  • Explicit regression guard: test_python_parse_unchanged validates Python output is identical
  • All existing tests pass unmodified: 94/94
  • Ruff lint + format: clean

Test plan

  • All 94 tests pass (28 existing + 66 from other test files + new)
  • Ruff lint clean
  • Ruff format clean
  • CI matrix (Python 3.11 + 3.12, Ubuntu + Windows)
  • Release v3.6.0 to validate full pipeline (PyPI + NPM + Docker)

Add language-aware code parsing for C, C++, JavaScript, TypeScript
with per-language function/class/import extraction via regex profiles.
Add XML parser with root element and namespace metadata extraction.
All 8 new formats default enabled. Bump version to 3.6.0.
@lyonzin
lyonzin merged commit 79276b4 into master Apr 23, 2026
5 checks passed
@lyonzin
lyonzin deleted the feat/multi-language-parsers branch April 23, 2026 23:44
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