Allow empty default string values

This commit is contained in:
King_DuckZ 2020-02-18 11:53:04 +01:00
parent d97cf03a34
commit 5de2dfbe70

View file

@ -45,7 +45,7 @@ namespace duck::sl {
source_info = ((url | string("-")) >> attr(SourceInfo::URL)) | (mustache_like_token >> attr(SourceInfo::Token)); source_info = ((url | string("-")) >> attr(SourceInfo::URL)) | (mustache_like_token >> attr(SourceInfo::Token));
url = -(+alpha >> string("://")) >> alpha >> *graph; url = -(+alpha >> string("://")) >> alpha >> *graph;
mustache_like_token = "{{" >> identifier >> "}}"; mustache_like_token = "{{" >> identifier >> "}}";
quoted_string %= lexeme['"' >> +(char_ - '"') >> '"']; quoted_string %= lexeme['"' >> *(char_ - '"') >> '"'];
xpath_assignment %= identifier >> xpath_assignment %= identifier >>
-(lit("default") >> '(' >> quoted_string >> ')') >> "=" >> -(lit("default") >> '(' >> quoted_string >> ')') >> "=" >>
as_string[lexeme[+(graph | char_(" \t"))]]; as_string[lexeme[+(graph | char_(" \t"))]];