File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -716,8 +716,11 @@ fn digits(mut input: Cursor) -> Result<Cursor, LexError> {
716716fn op ( input : Cursor ) -> PResult < Punct > {
717717 match op_char ( input) {
718718 Ok ( ( rest, '\'' ) ) => {
719- ident ( rest) ?;
720- Ok ( ( rest, Punct :: new ( '\'' , Spacing :: Joint ) ) )
719+ if ident ( rest) ?. 0 . starts_with ( "'" ) {
720+ Err ( LexError )
721+ } else {
722+ Ok ( ( rest, Punct :: new ( '\'' , Spacing :: Joint ) ) )
723+ }
721724 }
722725 Ok ( ( rest, ch) ) => {
723726 let kind = match op_char ( rest) {
Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ fn fail() {
198198 fail ( "b\" \r \" " ) ; // bare carriage return in byte string
199199 fail ( "r\" \r \" " ) ; // bare carriage return in raw string
200200 fail ( "\" \\ \r \" " ) ; // backslash carriage return
201+ fail ( "'aa'aa" ) ;
201202}
202203
203204#[ cfg( span_locations) ]
You can’t perform that action at this time.
0 commit comments