[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseclj 9e0b51e39c 160/185: revert tabs to spaces, addres
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseclj 9e0b51e39c 160/185: revert tabs to spaces, address minor review comments |
Date: |
Tue, 28 Dec 2021 14:05:32 -0500 (EST) |
branch: elpa/parseclj
commit 9e0b51e39c8696b25dc4860d2ccf6aa792e678cf
Author: chaos <chaos@localhost>
Commit: chaos <chaos@localhost>
revert tabs to spaces, address minor review comments
---
.dir-locals.el | 1 +
parseclj-parser.el | 73 +++++++++++++++++++++++++++---------------------------
2 files changed, 38 insertions(+), 36 deletions(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index ab85ded9a1..c45357d77a 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,5 +1,6 @@
((emacs-lisp-mode
(buffer-save-without-query . t)
+ (indent-tabs-mode . nil)
(eval . (flycheck-mode))
(eval . (checkdoc-minor-mode))
(sentence-end-double-space . t)
diff --git a/parseclj-parser.el b/parseclj-parser.el
index 1ae84fbed0..fe3bb3c818 100644
--- a/parseclj-parser.el
+++ b/parseclj-parser.el
@@ -71,43 +71,44 @@ OPTIONS is an association list. This list is also passed
down to the
REDUCE-BRANCH function. See `parseclj-parser' for more information on
available options."
(let ((opening-token-type (parseclj--find-opening-token stack closing-token))
- (fail-fast (a-get options :fail-fast t)))
+ (fail-fast (a-get options :fail-fast t))
+ (collection nil))
(if (not opening-token-type)
- (if fail-fast
- (parseclj--error "At position %s, unmatched %S"
- (a-get closing-token :pos)
- (parseclj-lex-token-type closing-token))
-
- stack)
-
- (let ((collection nil))
- ;; unwind the stack until opening-token-type is found, adding to
collection
- (while (and stack (not (eq (parseclj-lex-token-type (car stack))
opening-token-type)))
- (push (pop stack) collection))
-
- ;; did we find the right token?
- (if (eq (parseclj-lex-token-type (car stack)) opening-token-type)
- (progn
- (when fail-fast
- ;; any unreduced tokens left: bail early
- (when-let ((token (seq-find #'parseclj-lex-token-p collection)))
- (parseclj--error "At position %s, unmatched %S"
- (a-get token :pos)
- (parseclj-lex-token-type token))))
-
- ;; all good, call the reducer so it can return an updated stack
with a
- ;; new node at the top.
- (let ((opening-token (pop stack)))
- (funcall reduce-branch stack opening-token collection options)))
-
- ;; Unwound the stack without finding a matching paren: either bail
early
- ;; or return the original stack and continue parsing
- (if fail-fast
- (parseclj--error "At position %s, unmatched %S"
- (a-get closing-token :pos)
- (parseclj-lex-token-type closing-token))
-
- (reverse collection)))))))
+ (if fail-fast
+ (parseclj--error "At position %s, unmatched %S"
+ (a-get closing-token :pos)
+ (parseclj-lex-token-type closing-token))
+
+ stack)
+
+ (progn
+ ;; unwind the stack until opening-token-type is found, adding to
collection
+ (while (and stack (not (eq (parseclj-lex-token-type (car stack))
opening-token-type)))
+ (push (pop stack) collection))
+
+ ;; did we find the right token?
+ (if (eq (parseclj-lex-token-type (car stack)) opening-token-type)
+ (progn
+ (when fail-fast
+ ;; any unreduced tokens left: bail early
+ (when-let ((token (seq-find #'parseclj-lex-token-p
collection)))
+ (parseclj--error "At position %s, unmatched %S"
+ (a-get token :pos)
+ (parseclj-lex-token-type token))))
+
+ ;; all good, call the reducer so it can return an updated stack
with a
+ ;; new node at the top.
+ (let ((opening-token (pop stack)))
+ (funcall reduce-branch stack opening-token collection
options)))
+
+ ;; Unwound the stack without finding a matching paren: either bail
early
+ ;; or return the original stack and continue parsing
+ (if fail-fast
+ (parseclj--error "At position %s, unmatched %S"
+ (a-get closing-token :pos)
+ (parseclj-lex-token-type closing-token))
+
+ (reverse collection)))))))
(defun parseclj--take-value (stack value-p)
"Scan STACK until a value is found.
- [nongnu] elpa/parseclj 6e0dc9516c 093/185: Add missing require, (continued)
- [nongnu] elpa/parseclj 6e0dc9516c 093/185: Add missing require, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj b79b3a5438 098/185: Add documentation to `parseclj-ast.el`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 1b071d7775 104/185: Add documentation to `parseedn` module, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj e1cb9e5514 113/185: Add a few more node accessors., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 80e92cdf9f 001/185: Move into its own repo, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 2588470302 116/185: Merge pull request #9 from lambdaisland/docstrings-and-conventions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 92396d11cf 127/185: Merge pull request #17 from lambdaisland/travis-evm, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj f87278a70e 135/185: Merge pull request #18 from clojure-emacs/doc-&-style-fixes-part-2, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj eedc0d812e 168/185: Update docstring and metion Emacs 27 alternative, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 815ba87a77 137/185: Merge pull request #19 from clojure-emacs/update-readme, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 9e0b51e39c 160/185: revert tabs to spaces, address minor review comments,
ELPA Syncer <=
- [nongnu] elpa/parseclj bdd6489128 003/185: add travis badge, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj f6b8ad665c 004/185: Fix .travis.yml, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 3ec632ed66 008/185: Travis show Emacs version, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 7cf7dc99cd 011/185: Travis: only install the necessary ppa/package for each matrix line, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 710511ff79 013/185: Seems these packages dont actually package the versioned executable names, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj b2e97ecb57 017/185: Lets try that again #travis, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj d7adaa5177 018/185: Lets try that again #travis, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj abe7edb04b 019/185: Bunch of refactoring, but we're green now, supposedly, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 56bb020a9e 020/185: Fix the travis yaml?, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 972161dd23 022/185: Make sure we test against the version we think we are testing against, ELPA Syncer, 2021/12/28