Add Mojo language wiring#939
Draft
aaiyer wants to merge 2 commits into
Draft
Conversation
b8e3577 to
5d785b0
Compare
Signed-off-by: Anand Aiyer <aaiyer@gmail.com>
5d785b0 to
222e97a
Compare
Signed-off-by: Anand Aiyer <aaiyer@gmail.com>
Owner
|
Thanks for picking up Mojo wiring. Triage: draft language-support PR, backlog priority. Before review can proceed, please remove or fully justify the unrelated vendored/nomic/code_vectors_blob.S change. Mojo language wiring should not include an unrelated vendored/generated blob. Once that is gone, review can focus on the expected pieces: extension mapping, language spec wiring, user-config alias, and grammar regression coverage. |
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
Adds the missing Mojo language wiring now that a Mojo tree-sitter grammar is vendored in the C backend.
Root Cause
The repository includes
tree_sitter_mojo, but the language was not reachable through the normal discovery/indexing path:CBM_LANG_MOJOenum entry.mojoextension mappingCBMLangSpecrow for Mojo parser/query node typesAs a result,
.mojofiles did not produce Mojo symbols during indexing.Changes
CBM_LANG_MOJO..mojofiles to Mojo.mojoto user-config language name lookup.tree_sitter_mojoparser intolang_specswith function, class/trait, call, import, branch, assignment, and module node types.Validation
Result:
218 passed.I also verified the patched backend against a small
.mojosample locally: it indexedfn,struct, and method symbols, and outbound trace found a method calling a top-level function.