From 5dbbc1fb1a76dd58e243d8998ae0a0faa619d324 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Thu, 6 Dec 2018 19:53:49 +0900 Subject: [PATCH] add escaped newline to lexer for multiline string to use it in parse_ml_basic_string --- toml/lexer.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/toml/lexer.hpp b/toml/lexer.hpp index 42e90ad..c025d81 100644 --- a/toml/lexer.hpp +++ b/toml/lexer.hpp @@ -137,10 +137,15 @@ using lex_ml_basic_unescaped = exclude, character<0x5C>, character<0x7F>, lex_ml_basic_string_delim>>; + +using lex_ml_basic_escaped_newline = sequence< + lex_escape, maybe, lex_newline, + repeat, unlimited>>; + using lex_ml_basic_char = either; using lex_ml_basic_body = repeat, - lex_newline>>, unlimited>; + lex_ml_basic_escaped_newline>, + unlimited>; using lex_ml_basic_string = sequence;