Directive type is now a Token data member.
This commit is contained in:
parent
3ae7c713ef
commit
b5259e6ada
|
@ -81,6 +81,9 @@ struct Token
|
||||||
// 1B
|
// 1B
|
||||||
/// Encoding, if this is a stream start token.
|
/// Encoding, if this is a stream start token.
|
||||||
Encoding encoding;
|
Encoding encoding;
|
||||||
|
// 1B
|
||||||
|
/// Type of directive for directiveToken.
|
||||||
|
DirectiveType directive;
|
||||||
// 4B
|
// 4B
|
||||||
/// Used to split value into 2 substrings for tokens that need 2 values (tagToken)
|
/// Used to split value into 2 substrings for tokens that need 2 values (tagToken)
|
||||||
uint valueDivider;
|
uint valueDivider;
|
||||||
|
@ -144,7 +147,8 @@ alias simpleToken!(TokenID.FlowEntry) flowEntryToken;
|
||||||
Token simpleValueToken(TokenID id)(const Mark start, const Mark end, const string value,
|
Token simpleValueToken(TokenID id)(const Mark start, const Mark end, const string value,
|
||||||
const uint valueDivider = uint.max)
|
const uint valueDivider = uint.max)
|
||||||
{
|
{
|
||||||
return Token(value, start, end, id, ScalarStyle.Invalid, Encoding.init, valueDivider);
|
return Token(value, start, end, id, ScalarStyle.Invalid, Encoding.init,
|
||||||
|
DirectiveType.init, valueDivider);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Alias for construction of tag token.
|
/// Alias for construction of tag token.
|
||||||
|
|
Loading…
Reference in a new issue