aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/strings.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer/strings.rs')
-rw-r--r--src/lexer/strings.rs24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/lexer/strings.rs b/src/lexer/strings.rs
index 283ce8feb..2c1d86374 100644
--- a/src/lexer/strings.rs
+++ b/src/lexer/strings.rs
@@ -47,6 +47,27 @@ pub(crate) fn scan_byte_char_or_string(ptr: &mut Ptr) -> SyntaxKind {
47 } 47 }
48} 48}
49 49
50pub(crate) fn scan_string(ptr: &mut Ptr) {
51 while let Some(c) = ptr.bump() {
52 if c == '"' {
53 return
54 }
55 }
56}
57
58pub(crate) fn scan_raw_string(ptr: &mut Ptr) {
59 if !ptr.next_is('"') {
60 return
61 }
62 ptr.bump();
63
64 while let Some(c) = ptr.bump() {
65 if c == '"' {
66 return
67 }
68 }
69}
70
50fn scan_byte(ptr: &mut Ptr) { 71fn scan_byte(ptr: &mut Ptr) {
51 if ptr.next_is('\'') { 72 if ptr.next_is('\'') {
52 ptr.bump(); 73 ptr.bump();
@@ -83,4 +104,5 @@ fn scan_raw_byte_string(ptr: &mut Ptr) {
83fn scan_char_or_byte(ptr: &mut Ptr) { 104fn scan_char_or_byte(ptr: &mut Ptr) {
84 //FIXME: deal with escape sequencies 105 //FIXME: deal with escape sequencies
85 ptr.bump(); 106 ptr.bump();
86} \ No newline at end of file 107}
108