From 9fcb2a50960598cf69820cb5b204b66764431818 Mon Sep 17 00:00:00 2001 From: Water-Melon Date: Wed, 25 Oct 2023 10:48:04 +0000 Subject: [PATCH] feat(conf,melang): support character \e --- src/mln_conf.c | 3 +++ src/mln_lang_ast.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/mln_conf.c b/src/mln_conf.c index d7be6087..b609c816 100644 --- a/src/mln_conf.c +++ b/src/mln_conf.c @@ -164,6 +164,9 @@ mln_get_char(mln_lex_t *lex, char c) case 'r': if (mln_lex_putchar(lex, '\r') == MLN_ERR) return -1; break; + case 'e': + if (mln_lex_putchar(lex, '\e') == MLN_ERR) return -1; + break; case 'v': if (mln_lex_putchar(lex, '\v') == MLN_ERR) return -1; break; diff --git a/src/mln_lang_ast.c b/src/mln_lang_ast.c index e50fdb10..d3d6db89 100644 --- a/src/mln_lang_ast.c +++ b/src/mln_lang_ast.c @@ -752,6 +752,9 @@ mln_get_char(mln_lex_t *lex, char c) case 'r': if (mln_lex_putchar(lex, '\r') == MLN_ERR) return -1; break; + case 'e': + if (mln_lex_putchar(lex, '\e') == MLN_ERR) return -1; + break; case 'v': if (mln_lex_putchar(lex, '\v') == MLN_ERR) return -1; break;