Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

[clojure] treat comma as whitespace #63

Merged
merged 1 commit into from Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/clojure/clojure.test.ts
Expand Up @@ -897,5 +897,23 @@ testTokenization('clojure', [
'`',
'~',
"'",
], 'meta')
], 'meta'),

// treat comma as whitespace
[
{
line: ', foo, :bar, "one", 2, ',
tokens: [
{startIndex: 0, type: 'white.clj'},
{startIndex: 2, type: 'identifier.clj'},
{startIndex: 5, type: 'white.clj'},
{startIndex: 7, type: 'constant.clj'},
{startIndex: 11, type: 'white.clj'},
{startIndex: 13, type: 'string.clj'},
{startIndex: 18, type: 'white.clj'},
{startIndex: 20, type: 'number.clj'},
{startIndex: 21, type: 'white.clj'}
]
}
]
]);
2 changes: 1 addition & 1 deletion src/clojure/clojure.ts
Expand Up @@ -768,7 +768,7 @@ export const language = <ILanguage>{
],

whitespace: [
[/\s+/, 'white'],
[/[\s,]+/, 'white'],
[/;.*$/, 'comment'],
[/\(comment\b/, 'comment', '@comment'],
],
Expand Down