ArkTS support added#988
Open
sadicelik wants to merge 1 commit into
Open
Conversation
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.
ArkTS (HarmonyOS / OpenHarmony) language support
Summary
Adds first-class extraction support for ArkTS (
.ets), the TypeScriptsuperset used to build HarmonyOS / OpenHarmony apps. ArkTS's headline feature
is declarative UI — an
@Component structwith abuild()method thatdescribes the view tree, plus
@State/@Prop/@Linkreactive props andglobal
@Builder/@Extend/@Stylesfunctions. A plain TypeScript grammarparses these constructs as
ERRORnodes, so ArkTS needs its own grammar andextractor.
Tests
__tests__/extraction.test.tsgains anArkTS Extractionsuite covering:.ets→arkts,.ts→typescript) andisLanguageSupported/getSupportedLanguages.@Component structextracted as acomponentnode with@Entry/@Componentdecorators.
build()and component methods extracted with qualified names(
Index::aboutToAppear,Index::load).@State/@Propmembers extracted as properties with their declared typesand decorators.
this.load()) resolved.method signatures) still extract.
@Builderfunctions extracted with signature and decorator.Build / packaging
The new
tree-sitter-arkts.wasmis copied intodist/bycopy-assetslikeevery other vendored grammar — no other build changes.
Notes
Million-mo/tree-sitter-arktsv0.1.7 (ABI-15 prebuilt wasm).reactive runtime is not part of this PR — extraction only.