Do not push a final spurious command separators when parsing commands

Fixes #1336
This commit is contained in:
Maxime Coste 2017-05-08 11:46:03 +01:00
parent ad1175fefc
commit 6a97455b3b

View File

@ -351,7 +351,7 @@ TokenList parse(StringView line)
result.emplace_back(Token::Type::Raw, start, reader.pos, result.emplace_back(Token::Type::Raw, start, reader.pos,
coord, unescape(str, "%", '\\')); coord, unescape(str, "%", '\\'));
if (not reader or is_command_separator(*reader)) if (reader and is_command_separator(*reader))
result.emplace_back(Token::Type::CommandSeparator, result.emplace_back(Token::Type::CommandSeparator,
reader.pos, reader.pos+1, coord); reader.pos, reader.pos+1, coord);
} }