emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/parseclj f87278a70e 135/185: Merge pull request #18 from c


From: ELPA Syncer
Subject: [nongnu] elpa/parseclj f87278a70e 135/185: Merge pull request #18 from clojure-emacs/doc-&-style-fixes-part-2
Date: Tue, 28 Dec 2021 14:05:29 -0500 (EST)

branch: elpa/parseclj
commit f87278a70e38ae202f850ce5bc5c67756549ede8
Merge: acf4a29778 2ffadc6239
Author: Arne Brasseur <arne.brasseur@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #18 from clojure-emacs/doc-&-style-fixes-part-2
    
    Doc & style fixes part 2
---
 parseclj-lex.el | 13 ++++++++++---
 parseedn.el     |  2 +-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/parseclj-lex.el b/parseclj-lex.el
index ea11d3f60b..2f5f8f57b4 100644
--- a/parseclj-lex.el
+++ b/parseclj-lex.el
@@ -93,11 +93,18 @@ A token is an association list with :token-type as its 
first key."
 ;; Elisp values from tokens
 
 (defun parseclj-lex--string-value (s)
-  ""
+  "Parse an EDN string S into a regular string.
+S goes through three transformations:
+- Escaped characters in S are transformed into Elisp escaped
+  characters.
+- Unicode escaped characters are decoded into its corresponding
+  unicode character counterpart.
+- Octal escaped characters are decoded into its corresponding
+  character counterpart."
   (replace-regexp-in-string
    "\\\\o[0-8]\\{3\\}"
    (lambda (x)
-     (make-string 1 (string-to-number (substring x 2) 8) ))
+     (make-string 1 (string-to-number (substring x 2) 8)))
    (replace-regexp-in-string
     "\\\\u[0-9a-fA-F]\\{4\\}"
     (lambda (x)
@@ -115,7 +122,7 @@ A token is an association list with :token-type as its 
first key."
                               (substring s 1 -1)))))
 
 (defun parseclj-lex--character-value (c)
-  "Parse a EDN character C into an Emacs Lisp character."
+  "Parse an EDN character C into an Emacs Lisp character."
   (let ((first-char (elt c 1)))
     (cond
      ((equal c "\\newline") ?\n)
diff --git a/parseedn.el b/parseedn.el
index 17149d2428..9e2e1e915e 100644
--- a/parseedn.el
+++ b/parseedn.el
@@ -52,7 +52,7 @@ is not recommended you change this variable, as this globally
 changes the behavior of the EDN reader.  Instead pass your own
 handlers as an optional argument to the reader functions.")
 
-(defun parseedn-reduce-leaf (stack token options)
+(defun parseedn-reduce-leaf (stack token _options)
   "Put in the STACK an elisp value representing TOKEN.
 
 OPTIONS is an association list.  See `parseclj-parse' for more information



reply via email to

[Prev in Thread] Current Thread [Next in Thread]