[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseclj 0ef32ad912 120/185: Add support for having single
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseclj 0ef32ad912 120/185: Add support for having single quotes in symbols/keywords |
Date: |
Tue, 28 Dec 2021 14:05:27 -0500 (EST) |
branch: elpa/parseclj
commit 0ef32ad9121475bc36af3f64bdbd86ffc3fd1431
Author: Daniel Barreto <daniel.barreto.n@gmail.com>
Commit: Daniel Barreto <daniel.barreto.n@gmail.com>
Add support for having single quotes in symbols/keywords
---
parseclj-lex.el | 4 ++--
test/parseclj-lex-test.el | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/parseclj-lex.el b/parseclj-lex.el
index 1d4f28a5b5..ea8b65783c 100644
--- a/parseclj-lex.el
+++ b/parseclj-lex.el
@@ -218,7 +218,7 @@ A token is an association list with :token-type as its
first key."
"Return t if CHAR is a valid start for a symbol.
Symbols begin with a non-numeric character and can contain alphanumeric
-characters and . * + ! - _ ? $ % & = < >. If - + or . are the first
+characters and . * + ! - _ ? $ % & = < > '. If - + or . are the first
character, the second character (if any) must be non-numeric.
In some cases, like in tagged elements, symbols are required to start with
@@ -226,7 +226,7 @@ alphabetic characters only. ALPHA-ONLY ensures this
behavior."
(not (not (and char
(or (and (<= ?a char) (<= char ?z))
(and (<= ?A char) (<= char ?Z))
- (and (not alpha-only) (member char '(?. ?* ?+ ?! ?- ?_ ??
?$ ?% ?& ?= ?< ?> ?/))))))))
+ (and (not alpha-only) (member char '(?. ?* ?+ ?! ?- ?_ ??
?$ ?% ?& ?= ?< ?> ?/ ?'))))))))
(defun parseclj-lex-symbol-rest-p (char)
"Return t if CHAR is a valid character in a symbol.
diff --git a/test/parseclj-lex-test.el b/test/parseclj-lex-test.el
index eae02a07af..c1ebc09ce1 100644
--- a/test/parseclj-lex-test.el
+++ b/test/parseclj-lex-test.el
@@ -92,6 +92,11 @@
(goto-char 1)
(should (equal (parseclj-lex-next) '((:token-type . :symbol) (:form .
"foo#") (:pos . 1)))))
+ (with-temp-buffer
+ (insert "foo'")
+ (goto-char 1)
+ (should (equal (parseclj-lex-next) '((:token-type . :symbol) (:form .
"foo'") (:pos . 1)))))
+
(with-temp-buffer
(insert "#inst")
(goto-char 1)
@@ -138,6 +143,11 @@
(goto-char 1)
(should (equal (parseclj-lex-next) (parseclj-lex-token :keyword
":hello-world" 1))))
+ (with-temp-buffer
+ (insert ":hello-world'")
+ (goto-char 1)
+ (should (equal (parseclj-lex-next) (parseclj-lex-token :keyword
":hello-world'" 1))))
+
(with-temp-buffer
(insert ":hello/world")
(goto-char 1)
- [nongnu] elpa/parseclj fcd1a086f6 081/185: Rename clj-ast to parseclj-ast, (continued)
- [nongnu] elpa/parseclj fcd1a086f6 081/185: Rename clj-ast to parseclj-ast, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 987bd16a57 089/185: Position starts at 1, not at 0 (just like (point)), ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 313fc4e630 077/185: Rename to parseclj, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 7f8bcd405e 095/185: Make checkdoc happy with parseclj.el, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 0f16fcf2fa 084/185: Implement parsing with lexical preservation (keep whitespace, comments), ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj ca854455f6 099/185: Add missing requirement to `parseedn`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj adbc0cabf5 100/185: Move `parseclj--{leaf, closing}-tokens` to `parseclj-lex` module, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 7794d9ee59 101/185: Add docstrings for `parseclj-lex` module, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 296a093132 102/185: Remove `parseclj-unparse`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj d6525d30c6 111/185: Merge pull request #10 from lambdaisland/fix-ast-reduce-tag, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 0ef32ad912 120/185: Add support for having single quotes in symbols/keywords,
ELPA Syncer <=
- [nongnu] elpa/parseclj 0afb8c5f09 123/185: Add `parseclj-lex-error-token` helper, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj b2588ce0fb 126/185: Use EVM to setup Travis CI, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 46cfcd3120 129/185: Merge pull request #16 from lambdaisland/parseclj-lex-error-token, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 61577603f2 136/185: Update README.md with installation and usage information, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj a82f229014 139/185: Ignore *.elc files, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 7fba1624e0 142/185: Update DESIGN.md to name difference between parseclj and parseedn, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 3693dd148f 145/185: Fix Cask file, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj af6102c4a8 146/185: Minor fix to README file, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 91c2ad82af 147/185: Add enough feature to be able to parse clojure.core, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj b40670a561 149/185: Add namespaced maps, fix backquote implementation, ELPA Syncer, 2021/12/28