Make control token modifier less ambiguous

In textmate, keyword.control is used for all kinds of things; in fact,
the default scope mapping for keyword is keyword.control!

So let's add a less ambiguous controlFlow modifier

See Microsoft/vscode#94367
This commit is contained in:
Aleksey Kladov
2020-04-05 14:46:07 +02:00
parent 6207ac90da
commit 48bc0ca745
5 changed files with 9 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ pub(crate) const TYPE_ALIAS: SemanticTokenType = SemanticTokenType::new("typeAli
pub(crate) const UNION: SemanticTokenType = SemanticTokenType::new("union");
pub(crate) const CONSTANT: SemanticTokenModifier = SemanticTokenModifier::new("constant");
pub(crate) const CONTROL: SemanticTokenModifier = SemanticTokenModifier::new("control");
pub(crate) const CONTROL_FLOW: SemanticTokenModifier = SemanticTokenModifier::new("controlFlow");
pub(crate) const MUTABLE: SemanticTokenModifier = SemanticTokenModifier::new("mutable");
pub(crate) const UNSAFE: SemanticTokenModifier = SemanticTokenModifier::new("unsafe");
@@ -56,7 +56,7 @@ pub(crate) const SUPPORTED_MODIFIERS: &[SemanticTokenModifier] = &[
CONSTANT,
MUTABLE,
UNSAFE,
CONTROL,
CONTROL_FLOW,
];
#[derive(Default)]