[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/yaml 67d4b64d15 022/124: Bug fixes
From: |
ELPA Syncer |
Subject: |
[elpa] externals/yaml 67d4b64d15 022/124: Bug fixes |
Date: |
Fri, 29 Nov 2024 15:59:55 -0500 (EST) |
branch: externals/yaml
commit 67d4b64d15edde10010ac569c91e62e5566ccda6
Author: Zachary Romero <zacromero@posteo.net>
Commit: Zachary Romero <zacromero@posteo.net>
Bug fixes
---
yaml.el | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/yaml.el b/yaml.el
index cc13807b1d..1dedea6d8d 100644
--- a/yaml.el
+++ b/yaml.el
@@ -567,7 +567,7 @@ This flag is intended for development purposes.")
(declare (indent defun))
(let ((res-symbol (make-symbol "res")))
`(let ((beg yaml--parsing-position)
- (_ (when (and yaml--parse-debug ,res-symbol (not (member ,name
yaml--tracing-ignore)))
+ (_ (when (and yaml--parse-debug (not (member ,name
yaml--tracing-ignore)))
(message "|%s>%s %40s \"%s\""
(make-string (length yaml--states) ?-)
(make-string (- 70 (length yaml--states)) ?\s)
@@ -902,7 +902,7 @@ value. It defaults to the symbol :false."
(let ((res (yaml--parse string
(yaml--top))))
- (when (and yaml--parse-debug (< yaml--parsing-position (length
yaml--parsing-input)))
+ (when (< yaml--parsing-position (length yaml--parsing-input))
(error (format "parser finished before end of input %s/%s"
yaml--parsing-position
(length yaml--parsing-input))))
@@ -947,9 +947,14 @@ Rules for this function are defined by the yaml-spec JSON
file."
(let ((n (nth 0 args))
(c (nth 1 args)))
(yaml--frame "ns-flow-map-implicit-entry"
- (yaml--any (yaml--parse-from-grammar 'ns-flow-map-yaml-key-entry n c)
- (yaml--parse-from-grammar 'c-ns-flow-map-empty-key-entry n
c)
- (yaml--parse-from-grammar 'c-ns-flow-map-json-key-entry n
c)))))
+ ;; NOTE: I ran into a bug with the order of these rules. It seems
+ ;; sometimes ns-flow-map-yaml-key-entry succeeds with an empty
+ ;; when the correct answer should be
+ ;; c-ns-flow-map-json-key-entry. Changing the order seemed to
+ ;; have fix this but this seems like a bandage fix.
+ (yaml--any (yaml--parse-from-grammar 'c-ns-flow-map-json-key-entry n c)
+ (yaml--parse-from-grammar 'ns-flow-map-yaml-key-entry n c)
+ (yaml--parse-from-grammar 'c-ns-flow-map-empty-key-entry n
c)))))
((eq state 'ns-esc-double-quote)
(yaml--frame "ns-esc-double-quote"
@@ -1393,7 +1398,7 @@ Rules for this function are defined by the yaml-spec JSON
file."
(message "c-chomping-indicator: %s" (yaml--state-curr-t)))))
((eq state 'ns-global-tag-prefix) (yaml--frame "ns-global-tag-prefix"
(yaml--all (yaml--parse-from-grammar 'ns-tag-char) (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 'ns-uri-char))))))
- ((eq state 'c-ns-flow-pair-json-key-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "c-ns-flow-pair-json-key-entry" (yaml--all
(yaml--parse-from-grammar 'c-s-implicit-json-key (yaml--parse-from-grammar
'flow-key)) (yaml--parse-from-grammar 'c-ns-flow-map-adjacent-value n c)))))
+ ((eq state 'c-ns-flow-pair-json-key-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "c-ns-flow-pair-json-key-entry" (yaml--all
(yaml--parse-from-grammar 'c-s-implicit-json-key "flow-key")
(yaml--parse-from-grammar 'c-ns-flow-map-adjacent-value n c)))))
((eq state 'l-literal-content)
(let ((n (nth 0 args))
@@ -1461,7 +1466,7 @@ Rules for this function are defined by the yaml-spec JSON
file."
((eq state 'ns-flow-pair-entry) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-flow-pair-entry" (yaml--any (yaml--parse-from-grammar
'ns-flow-pair-yaml-key-entry n c) (yaml--parse-from-grammar
'c-ns-flow-map-empty-key-entry n c) (yaml--parse-from-grammar
'c-ns-flow-pair-json-key-entry n c)))))
((eq state 'c-flow-indicator) (yaml--frame "c-flow-indicator" (yaml--any
(yaml--chr ?\,) (yaml--chr ?\[) (yaml--chr ?\]) (yaml--chr ?\{) (yaml--chr
?\}))))
- ((eq state 'ns-flow-pair-yaml-key-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "ns-flow-pair-yaml-key-entry" (yaml--all
(yaml--parse-from-grammar 'ns-s-implicit-yaml-key (yaml--parse-from-grammar
'flow-key)) (yaml--parse-from-grammar 'c-ns-flow-map-separate-value n c)))))
+ ((eq state 'ns-flow-pair-yaml-key-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "ns-flow-pair-yaml-key-entry" (yaml--all
(yaml--parse-from-grammar 'ns-s-implicit-yaml-key "flow-key")
(yaml--parse-from-grammar 'c-ns-flow-map-separate-value n c)))))
((eq state 'e-scalar) (yaml--frame "e-scalar" (yaml--empty)))
((eq state 's-indent-lt) (let ((n (nth 0 args))) (yaml--frame "s-indent-lt"
(yaml--may (yaml--all (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar
's-space))) (< (length (yaml--match)) n))))))
((eq state 'nb-single-one-line) (yaml--frame "nb-single-one-line"
(yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 'nb-single-char)))))
@@ -1596,7 +1601,7 @@ Rules for this function are defined by the yaml-spec JSON
file."
((eq state 'ns-flow-content) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-flow-content" (yaml--any (yaml--parse-from-grammar
'ns-flow-yaml-content n c) (yaml--parse-from-grammar 'c-flow-json-content n
c)))))
((eq state 'c-ns-flow-map-separate-value) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "c-ns-flow-map-separate-value" (yaml--all (yaml--chr ?\:)
(yaml--chk "!" (yaml--parse-from-grammar 'ns-plain-safe c)) (yaml--any
(yaml--all (yaml--parse-from-grammar 's-separate n c) (yaml--parse-from-grammar
'ns-flow-node n c)) (yaml--parse-from-grammar 'e-node))))))
- ((eq state 'in-flow) (let ((c (nth 0 args))) (yaml--frame "in-flow" (cond
((equal c "block-key") (yaml--parse-from-grammar 'flow-key)) ((equal c
"flow-in") "flow-in") ((equal c "flow-key") (yaml--parse-from-grammar
'flow-key)) ((equal c "flow-out") "flow-in")))))
+ ((eq state 'in-flow) (let ((c (nth 0 args))) (yaml--frame "in-flow" (cond
((equal c "block-key") "flow-key") ((equal c "flow-in") "flow-in") ((equal c
"flow-key") "flow-key") ((equal c "flow-out") "flow-in")))))
((eq state 'c-verbatim-tag) (yaml--frame "c-verbatim-tag" (yaml--all
(yaml--chr ?\!) (yaml--chr ?\<) (yaml--rep 1 nil (lambda ()
(yaml--parse-from-grammar 'ns-uri-char))) (yaml--chr ?\>))))
((eq state 'c-literal) (yaml--frame "c-literal" (yaml--chr ?\|)))
((eq state 'ns-esc-line-feed) (yaml--frame "ns-esc-line-feed" (yaml--chr
?\n)))
- [elpa] branch externals/yaml created (now 70c4fcead9), ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 57254d464a 002/124: update schema, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml b33b2ba412 003/124: Add test file, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 891e158930 008/124: Got parser mostly working., ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 04aae95584 043/124: Fix/add pcase usages, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 67d4b64d15 022/124: Bug fixes,
ELPA Syncer <=
- [elpa] externals/yaml 95283d460f 034/124: Add emacs 25.1 CI test, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 67e8b5f3dc 096/124: Fix off-by-one bug for storing position, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml a47f5a8274 054/124: indent buffer, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 164cd43d6e 087/124: Merge pull request #34 from zkry/fix-bad-anchor-map->list-conversion, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml e711e774b1 074/124: Allow parsing false and/or null as nil, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 50a3a00cb8 061/124: FIX insert symbol name when not equal to :null or :false, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml ee9001e091 063/124: Fix the escape character in parser (after /), ELPA Syncer, 2024/11/29
- [elpa] externals/yaml ee86566af1 114/124: Merge pull request #47 from tarsiiformes/typos, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml a15b045399 010/124: Condense grammar functions to one, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 0bb76de608 009/124: Add YAML scalar conversion and type conversion, ELPA Syncer, 2024/11/29