[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseclj 792ba04647 024/185: A more elaborate test, nestin
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseclj 792ba04647 024/185: A more elaborate test, nesting works! |
Date: |
Tue, 28 Dec 2021 14:05:10 -0500 (EST) |
branch: elpa/parseclj
commit 792ba0464745d75138b69b8a164fbc5776d0c1c6
Author: Arne Brasseur <arne@arnebrasseur.net>
Commit: Arne Brasseur <arne@arnebrasseur.net>
A more elaborate test, nesting works!
---
clj-parse-test.el | 7 ++++++-
clj-parse.el | 20 +++++++++++---------
2 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/clj-parse-test.el b/clj-parse-test.el
index a6ef69b1e4..8de09a3e8c 100644
--- a/clj-parse-test.el
+++ b/clj-parse-test.el
@@ -44,7 +44,12 @@
(with-temp-buffer
(insert "(nil true false hello-world)")
(goto-char 1)
- (should (equal (clj-parse) '((nil t nil hello-world))))))
+ (should (equal (clj-parse) '((nil t nil hello-world)))))
+
+ (with-temp-buffer
+ (insert "((.9 abc (true) (hello)))")
+ (goto-char 1)
+ (should (equal (clj-parse) '(((0.9 abc (t) (hello))))))))
;; (ert-deftest clj-parse-test--reduce-list ()
;; (clj-parse-test--reduce-list ))
diff --git a/clj-parse.el b/clj-parse.el
index 17ec7cdf58..cc40237278 100644
--- a/clj-parse.el
+++ b/clj-parse.el
@@ -25,12 +25,18 @@
;;; Code:
(require 'cl-lib)
-
;; Before emacs 25.1 it's an ELPA package
(require 'let-alist)
-
(require 'clj-lex)
+(defvar clj-parse--leaf-tokens '(:whitespace
+ :number
+ :nil
+ :true
+ :false
+ :symbol)
+ "Tokens that represent leaf nodes in the AST.")
+
(defun clj-parse-edn-reduce1 (stack token)
(cl-case (cdr (assq 'type token))
(:whitespace stack)
@@ -48,14 +54,10 @@
(:list (-butlast (cdr coll))))
stack))
-(defvar clj-parse--leaf-tokens '(:whitespace :number :nil :true :false
:symbol))
-
-
+;; TODO move this to clj-lex
(defun clj-parse--token-type (token)
- (and (listp token) (cdr (assq 'type token))))
-
-(defun clj-parse--unwind-stack (stack target)
- (let ((result nil))))
+ (and (listp token)
+ (cdr (assq 'type token))))
(defun clj-parse--reduce-list (stack reducN)
(let ((coll nil))
- [nongnu] elpa/parseclj bdd6489128 003/185: add travis badge, (continued)
- [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
- [nongnu] elpa/parseclj 792ba04647 024/185: A more elaborate test, nesting works!,
ELPA Syncer <=
- [nongnu] elpa/parseclj 452fe7cc76 023/185: Implement nil, true, false, symbol, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 67171853f5 026/185: lex characters, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 4f54ba52fe 033/185: Add support for sets, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 4f647c8cff 036/185: Remove duplicate defination of clj-lex--token-token, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 1b2b221c98 038/185: Add AST to Elisp and Clojure/EDN printers, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 9404763e11 042/185: Make sure Travis uses the right Emacs, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 29411e2103 045/185: Add a design document to share vision and collect feedback, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 0702332e5d 046/185: Merge branch 'master' of https://github.com/lambdaisland/clj-parse, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 553f8618e1 044/185: Rework `clj-parse-deftest` macro, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj da89bf82a3 050/185: Allow colons inside symbols, ELPA Syncer, 2021/12/28