Skip to content

Commit 3c6ee7d

Browse files
committed
Avoid symbol literals in std lib.
1 parent ee98d51 commit 3c6ee7d

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

langs/outlaw/stdlib.rkt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -647,11 +647,11 @@
647647
[#\# (<octo-elem>)]
648648
[(? open-paren? c) (<list-or-pair> c)]
649649
[#\; (<line-comment>) (<elem>)]
650-
[#\' (<quote> 'quote)]
651-
[#\` (<quote> 'quasiquote)]
650+
[#\' (<quote> (string->symbol "quote"))]
651+
[#\` (<quote> (string->symbol "quasiquote"))]
652652
[#\, (match (peek-char)
653-
[#\@ (read-char) (<quote> 'unquote-splicing)]
654-
[_ (<quote> 'unquote)])]
653+
[#\@ (read-char) (<quote> (string->symbol "unquote-splicing"))]
654+
[_ (<quote> (string->symbol "unquote"))])]
655655
[c (<number-or-symbol> c)]))
656656

657657
(define (<quote> q)
@@ -685,12 +685,12 @@
685685
[#\\ (<char-start>)]
686686
[#\: (<keyword>)]
687687
[#\& (unimplemented "boxes")] ; FIXME
688-
[#\' (<quote> 'syntax)]
688+
[#\' (<quote> (string->symbol "syntax"))]
689689
[#\! (unimplemented "shebang comment")]
690-
[#\` (<quote> 'quasisyntax)]
690+
[#\` (<quote> (string->symbol "quasisyntax"))]
691691
[#\, (match (peek-char)
692-
[#\@ (read-char) (<quote> 'unsyntax-splicing)]
693-
[_ (<quote> 'unsyntax)])]
692+
[#\@ (read-char) (<quote> (string->symbol "unsyntax-splicing"))]
693+
[_ (<quote> (string->symbol "unsyntax"))])]
694694
[#\~ (unimplemented "compiled code")]
695695
[#\i (unimplemented "inexact number")]
696696
[#\I (unimplemented "inexact number")]
@@ -761,8 +761,8 @@
761761

762762
(define (<number-or-symbol> c)
763763
(match c
764-
[#\+ (if (delim?) '+ (<unsigned-or-symbol> #\+ '()))]
765-
[#\- (if (delim?) '- (<unsigned-or-symbol> #\- '()))]
764+
[#\+ (if (delim?) (string->symbol "+") (<unsigned-or-symbol> #\+ '()))]
765+
[#\- (if (delim?) (string->symbol "-") (<unsigned-or-symbol> #\- '()))]
766766
[#\. (if (delim?) (err ".") (<frac> #f '() '()))]
767767
[(? char-digit10?) (<unsigned-or-symbol> #f (list c))]
768768
[_ (<symbol> (list c))]))

0 commit comments

Comments
 (0)