feat: add MQL5 language support (.mq5 / .mqh)#1017
Open
cfournel wants to merge 1 commit into
Open
Conversation
Adds MQL5 (.mq5 / .mqh / .mql5) as a supported language using the tree-sitter-mql5 grammar (https://www.npmjs.com/package/tree-sitter-mql5), vendored as a WASM binary in src/extraction/wasm/. Follows the per-language-file architecture introduced in colbymchenry#116: - src/extraction/languages/mql5.ts — LanguageExtractor config - Registered in languages/index.ts barrel - WASM entry + extension map + display name in grammars.ts - 'mql5' added to the LANGUAGES tuple in types.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
sorry for the late PR, i ve been busy for weeks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.mq5,.mqh, and.mql5files.tree-sitter-mql5(published by me, the requester in Cookbook to add another language support #55 / Tracking: language support requests (post-1.0 roadmap) #648).src/extraction/languages/mql5.ts, registered in the barrel, with entries ingrammars.ts(WASM map, extension map, custom-wasm path, display name) andtypes.ts(LANGUAGES tuple).Grammar provenance
The bundled
tree-sitter-mql5.wasmwas built from the published npm packagetree-sitter-mql5usingnpx tree-sitter build --wasm. MQL5's grammar shares Pascal-like node types (declProc,declClass,declIntf,exprCall, etc.), so the extractor closely mirrors the existing Pascal extractor.Test plan
codegraph indexon a MetaTrader 5 project directory indexes.mq5/.mqhfiles and emitsfunction,class,method,enum, andtype_aliasnodes.codegraph query <symbol>resolves MQL5 symbols.tsc --noEmit).npm test).Relates to #55, #648.
🤖 Generated with Claude Code