pub enum Scope {
Show 29 variants
Comment,
ConstantNumber,
ConstantChar,
ConstantLanguage,
ConstantOther,
NameFunction,
NameType,
NameTag,
NameSection,
Invalid,
Deprecated,
StorageType,
StorageModifier,
StringQuoted,
StringEvaluated,
StringRegex,
StringOther,
SupportFunction,
SupportType,
SupportConstant,
SupportVar,
SupportOther,
VariableParameter,
VariableLanguage,
VariableOther,
KeywordControl,
KeywordOperator,
KeywordOther,
None,
}
Expand description
The scope of a token.
Variants§
Comment
A comment token, such as:
// Hello, world!
/* Hello, world! */
<!-- Hello, world! -->
ConstantNumber
A numeric constant token.
1234;
1.3f32;
0x42;
ConstantChar
A character constant token.
'A';
ConstantLanguage
A language constant token.
true;
false;
nullptr
nil
ConstantOther
Any other constant.
NameFunction
A function name token.
main();
NameType
A type name token.
typedef struct Name {
int member;
} Name;
NameTag
The name of a tag.
<name></name>
NameSection
The name of a tag.
## Header
\chapter{Chapter}
Invalid
An invalid token.
Deprecated
A deprecated case.
StorageType
A storage type keyword, such as class
, function
or var
.
class MyClass {
public:
// ...
}
fn main() {
println!("Hello, world!");
}
StorageModifier
A storage modifier keyword, such as static
, mut
, final
, etc.
StringQuoted
A quoted string token.
StringEvaluated
A string that is evaluated, such as JavaScript template strings.
StringRegex
A regex string.
/([a-zA-Z])+/g
StringOther
Any other kind of string.
SupportFunction
A function provided by the language or standard library.
SupportType
A type (class, struct, etc.) provided by the language or standard library.
SupportConstant
A constant provided by the language or standard library.
SupportVar
A variable provided by the language or standard library.
SupportOther
Any other supporting value.
VariableParameter
A variable declared as a function parameter.
VariableLanguage
A special variable such as super
or this
.
VariableOther
Any other variable names.
KeywordControl
A controlling keyword, such as if
, break
, return
, while
, etc.
KeywordOperator
An operator keyword, such as instanceof
, as
, instance
, or
, etc.
KeywordOther
An other keyword.
None
No scope matches this token.