Add Move language support (Sui, Aptos, Movement)#703
Merged
boyter merged 1 commit intoboyter:masterfrom May 4, 2026
Merged
Conversation
Used by SUI/Aptos/Movement
Owner
|
Thanks for this. Will make the next release. |
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 support for the Move smart-contract language, used by Sui, Aptos, Starcoin, and Movement.
.movefiles are currently silently ignored by scc.A single language definition covers every dialect — Move 2 (Aptos) is a lexical superset of core Move, and Sui only adds the
entrymodifier; no dialect renames or removes a keyword in a way that would confuse a tokenizer.Notable choices:
nestedmultiline: true— Move's lexer (move-compiler/src/parser/lexer.rs) explicitly tracks nested/* /* */ */comments via a stack, like Rust.match(Move 2) andabort— Move's panic primitive, used on every error path.b"..."andx"..."byte/hex string prefixes work transparently because string parsing begins at the".Test plan
go generate ./...regeneratesprocessor/constants.gowith the new entrygo buildcompiles cleanlygo test ./...passes (includingTestSpecificLanguages, which greps CSV output ofexamples/language/)scc examples/language/move.movereports correct counts: 32 lines, 3 comments (nested block correctly counted as one region), complexity 8