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

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

[nongnu] elpa/parseclj f86a3be4bf 107/185: Add last rewordings


From: ELPA Syncer
Subject: [nongnu] elpa/parseclj f86a3be4bf 107/185: Add last rewordings
Date: Tue, 28 Dec 2021 14:05:25 -0500 (EST)

branch: elpa/parseclj
commit f86a3be4bf08d9fe9ba77355abaaf6910598ee82
Author: Daniel Barreto <daniel.barreto.n@gmail.com>
Commit: Daniel Barreto <daniel.barreto.n@gmail.com>

    Add last rewordings
---
 parseclj-ast.el | 13 +++++++------
 parseclj-lex.el | 10 +++++-----
 parseclj.el     |  5 +++--
 3 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/parseclj-ast.el b/parseclj-ast.el
index a5ef6667be..51b00be35a 100644
--- a/parseclj-ast.el
+++ b/parseclj-ast.el
@@ -73,8 +73,9 @@ on available options."
 (defun parseclj-ast--reduce-leaf-with-lexical-preservation (stack token 
options)
   "Put into STACK an AST leaf node based on TOKEN.
 This function is very similar to `parseclj-ast--reduce-leaf', but unlike
-it, takes into account tokens representing white space or comments, and
-saves them into the STACK.
+it, takes into account tokens representing white space or comments and
+saves them into the STACK.  Nodes produced by this function have a
+`:lexical-preservation' key set to t.
 
 OPTIONS is an association list.  See `parseclj-parse' for more information
 on available options."
@@ -92,7 +93,7 @@ on available options."
       (parseclj-ast--reduce-leaf stack token options))))
 
 (defun parseclj-ast--reduce-branch (stack opening-token children options)
-  "Reduce STACK with an AST branch node representing a collection of tokens.
+  "Reduce STACK with an AST branch node representing a collection of elements.
 Ignores discard tokens.
 
 OPENING-TOKEN is a lex token representing an opening paren, bracket or
@@ -119,7 +120,7 @@ on available options."
           stack)))))
 
 (defun parseclj-ast--reduce-branch-with-lexical-preservation (stack 
opening-token children options)
-  "Reduce STACK with an AST branch node representing a collection of tokens.
+  "Reduce STACK with an AST branch node representing a collection of elements.
 Similar to `parseclj-ast--reduce-branch', but reduces discard tokens as
 well.  Nodes produced by this function have a `:lexical-preservation'
 key set to t.
@@ -148,7 +149,7 @@ on available options."
 (declare-function parseclj-unparse-clojure "parseclj")
 
 (defun parseclj-ast--unparse-collection (node)
-  "Insert the given AST branch NODE into buffer as a string."
+  "Insert a string representation of the given AST branch NODE into buffer."
   (let* ((token-type (parseclj-ast-node-type node))
          (delimiters (cl-case token-type
                        (:root (cons "" ""))
@@ -167,7 +168,7 @@ on available options."
     (insert (cdr delimiters))))
 
 (defun parseclj-ast--unparse-tag (node)
-  "Insert the given AST tag NODE into buffer as a string."
+  "Insert a string representation of the given AST tag NODE into buffer."
   (progn
     (insert "#")
     (insert (symbol-name (a-get node :tag)))
diff --git a/parseclj-lex.el b/parseclj-lex.el
index 0d89a10e85..dc63737336 100644
--- a/parseclj-lex.el
+++ b/parseclj-lex.el
@@ -74,7 +74,7 @@ A token is an association list with :token-type as its first 
key."
   (member (parseclj-lex-token-type token) parseclj-lex--leaf-tokens))
 
 (defun parseclj-lex-closing-token-p (token)
-  "Return t if the given ast TOKEN is a closing toking."
+  "Return t if the given ast TOKEN is a closing token."
   (member (parseclj-lex-token-type token) parseclj-lex--closing-tokens))
 
 (defun parseclj-lex-at-whitespace-p ()
@@ -120,7 +120,7 @@ A token is an association list with :token-type as its 
first key."
   (parseclj-lex-skip-digits))
 
 (defun parseclj-lex-number ()
-  "Consume a number and return a :number token."
+  "Consume a number and return a `:number' token representing it."
   (let ((pos (point)))
     (parseclj-lex-skip-number)
 
@@ -185,7 +185,7 @@ For more information on what determines a valid symbol, see
       (eq ?# char)))
 
 (defun parseclj-lex-get-symbol-at-point (pos)
-  "Return a string containing the symbol at POS."
+  "Return the symbol at POS as a string."
   (while (parseclj-lex-symbol-rest-p (char-after (point)))
     (right-char))
   (buffer-substring-no-properties pos (point)))
@@ -258,8 +258,8 @@ token is returned."
 
 (defun parseclj-lex-keyword ()
   "Return a lex token representing a keyword.
-Keywords follow the same rules as symbols, except they might start with one
-or two colon characters.
+Keywords follow the same rules as symbols, except they start with one or
+two colon characters.
 
 See `parseclj-lex-symbol', `parseclj-lex-symbol-start-p'."
   (let ((pos (point)))
diff --git a/parseclj.el b/parseclj.el
index 7d9a189753..fd2d8e32ff 100644
--- a/parseclj.el
+++ b/parseclj.el
@@ -63,8 +63,9 @@ can be handled with `condition-case'."
   "Reduce collection based on the top of the STACK and a CLOSING-TOKEN.
 
 REDUCE-BRANCH is a function to be applied to the collection of tokens found
-from the top of the stack until CLOSING-TOKEN.  This function should return
-an AST token representing such collection.
+from the top of the stack until an opening token that matches
+CLOSING-TOKEN.  This function should return an AST token representing such
+collection.
 
 OPTIONS is an association list.  This list is also passed down to the
 REDUCE-BRANCH function.  See `parseclj-parse' for more information on



reply via email to

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