From 5b5ece6c320d4ec9ba1021ff3ec5f0f2abf72e96 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Wed, 4 Sep 2019 18:10:15 +0900 Subject: [PATCH] fix: add "unreleased" flag to raw-tab-in-string --- toml/lexer.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/toml/lexer.hpp b/toml/lexer.hpp index 95c9051..978dc5f 100644 --- a/toml/lexer.hpp +++ b/toml/lexer.hpp @@ -125,10 +125,17 @@ using lex_local_time = lex_partial_time; // =========================================================================== using lex_quotation_mark = character<'"'>; +#ifdef TOML11_USE_UNRELEASED_TOML_FEATURES using lex_basic_unescaped = exclude, // 0x09 (tab) in_range<0x0a, 0x1F>, // is allowed character<0x22>, character<0x5C>, character<0x7F>>>; +#else +using lex_basic_unescaped = exclude, + character<0x22>, character<0x5C>, + character<0x7F>>>; + +#endif using lex_escape = character<'\\'>; using lex_escape_unicode_short = sequence, repeat>>; @@ -148,11 +155,18 @@ using lex_basic_string = sequence; using lex_ml_basic_string_delim = repeat>; +#ifdef TOML11_USE_UNRELEASED_TOML_FEATURES using lex_ml_basic_unescaped = exclude, // 0x09 in_range<0x0a, 0x1F>, // is tab character<0x5C>, character<0x7F>, lex_ml_basic_string_delim>>; +#else // TOML v0.5.0 +using lex_ml_basic_unescaped = exclude, + character<0x5C>, + character<0x7F>, + lex_ml_basic_string_delim>>; +#endif using lex_ml_basic_escaped_newline = sequence< lex_escape, maybe, lex_newline,