emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] scratch/org-edna bb284dc 27/72: Fixed parsing bug


From: Ian Dunn
Subject: [elpa] scratch/org-edna bb284dc 27/72: Fixed parsing bug
Date: Sun, 21 May 2017 21:11:22 -0400 (EDT)

branch: scratch/org-edna
commit bb284dc7e62f774980c2770d0e3b5acf6e0fb03d
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>

    Fixed parsing bug
    
    * org-edna.el (org-edna-parse-form): Check for whitespace in between forms.
---
 org-edna.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/org-edna.el b/org-edna.el
index 0ffc997..529900b 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -32,6 +32,7 @@ properties used during actions or conditions."
       (signal 'invalid-read-syntax (substring form pos)))
     ;; Check for either end of string or an opening parenthesis
     (unless (or (equal pos (length form))
+                (equal (string-match-p "\\s-" form pos) pos)
                 (equal (string-match-p "(" form pos) pos))
       (signal 'invalid-read-syntax (substring form pos (1+ pos))))
     ;; Parse arguments if we have any
@@ -63,6 +64,9 @@ properties used during actions or conditions."
     (when (string-match "^\\([!]\\)\\(.*\\)" (symbol-name token))
       (setq modifier (intern (match-string 1 (symbol-name token))))
       (setq token    (intern (match-string 2 (symbol-name token)))))
+    ;; Move across any whitespace
+    (when (string-match "\\s-+" form pos)
+      (setq pos (match-end 0)))
     (list token args modifier pos)))
 
 (defconst org-edna--types



reply via email to

[Prev in Thread] Current Thread [Next in Thread]