From b5259e6adaefa4ea2d3b44e2b0f1bcec3dd8e9b5 Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Sat, 26 Jul 2014 16:38:15 +0200 Subject: [PATCH] Directive type is now a Token data member. --- source/dyaml/token.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/dyaml/token.d b/source/dyaml/token.d index 4fbd75f..44c29a6 100644 --- a/source/dyaml/token.d +++ b/source/dyaml/token.d @@ -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.