diff options
Diffstat (limited to 'src/lexer/strings.rs')
-rw-r--r-- | src/lexer/strings.rs | 24 |
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 | ||
50 | pub(crate) fn scan_string(ptr: &mut Ptr) { | ||
51 | while let Some(c) = ptr.bump() { | ||
52 | if c == '"' { | ||
53 | return | ||
54 | } | ||
55 | } | ||
56 | } | ||
57 | |||
58 | pub(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 | |||
50 | fn scan_byte(ptr: &mut Ptr) { | 71 | fn 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) { | |||
83 | fn scan_char_or_byte(ptr: &mut Ptr) { | 104 | fn 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 | |||