Directive type is now a Token data member.

This commit is contained in:
Ferdinand Majerech 2014-07-26 16:38:15 +02:00
parent 3ae7c713ef
commit b5259e6ada

View file

@ -81,6 +81,9 @@ struct Token
// 1B
/// Encoding, if this is a stream start token.
Encoding encoding;
// 1B
/// Type of directive for directiveToken.
DirectiveType directive;
// 4B
/// Used to split value into 2 substrings for tokens that need 2 values (tagToken)
uint valueDivider;
@ -144,7 +147,8 @@ alias simpleToken!(TokenID.FlowEntry) flowEntryToken;
Token simpleValueToken(TokenID id)(const Mark start, const Mark end, const string value,
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.