diff options
Diffstat (limited to 'stdlib/source/lux/compiler/default/syntax.lux')
-rw-r--r-- | stdlib/source/lux/compiler/default/syntax.lux | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/stdlib/source/lux/compiler/default/syntax.lux b/stdlib/source/lux/compiler/default/syntax.lux index 89087d482..dc22de5d0 100644 --- a/stdlib/source/lux/compiler/default/syntax.lux +++ b/stdlib/source/lux/compiler/default/syntax.lux @@ -129,8 +129,6 @@ ## Escaped character sequences follow the usual syntax of ## back-slash followed by a letter (e.g. \n). -## Unicode escapes are possible, with hexadecimal sequences between 1 -## and 4 characters long (e.g. \u12aB). ## Escaped characters may show up in Char and Text literals. (def: escaped-char^ (Lexer [Nat Text]) @@ -143,17 +141,6 @@ (^ (static ..text-delimiter)) (wrap [2 ..text-delimiter]) (^ (static ..escape)) (wrap [2 ..escape]) - ## Handle unicode escapes. - "u" - (do p.Monad<Parser> - [code (l.between 1 4 l.hexadecimal)] - (wrap (case (:: number.Hex@Codec<Text,Nat> decode code) - (#.Right value) - [("lux i64 +" 2 (text.size code)) (text.from-code value)] - - _ - (undefined)))) - _ (p.fail (format "Invalid escaping syntax: " (%t code))))))) @@ -634,18 +621,6 @@ _ (ex.throw invalid-escape-syntax []))) - ## Handle unicode escapes. - (^ (char "u")) - (if (!i/< (:coerce Int end) - (:coerce Int <escape-end>)) - (case (:: number.Hex@Codec<Text,Nat> decode (!clip <escape-start> <escape-end> source-code)) - (#error.Success value) - (!find-next-escape 6 next-escape end source-code total (text.from-code value)) - - (#error.Error error) - (#error.Error error)) - (ex.throw invalid-escape-syntax [])) - _ (ex.throw invalid-escape-syntax [])))))) |