Skip to content

Commit b146828

Browse files
committed
---
yaml --- r: 619 b: refs/heads/master c: 6f52ba7 h: refs/heads/master i: 617: 0374216 615: ca91f14 v: v3
1 parent ad3764a commit b146828

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: ecb7fc20380e7b28809c04b8435d89ecce504358
2+
refs/heads/master: 6f52ba7cc52a55bf0542b9183e3bf26c52a388d9

trunk/src/comp/fe/lexer.rs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,26 @@ fn next_token(reader rdr) -> token.token {
254254
alt (rdr.curr()) {
255255
case ('\\') {
256256
alt (rdr.next()) {
257-
case ('n') { rdr.bump(); accum_str += '\n' as u8; }
258-
case ('r') { rdr.bump(); accum_str += '\r' as u8; }
259-
case ('t') { rdr.bump(); accum_str += '\t' as u8; }
260-
case ('\\') { rdr.bump(); accum_str += '\\' as u8; }
261-
case ('"') { rdr.bump(); accum_str += '"' as u8; }
257+
case ('n') {
258+
rdr.bump();
259+
accum_str += '\n' as u8;
260+
}
261+
case ('r') {
262+
rdr.bump();
263+
accum_str += '\r' as u8;
264+
}
265+
case ('t') {
266+
rdr.bump();
267+
accum_str += '\t' as u8;
268+
}
269+
case ('\\') {
270+
rdr.bump();
271+
accum_str += '\\' as u8;
272+
}
273+
case ('"') {
274+
rdr.bump();
275+
accum_str += '"' as u8;
276+
}
262277
// FIXME: unicode numeric escapes.
263278
case (c2) {
264279
log "unknown string escape";

0 commit comments

Comments
 (0)