Skip to content

Commit

Permalink
Add an additional escape sequence \e. (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
PureFox48 authored Apr 8, 2021
1 parent 9e86b0d commit 5244a9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/site/values.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ A handful of escape characters are supported:
"\%" // A percent sign.
"\a" // Alarm beep. (Who uses this?)
"\b" // Backspace.
"\e" // ESC character.
"\f" // Formfeed.
"\n" // Newline.
"\r" // Carriage return.
Expand Down
1 change: 1 addition & 0 deletions src/vm/wren_compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,7 @@ static void readString(Parser* parser)
case '0': wrenByteBufferWrite(parser->vm, &string, '\0'); break;
case 'a': wrenByteBufferWrite(parser->vm, &string, '\a'); break;
case 'b': wrenByteBufferWrite(parser->vm, &string, '\b'); break;
case 'e': wrenByteBufferWrite(parser->vm, &string, '\33'); break;
case 'f': wrenByteBufferWrite(parser->vm, &string, '\f'); break;
case 'n': wrenByteBufferWrite(parser->vm, &string, '\n'); break;
case 'r': wrenByteBufferWrite(parser->vm, &string, '\r'); break;
Expand Down

0 comments on commit 5244a9d

Please sign in to comment.