#[repr(usize)]pub enum LexerToken {
Show 25 variants
Mark = 0,
NewLine = 4_294_967_263,
ErrorToken = 4_294_967_273,
DirectiveTag = 4_294_967_275,
DirectiveReserved = 4_294_967_276,
DirectiveYaml = 4_294_967_274,
ScalarPlain = 4_294_967_285,
ScalarEnd = 4_294_967_280,
ScalarFold = 4_294_967_284,
ScalarLit = 4_294_967_283,
ScalarSingleQuote = 4_294_967_282,
ScalarDoubleQuote = 4_294_967_281,
AnchorToken = 4_294_967_278,
AliasToken = 4_294_967_277,
TagStart = 4_294_967_279,
SequenceStart = 4_294_967_287,
SequenceStartImplicit = 4_294_967_286,
SequenceEnd = 4_294_967_288,
MappingStart = 4_294_967_290,
MappingStartImplicit = 4_294_967_289,
MappingEnd = 4_294_967_291,
DocumentStart = 4_294_967_293,
DocumentStartExplicit = 4_294_967_292,
DocumentEnd = 4_294_967_295,
DocumentEndExplicit = 4_294_967_294,
}
Expand description
LexerToken
used to Lex YAML files
Variants§
Mark = 0
Denotes that value is a usize less than NewLine and thus its meaning decided by previous Tokens usually marks a start/end token.
NewLine = 4_294_967_263
Denotes a newline and must be followed by a Mark. If next Mark is 0, it’s space otherwise it’s a n
number of newlines \n
ErrorToken = 4_294_967_273
Error in stream, check [Lexer.errors] for details
DirectiveTag = 4_294_967_275
Directive Tag denoted by %TAG
and followed by two Mark tokens
DirectiveReserved = 4_294_967_276
Directive Tag denoted by @value
and followed by two Mark tokens
DirectiveYaml = 4_294_967_274
YAML directive showing minor/major version of e.g.
%YAML 1.2
ScalarPlain = 4_294_967_285
Plain Scalar that’s neither quoted or literal or folded
example: plain_scalar
ScalarEnd = 4_294_967_280
Helper token to end token
ScalarFold = 4_294_967_284
Folded scalar token
example: >
folded_scalar
ScalarLit = 4_294_967_283
Literal scalar token
example: |
literal_scalar
ScalarSingleQuote = 4_294_967_282
Single quoted scalar
example: 'single quote scalar'
ScalarDoubleQuote = 4_294_967_281
Double quoted scalar
example: "double quote scalar"
AnchorToken = 4_294_967_278
Element with alternative name e.g. &foo [x,y]
AliasToken = 4_294_967_277
Reference to an element with alternative name e.g. *foo
TagStart = 4_294_967_279
Tag
SequenceStart = 4_294_967_287
Start of a sequence token, e.g. [
in
[a, b, c]
#^-- start of sequence
SequenceStartImplicit = 4_294_967_286
Start of a sequence token, e.g. [
in
[a, b, c]
#^-- start of sequence
SequenceEnd = 4_294_967_288
End of a sequence token, e.g. ]
in
[a, b, c]
# ^-- end of sequence
MappingStart = 4_294_967_290
Start of a map token, e.g. {
in
{ a: b,}
#^-- start of mapping
MappingStartImplicit = 4_294_967_289
Start of a map token, e.g. {
in
[a]: 3
#^-- start of mapping
MappingEnd = 4_294_967_291
End of a map token, e.g. }
in
{ a: b}
# ^-- start of mapping
DocumentStart = 4_294_967_293
Start of implicit Document
DocumentStartExplicit = 4_294_967_292
Start of explicit Document
DocumentEnd = 4_294_967_295
End of implicit document.
DocumentEndExplicit = 4_294_967_294
End of explicit document.
Trait Implementations§
Source§impl Clone for LexerToken
impl Clone for LexerToken
Source§fn clone(&self) -> LexerToken
fn clone(&self) -> LexerToken
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more