[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseclj 43f59dcb91 043/185: Avoid dropping whitespaces, h
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseclj 43f59dcb91 043/185: Avoid dropping whitespaces, handling them while reducing |
Date: |
Tue, 28 Dec 2021 14:05:13 -0500 (EST) |
branch: elpa/parseclj
commit 43f59dcb91b6cd78bc9e753b1ad53abd0bef0fa8
Author: Daniel Barreto <dbarreto@talpor.com>
Commit: Daniel Barreto <dbarreto@talpor.com>
Avoid dropping whitespaces, handling them while reducing
---
clj-parse.el | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/clj-parse.el b/clj-parse.el
index 618d8f169b..bd2156f071 100644
--- a/clj-parse.el
+++ b/clj-parse.el
@@ -99,14 +99,10 @@
((eq first-char ?o) (string-to-number (substring c 2) 8))
(t first-char))))
-(defun clj-parse--next ()
- (setq next (clj-lex-next))
- (while (eq (clj-lex-token-type next) :whitespace)
- (setq next (clj-parse--next)))
- next)
-
(defun clj-parse--ast-reduce1 (stack leaf)
- (push leaf stack))
+ (if (eq (clj-lex-token-type leaf) :whitespace)
+ stack
+ (push leaf stack)))
(defun clj-parse--ast-reduceN (stack node subnodes)
(push
@@ -142,7 +138,7 @@
(defun clj-parse-reduce (reduce1 reduceN)
(let ((stack nil))
- (while (not (eq (clj-lex-token-type (setq token (clj-parse--next))) :eof))
+ (while (not (eq (clj-lex-token-type (setq token (clj-lex-next))) :eof))
(message "STACK: %S" stack)
(message "TOKEN: %S\n" token)
- [nongnu] elpa/parseclj 4df6ae1bc7 012/185: Travis: only install the necessary ppa/package for each matrix line, 2nd attempt, (continued)
- [nongnu] elpa/parseclj 4df6ae1bc7 012/185: Travis: only install the necessary ppa/package for each matrix line, 2nd attempt, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj e179a11ec4 016/185: More of trying to appease the mighty gods of Travis, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj d5167bf4ad 021/185: Test/lint stuff, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 22f2eb106f 028/185: Support \uxxxx and \oxxx escape codes in strings, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 343052c01a 014/185: Add linting to the build, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 07739abe2c 030/185: support keywords, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj ced0b91c08 029/185: "Support" namespaces symbols, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 1eef0b62c8 034/185: Support #_discard forms, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 0974b56833 035/185: Stick to non CL functions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj f8822bb43c 040/185: Add support for tags in lexer, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 43f59dcb91 043/185: Avoid dropping whitespaces, handling them while reducing,
ELPA Syncer <=
- [nongnu] elpa/parseclj 7733985037 047/185: DESIGN.md-related adjustments, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj c906de33a1 048/185: Rewrite all tests, and add new tests for the AST "printer", ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 697618dbb1 049/185: Merge pull request #1 from volrath/master, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj e7686c49ed 052/185: Greater parity with edn.el, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 2da47798d9 057/185: Enable more edn.el tests, document how time/uuid are stored, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj f6de87fbe6 067/185: Split EDN and AST handling in separate files, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj d410a1530e 096/185: Add code-checking defaults to `dir-locals.el`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 3a92eafce9 079/185: Rename reduce-node to reduce-branch, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 7beff77b15 083/185: Introduce parseclj-parse-clojure, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 3d261f5d3c 072/185: Bump version of a, ELPA Syncer, 2021/12/28