fix: allow "(" ")" in char literals

pull/70/head
Stephan Seitz 2021-11-28 13:55:13 +07:00
parent 14700f45ee
commit 0cf1354208
4 changed files with 88966 additions and 87216 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 ]+"
}
]
},
@ -2573,8 +2573,16 @@
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "cl"
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "cl"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
@ -2603,8 +2611,16 @@
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "cl"
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "cl"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
@ -2633,8 +2649,16 @@
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "cl"
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "cl"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
@ -2717,8 +2741,16 @@
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "cl"
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "cl"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",

File diff suppressed because it is too large Load Diff

@ -1281,3 +1281,10 @@ Backslashes in strings
(source
(str_lit))
================================================================================
Chars #\(
================================================================================
(write-char #\( stream)
--------------------------------------------------------------------------------