|
|
@@ -7,17 +7,17 @@ file_extensions:
|
|
|
scope: source.nbt
|
|
|
contexts:
|
|
|
main:
|
|
|
- - match: \b(per|to|let|fn|dimension|unit|use|long|short|both|none|print|assert|assert_eq|type|if|then|else|true|false)\b
|
|
|
+ - match: \b(per|to|let|fn|dimension|unit|use|struct|long|short|both|none|if|then|else|true|false|print|assert|assert_eq|type)\b
|
|
|
scope: keyword.control.nbt
|
|
|
- match: '#(.*)'
|
|
|
scope: comment.line.nbt
|
|
|
+ - match: \b([0-9][0-9_]*(\.[0-9][0-9_]*)?(e[+\-]?[0-9]+)?|0b[01]+|0o[0-7]+|0x[0-9a-fA-F]+|NaN|inf)\b
|
|
|
+ scope: constant.numeric.nbt
|
|
|
- match: \b([A-Z][a-zA-Z]*)\b
|
|
|
scope: storage.type.nbt
|
|
|
- match: \b([a-z][a-zA-Z_0-9]*)\b
|
|
|
scope: variable.other.nbt
|
|
|
- - match: \b([0-9]+(\.[0-9]+)?)\b
|
|
|
- scope: constant.numeric.nbt
|
|
|
- - match: '(@aliases(\_short)?|@metric_prefixes|@binary_prefixes)'
|
|
|
+ - match: '(@aliases|@metric_prefixes|@binary_prefixes|@name|@url)'
|
|
|
scope: meta.annotation.attribute.nbt
|
|
|
- match: '[+\-/*=\^:<>·×÷²³]'
|
|
|
scope: keyword.operator.nbt
|