Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4ed031c

Browse files
committed
Limit negative lookbehind in clojureKeyword
1 parent 4d155eb commit 4ed031c

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

‎clj/test/vim_clojure_static/syntax_test.clj

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,25 @@
104104

105105
(comment (test #'test-character-literals))
106106

107-
;; TODO: Finish me! (this was in an old git stash)
108-
;; (defsyntaxtest keywords-test
109-
;; (with-format "%s"
110-
;; ":1" kw
111-
;; ":A" kw
112-
;; ":a" kw
113-
;; ":αβγ" kw
114-
;; "::a" kw
115-
;; ":a/b" kw
116-
;; ":a:b" kw
117-
;; ":a:b/:c:b" kw
118-
;; ":a/b/c/d" kw
119-
;; "::a/b" !kw
120-
;; "::" !kw
121-
;; ":a:" !kw
122-
;; ":a/" !kw
123-
;; ":/" !kw
124-
;; ":" !kw
125-
;; ))
126-
;;
127-
;; (comment (test #'keywords-test))
107+
(defsyntaxtest keywords-test
108+
["%s"
109+
[":1" kw
110+
":A" kw
111+
":a" kw
112+
":αβγ" kw
113+
"::a" kw
114+
":a/b" kw
115+
":a:b" kw
116+
":a:b/:c:b" kw
117+
":a/b/c/d" kw
118+
"::a/b" kw
119+
"::" !kw
120+
":a:" !kw
121+
":a/" !kw
122+
; ":/" !kw ; This is legal, but for simplicity we do not match it
123+
":" !kw]])
124+
125+
(comment (test #'keywords-test))
128126

129127
(defsyntaxtest test-java-regexp-literals
130128
["#\"%s\""

‎syntax/clojure.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ delfunction s:syntax_keyword
7070
" * Must not end in a : or /
7171
" * Must not have two adjacent colons except at the beginning
7272
" * Must not contain any reader metacharacters except for ' and #
73-
syntax match clojureKeyword "\v<:{1,2}%([^ \n\r\t()\[\]{}";@^`~\\%/]+/)*[^ \n\r\t()\[\]{}";@^`~\\%/]+:@<!>"
73+
syntax match clojureKeyword "\v<:{1,2}%([^ \n\r\t()\[\]{}";@^`~\\%/]+/)*[^ \n\r\t()\[\]{}";@^`~\\%/]+:@1<!>"
7474

7575
syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained
7676

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /