[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseclj 70804992ee 122/185: Merge pull request #14 from l
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseclj 70804992ee 122/185: Merge pull request #14 from lambdaisland/parseclj-lex-symbol-fix |
Date: |
Tue, 28 Dec 2021 14:05:27 -0500 (EST) |
branch: elpa/parseclj
commit 70804992ee73264d45db3d209a2f899ae925d3bb
Merge: bad1fb8745 19ca5f5bd0
Author: Arne Brasseur <arne.brasseur@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #14 from lambdaisland/parseclj-lex-symbol-fix
Add support for having single quotes in symbols/keywords
---
.travis.yml | 1 +
parseclj-lex.el | 4 ++--
test/parseclj-lex-test.el | 10 ++++++++++
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 5cfcd11bb1..7f4e57f3fd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,6 @@
language: generic
dist: trusty
+group: deprecated-2017Q4
env:
- EMACS=emacs25
- EMACS=emacs-snapshot
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 a83816010e 039/185: Refactor clj-parse-test., (continued)
- [nongnu] elpa/parseclj a83816010e 039/185: Refactor clj-parse-test., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 9d4c0b7b4b 041/185: Merge pull request #2 from volrath/tag-support, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 879ac980a8 056/185: Treat numbers with trailing symbol characters as lex errors, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 2781f0cd7f 088/185: Vocab chage: closer/opener => closing-token/opening-token, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 4fc37462ab 073/185: Make Travis use Cask, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj a71e57df4d 080/185: Rename clj-lex to parseclj-lex, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 168027fed5 094/185: Merge pull request #7 from lambdaisland/reorganize-package, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 45bd6a7431 109/185: Clean up tests, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 1f8e449897 105/185: Simplify error messages, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj f362018ff1 112/185: Silence the byte-compiler about some unused vars., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 70804992ee 122/185: Merge pull request #14 from lambdaisland/parseclj-lex-symbol-fix,
ELPA Syncer <=
- [nongnu] elpa/parseclj 19ca5f5bd0 121/185: Stick to the previous Travis Trusty image, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj b2550e6456 133/185: Add docstring for `parseclj-lex--string-value`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 13059d8529 138/185: Minor checkdoc fixes, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 49c715ed22 148/185: For prefix-2 elements: pass children to reduce in right order, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj dc0d165b0a 152/185: Merge pull request #23 from clojure-emacs/read-one, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 62c9bf9126 177/185: Remove the last remains of a.el, restructure requires, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 517a371616 166/185: Use map-elt instead of parseclj-alist-get, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj ba04dbe334 171/185: Remove remaining a-list call, move a.el to be test-only, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 48abe456c6 155/185: Update the installation instructions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj b234692020 157/185: error on unmatched closing paren/brace, ELPA Syncer, 2021/12/28