Skip to content

Commit 6880025

Browse files
committed
Not whitespace required after lone division symbol /
Accounts for things like '(+ - * /) but creates individual symbol tokens for invalid clojure code like (/////) ;; 1 token per / /asdf ;; 2 tokens: / and asdf /asdf/hjkl ;; 2 token: / and asfd/hjkl
1 parent 8154310 commit 6880025

File tree

4 files changed

+5092
-5125
lines changed

4 files changed

+5092
-5125
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ module.exports = grammar({
303303
_sym_unqualified: $ =>
304304
field('name', alias(
305305
choice(
306-
seq(SYMBOL_NS_DELIMITER, $._ws), // division symbol, must be followed by whitespace
306+
SYMBOL_NS_DELIMITER, // division symbol, must be followed by whitespace
307307
SYMBOL
308308
),
309309
$.sym_name

src/grammar.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -811,20 +811,11 @@
811811
"type": "CHOICE",
812812
"members": [
813813
{
814-
"type": "SEQ",
815-
"members": [
816-
{
817-
"type": "TOKEN",
818-
"content": {
819-
"type": "STRING",
820-
"value": "/"
821-
}
822-
},
823-
{
824-
"type": "SYMBOL",
825-
"name": "_ws"
826-
}
827-
]
814+
"type": "TOKEN",
815+
"content": {
816+
"type": "STRING",
817+
"value": "/"
818+
}
828819
},
829820
{
830821
"type": "TOKEN",

src/node-types.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,7 @@
20182018
]
20192019
},
20202020
"name": {
2021-
"multiple": true,
2021+
"multiple": false,
20222022
"required": true,
20232023
"types": [
20242024
{

0 commit comments

Comments
 (0)