diff options
| -rw-r--r-- | src/lexparse.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lexparse.c b/src/lexparse.c index 4ef228c..18d36ab 100644 --- a/src/lexparse.c +++ b/src/lexparse.c @@ -41,7 +41,6 @@ MaybeToken consolidate_buffer(LexingBuffer* buf) { static MaybeChunk handle_dollar_expansion(char* line, size_t* pos, QuotationMode qmode) { (*pos)++; - if (line[*pos] == '(') { // TODO exit(66); @@ -202,6 +201,13 @@ TokenVec* lex_level(char* line, size_t* pos, char until, TokenVecVec* tok_seq_po } else if (line[*pos] == '\"') { Chunk chunk = collect_double_q_section(line, pos); push_to_Word(&buf.word_germ, chunk); + } else if (line[*pos] == '$') { + MaybeChunk dollar_chunk = handle_dollar_expansion(line, pos, UN_Q); + if (dollar_chunk.some) { + push_to_Word(&buf.word_germ, dollar_chunk.value); + } else { + push_to_String(&buf.lit_germ, '$'); + } } else if (line[*pos] == '<' && line[(*pos)+1] == '(') { *pos += 2; MaybeToken m_tok = consolidate_buffer(&buf); |
