Last active
August 29, 2015 14:03
-
-
Save JeffBezanson/dd8e1e1a77df1373f9f5 to your computer and use it in GitHub Desktop.
escaped symbols patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/julia-parser.scm b/src/julia-parser.scm | |
index 549b02f..8949495 100644 | |
--- a/src/julia-parser.scm | |
+++ b/src/julia-parser.scm | |
@@ -1677,9 +1677,14 @@ | |
;; symbol/expression quote | |
((eq? t ':) | |
(take-token s) | |
- (if (closing-token? (peek-token s)) | |
- ': | |
- (list 'quote (parse-atom- s)))) | |
+ (if (eqv? (peek-char (ts:port s)) #\") | |
+ ;; escaped symbol | |
+ (begin (read-char (ts:port s)) | |
+ (let ((str (cadr (parse-string-literal- '_ 0 (ts:port s) s #t)))) | |
+ (symbol str))) | |
+ (if (closing-token? (peek-token s)) | |
+ ': | |
+ (list 'quote (parse-atom- s))))) | |
;; misplaced = | |
((eq? t '=) (error "unexpected \"=\"")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment