[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseclj 1f8e449897 105/185: Simplify error messages
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseclj 1f8e449897 105/185: Simplify error messages |
Date: |
Tue, 28 Dec 2021 14:05:25 -0500 (EST) |
branch: elpa/parseclj
commit 1f8e44989759677206781531f9e31f9bc248c23d
Author: Daniel Barreto <daniel.barreto.n@gmail.com>
Commit: Daniel Barreto <daniel.barreto.n@gmail.com>
Simplify error messages
---
parseclj.el | 6 +++---
test/parseclj-test.el | 18 +++++++++---------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/parseclj.el b/parseclj.el
index 65c08344da..7a565bd31f 100644
--- a/parseclj.el
+++ b/parseclj.el
@@ -83,7 +83,7 @@ available options."
(when fail-fast
;; any unreduced tokens left: bail early
(when-let ((token (seq-find #'parseclj-lex-token? collection)))
- (parseclj--error "parseclj: Syntax Error at position %s,
unmatched %S"
+ (parseclj--error "At position %s, unmatched %S"
(a-get token :pos)
(parseclj-lex-token-type token))))
@@ -95,7 +95,7 @@ available 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 "parseclj: Syntax Error at position %s, unmatched
%S"
+ (parseclj--error "At position %s, unmatched %S"
(a-get closing-token :pos)
(parseclj-lex-token-type closing-token))
@@ -221,7 +221,7 @@ functions. Additionally the following options are recognized
;; reduce root
(when fail-fast
(when-let ((token (seq-find #'parseclj-lex-token? stack)))
- (parseclj--error "parseclj: Syntax Error at position %s, unmatched %S"
+ (parseclj--error "At position %s, unmatched %S"
(a-get token :pos)
(parseclj-lex-token-type token))))
diff --git a/test/parseclj-test.el b/test/parseclj-test.el
index 1809464141..3d6fbb1641 100644
--- a/test/parseclj-test.el
+++ b/test/parseclj-test.el
@@ -69,56 +69,56 @@
(condition-case errdata
(parseclj-parse-clojure "foo]")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 4, unmatched :rbracket"))
+ "At position 4, unmatched :rbracket"))
(should (equal
(condition-case errdata
(parseclj-parse-clojure "[foo")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 1, unmatched :lbracket"))
+ "At position 1, unmatched :lbracket"))
(should (equal
(condition-case errdata
(parseclj-parse-clojure "(1 2 [ 4)")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 6, unmatched :lbracket"))
+ "At position 6, unmatched :lbracket"))
(should (equal
(condition-case errdata
(parseclj-parse-clojure "1 2 #_")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 5, unmatched :discard"))
+ "At position 5, unmatched :discard"))
(should (equal
(condition-case errdata
(parseclj-parse-clojure "(1 [2 {3 ( 4}])")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 10, unmatched :lparen")))
+ "At position 10, unmatched :lparen")))
(ert-deftest parseclj-parse-clojure-fail-fast-test ()
(should (equal
(condition-case errdata
(parseclj-parse-clojure "foo]")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 4, unmatched :rbracket"))
+ "At position 4, unmatched :rbracket"))
(should (equal
(condition-case errdata
(parseclj-parse-clojure "[foo")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 1, unmatched :lbracket"))
+ "At position 1, unmatched :lbracket"))
(should (equal
(condition-case errdata
(parseclj-parse-clojure "(1 2 [ 4)")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 6, unmatched :lbracket"))
+ "At position 6, unmatched :lbracket"))
(should (equal
(condition-case errdata
(parseclj-parse-clojure "1 2 #_")
(parseclj-parse-error (cadr errdata)))
- "parseclj: Syntax Error at position 5, unmatched :discard"))
+ "At position 5, unmatched :discard"))
(should (equal (parseclj-parse-clojure "(1 [2 {3 ( 4}])" :fail-fast nil)
'((:node-type . :root)
- [nongnu] elpa/parseclj a8c4cf30fb 185/185: Correctly bump versions, (continued)
- [nongnu] elpa/parseclj a8c4cf30fb 185/185: Correctly bump versions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 7ae887b1de 037/185: Refactor clj-parse.el, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj a83816010e 039/185: Refactor clj-parse-test., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 9d4c0b7b4b 041/185: Merge pull request #2 from volrath/tag-support, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 879ac980a8 056/185: Treat numbers with trailing symbol characters as lex errors, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 2781f0cd7f 088/185: Vocab chage: closer/opener => closing-token/opening-token, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 4fc37462ab 073/185: Make Travis use Cask, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj a71e57df4d 080/185: Rename clj-lex to parseclj-lex, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 168027fed5 094/185: Merge pull request #7 from lambdaisland/reorganize-package, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 45bd6a7431 109/185: Clean up tests, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 1f8e449897 105/185: Simplify error messages,
ELPA Syncer <=
- [nongnu] elpa/parseclj f362018ff1 112/185: Silence the byte-compiler about some unused vars., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 70804992ee 122/185: Merge pull request #14 from lambdaisland/parseclj-lex-symbol-fix, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 19ca5f5bd0 121/185: Stick to the previous Travis Trusty image, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj b2550e6456 133/185: Add docstring for `parseclj-lex--string-value`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 13059d8529 138/185: Minor checkdoc fixes, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 49c715ed22 148/185: For prefix-2 elements: pass children to reduce in right order, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj dc0d165b0a 152/185: Merge pull request #23 from clojure-emacs/read-one, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 62c9bf9126 177/185: Remove the last remains of a.el, restructure requires, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 517a371616 166/185: Use map-elt instead of parseclj-alist-get, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj ba04dbe334 171/185: Remove remaining a-list call, move a.el to be test-only, ELPA Syncer, 2021/12/28