Skip to content

Commit

Permalink
feat(conf,melang): support character \e
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Oct 25, 2023
1 parent eb8c051 commit 9fcb2a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mln_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/mln_lang_ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9fcb2a5

Please sign in to comment.