fixed heredocs using the same expansion pathway as regular strings
implemented backtick command subs
deferred heredoc expansion until redir time instead of parse time
implemented "$*" expansions
function defs like 'func () { }' now parse correctly
fixed conjunctions short circuiting instead of skipping
This commit is contained in:
@@ -875,6 +875,16 @@ impl LexStream {
|
||||
));
|
||||
}
|
||||
}
|
||||
'(' if can_be_subshell && chars.peek() == Some(&')') => {
|
||||
// standalone "()" — function definition marker
|
||||
pos += 2;
|
||||
chars.next();
|
||||
let mut tk = self.get_token(self.cursor..pos, TkRule::Str);
|
||||
tk.mark(TkFlags::KEYWORD);
|
||||
self.cursor = pos;
|
||||
self.set_next_is_cmd(true);
|
||||
return Ok(tk);
|
||||
}
|
||||
'(' if self.next_is_cmd() && can_be_subshell => {
|
||||
pos += 1;
|
||||
let mut paren_count = 1;
|
||||
|
||||
Reference in New Issue
Block a user