You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return(RAW_STRING,Some("Missing trailing `\"` with `#` symbols to terminate the raw string literal"))
221
-
}
222
-
LK::RawStr{started:false, .. } => {
223
-
return(RAW_STRING,Some("Missing `\"` symbol after `#` symbols to begin the raw string literal"))
224
-
}
218
+
LK::RawStr(str) => match str.validate(){
219
+
Ok(_) => RAW_STRING,
220
+
Err(LexRawStrError::InvalidStarter) => return(RAW_STRING,Some("Missing `\"` symbol after `#` symbols to begin the raw string literal")),
221
+
Err(LexRawStrError::NoTerminator{ expected, found, .. }) => if expected == found {
222
+
return(RAW_STRING,Some("Missing trailing `\"` to terminate the raw string literal"))
223
+
}else{
224
+
return(RAW_STRING,Some("Missing trailing `\"` with `#` symbols to terminate the raw string literal"))
225
+
226
+
},
227
+
Err(LexRawStrError::TooManyDelimiters{ .. }) => return(RAW_STRING,Some("Too many `#` symbols: raw strings may be delimited by up to 65535 `#` symbols")),
228
+
},
229
+
LK::RawByteStr(str) => match str.validate(){
230
+
Ok(_) => RAW_BYTE_STRING,
231
+
Err(LexRawStrError::InvalidStarter) => return(RAW_BYTE_STRING,Some("Missing `\"` symbol after `#` symbols to begin the raw byte string literal")),
232
+
Err(LexRawStrError::NoTerminator{ expected, found, .. }) => if expected == found {
233
+
return(RAW_BYTE_STRING,Some("Missing trailing `\"` to terminate the raw byte string literal"))
234
+
}else{
235
+
return(RAW_BYTE_STRING,Some("Missing trailing `\"` with `#` symbols to terminate the raw byte string literal"))
return(RAW_BYTE_STRING,Some("Missing trailing `\"` with `#` symbols to terminate the raw byte string literal"))
229
-
}
230
-
LK::RawByteStr{started:false, .. } => {
231
-
return(RAW_BYTE_STRING,Some("Missing `\"` symbol after `#` symbols to begin the raw byte string literal"))
232
-
}
237
+
},
238
+
Err(LexRawStrError::TooManyDelimiters{ .. }) => return(RAW_BYTE_STRING,Some("Too many `#` symbols: raw byte strings may be delimited by up to 65535 `#` symbols")),
0 commit comments