fixup: only allow "#\(" and "#\("

pull/70/head
Stephan Seitz 2021-11-28 13:59:46 +07:00
parent 0cf1354208
commit 9a7474e00d
4 changed files with 968 additions and 955 deletions

@ -290,7 +290,7 @@ module.exports = grammar(clojure, {
array_dimension: _ => prec(100, /\d+[aA]/),
char_lit: _ =>
seq('#', /\\[^\f\n\r\t ]+/),
seq('#', /\\([^\f\n\r\t ()]+|[()])/),
vec_lit: $ =>
prec(PREC.SPECIAL,

@ -621,7 +621,7 @@
},
{
"type": "PATTERN",
"value": "\\\\[^\\f\\n\\r\\t ]+"
"value": "\\\\([^\\f\\n\\r\\t ()]+|[()])"
}
]
},

File diff suppressed because it is too large Load Diff

@ -1281,6 +1281,7 @@ Backslashes in strings
(source
(str_lit))
================================================================================
Chars #\(
================================================================================
@ -1288,3 +1289,8 @@ Chars #\(
--------------------------------------------------------------------------------
(source
(list_lit
(sym_lit)
(char_lit)
(sym_lit)))