File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -585,7 +585,9 @@ Used by compiler to generate 'forbidden' identfiers.")
585
585
(not prev-bs))
586
586
until (and (char= z x y ch1) (not prev-bs))
587
587
finally (return (- %lex-last-read-char-ix% 3 )))))
588
- (lex-substring start end)))
588
+ (if (> start end)
589
+ (return-from read-kind " " )
590
+ (lex-substring start end))))
589
591
590
592
((char= ch1 ch2) ; ; "" or '' but not """ or '''
591
593
(when ch3 (lex-unread-char ch3))
Original file line number Diff line number Diff line change 57
57
(test-equal ' ([module-stmt] ([suite-stmt] (([literal-expr] :number 42 )))) (ps " 42" ))
58
58
(test-equal ' ([module-stmt] ([suite-stmt] (([literal-expr] :string " x" )))) (ps " 'x'" ))
59
59
(test-equal ' ([module-stmt] ([suite-stmt] (([literal-expr] :bytes " x" )))) (ps " b'x'" ))
60
-
60
+ (test-equal ' ([module-stmt] ([suite-stmt] (([literal-expr] :string " " )))) (ps " \"\"\"\"\"\" " ))
61
+ (test-equal ' ([module-stmt] ([suite-stmt] (([literal-expr] :string " " )))) (ps " ''''''" ))
62
+ (test-equal ' ([module-stmt] ([suite-stmt] (([literal-expr] :string " x" )))) (ps " '''x'''" ))
63
+ (test-equal ' ([module-stmt] ([suite-stmt] (([literal-expr] :string " " )))) (ps " ''' '''" ))
64
+ (test-equal ' ([module-stmt] ([suite-stmt] (([literal-expr] :string " '" )))) (ps " '''\\ ''''" ))
65
+
61
66
; ; variables
62
67
(test-equal ' ([assign-stmt] ([literal-expr] :number 3 ) (([identifier-expr] {y} ))) (ps " y = 3" t ))
63
68
(test-equal ' ([assign-stmt] ([literal-expr] :number 3 ) (([identifier-expr] {len}))) (ps " len = 3" t ))
You can’t perform that action at this time.
0 commit comments