Let's the expander look for tokens from start. (#1293)

This commit is contained in:
Andrés N. Robalino 2020-01-28 01:03:28 -05:00 committed by GitHub
parent caa6830184
commit f20a4a42e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,8 @@ pub fn parse_command_tail(
Ok((pos, flag)) => {
let result = expand_flag(tail, *syntax_type, flag, pos);
tail.move_to(0);
match result {
Ok(expr) => {
named.insert_mandatory(name, expr);
@ -78,6 +80,8 @@ pub fn parse_command_tail(
Ok(Some((pos, flag))) => {
let result = expand_flag(tail, *syntax_type, flag, pos);
tail.move_to(0);
match result {
Ok(expr) => {
named.insert_optional(name, Some(expr));