From e88842573f9719d06799392045c675f9bf9da61e Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Fri, 25 Jul 2014 03:33:08 +0200 Subject: [PATCH] New Token data member for splitting token value when we need 2 values. --- source/dyaml/token.d | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/dyaml/token.d b/source/dyaml/token.d index 554666e..6ec259b 100644 --- a/source/dyaml/token.d +++ b/source/dyaml/token.d @@ -52,18 +52,27 @@ struct Token { @disable int opCmp(ref Token); + // 16B /// Value of the token, if any. string value; + // 4B /// Start position of the token in file/stream. Mark startMark; + // 4B /// End position of the token in file/stream. Mark endMark; + // 1B /// Token type. TokenID id; + // 1B /// Style of scalar token, if this is a scalar token. ScalarStyle style; + // 1B /// Encoding, if this is a stream start token. Encoding encoding; + // 4B + /// Used to split value into 2 substrings for tokens that need 2 values (tagToken) + uint valueDivider; /// Get string representation of the token ID. @property string idString() @safe pure const {return id.to!string;}