Version history from v0.1.0 to this day.
- Fixes issue with constants not allowing digits
const MY_CONST_100: u8 = 1;
const EMyError100: u64 = 2;
- Adds proper, Rust-like support for enums
public enum MyEnum {
First,
MyVariant(u8),
AnotherVariant(u8, u8),
YetAnotherVariant { a: u8, b: u8 },
}
Fixes incorrect syntax in case of _module
suffixed module name in module label.
module example_module::test_module;
public fun say_hello() {}
- Adds support for
match
expression
module example::test_enum {
public enum Sound {
Beep,
Boop,
}
public fun play_sound(sound: Sound) {
match sound {
Sound::Beep => {}
Sound::Boop => {}
}
}
}
- Adds support for module labels
module <addr>::<name>;
- Minor qol improvements
module book::example;
public fun say_hello() {}
- Adds support for literals in annotations
#[test = 1]
- Allows any module member to exist outside of the module block
- Fixes bytestring special character escapes
b"\\"
- Adds underline for `-escaped members in doc comments
- Adds support for positional structs
- Fixes issue with abilities defined before struct fields in positionals
- Adds support for positional structs without abilities
- Fixes issue with function name ending with
_fun
breaking the syntax highlighting - Same applies for a named address ending with
_module
in the module declaration
- Adds support for
macro!
calls in function blocks - Better highlighting in generics and type parameters
- Supports
macro
keyword - Adds
public(package)
- New struct syntax
- Support for
enum
use fun
aliases are now supported
- Loosens visibility modifiers to allow for
public
struct - Adds support for backtick escaped identifiers
- Generalized
mut
to a keyword that can be used in any position - Adds support for
mut
in function signatures - Receiver syntax aliases via
use fun
are now supported
- Module is no longer a top-level requirement, codeblocks now support expressions and state
- Adds support for "move" in codeblocks in VSCode (given that MDX extension is installed)
- Adds support for "move" in markdown codeblocks in VSCode
- Highlights "
,
" comma separator in macros.
module example::test {
#[test, expected_failure(abort_code = sui::kiosk::ENotOwner)]
fun test_borrow() {
// ...
}
}
- Adds "browser" configuration to
package.json
to enable extension in the browser - Fixes issue with macros - extends a set of symbols in the macro to hl expected_failure
module example::test {
#[test]
#[expected_failure(abort_code = 0)]
fun test() {
abort 0
}
}
- Colon
:
used to break macro highlighting
module example::test {
#[test]
#[expected_failure(abort_code = sui::kiosk::ENotOwner)]
fun test_borrow_fail_not_owner() {}
}
- Fixes language configuration for brackets and removes angles from the setting
- Adds typed literal hl for
1u256
,100u16
and300u32
- Now escaped characters are highlighted correctly
- ASCII literal no longer consumes all line
- Adds support for u16, u32 and u256
- Lessens the amount of hl in
use
statement
- adds back
address <name> {}
block
- finally fixed the bug with 'public native' functions
- allows highlighting
public(friend) native entry fun name();
- extends macros, allowing any text inside
- adds
entry
functions - allows import statement inside function body
- fixes the issue with
native public
Fixes highlighting for:
- public native functions (native keyword)
- mutable references in function return values: &mut
- allow #[test] and #[test_only] macros on functions and modules
- add module namespaces highlights
- allow "public native" function hl as well as "native public"
- improve struct type hl in function signatures and structs
- highlight all-uppercase symbols as consts (e.g. MY_CUSTOM_CONST)
- follow Move 1.4 changes, add phantom keyword
- adds support for named addresses
- legacy mentiones of Libra are changed to Diem
friend <mod>;
statement support addedpublic(friend)
andpublic(script)
visibilities added- no more resources, only abilities, this also affects generic constraints:
Examples:
use 0x1::A;
friend A;
struct Token has store, key, copy, drop { /* ... */ }
public(friend) fun do<T: copy> { /* ... */ }
- vscode-mode-ide is now vscode-move-syntax
- recent language features added
- all previous syntaxes left as is
- mvir support removed