mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-23 08:06:11 +00:00
Shell: Clear expansions after committing a word in the POSIX parser
This commit is contained in:
committed by
Ali Mohammad Pur
parent
2881bb4c3a
commit
6da438e992
@@ -533,6 +533,7 @@ Lexer::ReductionResult Lexer::reduce_start()
|
||||
if (m_lexer.is_eof()) {
|
||||
auto tokens = Token::maybe_from_state(m_state);
|
||||
m_state.buffer.clear();
|
||||
m_state.expansions.clear();
|
||||
m_state.position.start_offset = m_state.position.end_offset;
|
||||
m_state.position.start_line = m_state.position.end_line;
|
||||
|
||||
@@ -615,6 +616,7 @@ Lexer::ReductionResult Lexer::reduce_start()
|
||||
m_state.on_new_line = true;
|
||||
|
||||
m_state.buffer.clear();
|
||||
m_state.expansions.clear();
|
||||
m_state.position.start_offset = m_state.position.end_offset;
|
||||
m_state.position.start_line = m_state.position.end_line;
|
||||
|
||||
@@ -637,6 +639,7 @@ Lexer::ReductionResult Lexer::reduce_start()
|
||||
auto tokens = Token::maybe_from_state(m_state);
|
||||
m_state.buffer.clear();
|
||||
m_state.buffer.append(consume());
|
||||
m_state.expansions.clear();
|
||||
m_state.position.start_offset = m_state.position.end_offset;
|
||||
m_state.position.start_line = m_state.position.end_line;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user