[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4f9177f 3/3: Merge commit '21f5a11' from GitHub
From: |
Junpeng Qiu |
Subject: |
[elpa] master 4f9177f 3/3: Merge commit '21f5a11' from GitHub |
Date: |
Fri, 28 Oct 2016 00:30:24 +0000 (UTC) |
branch: master
commit 4f9177facbb30f3832b70889f02cc620fa080f52
Merge: 8454e71 21f5a11
Author: Junpeng Qiu <address@hidden>
Commit: Junpeng Qiu <address@hidden>
Merge commit '21f5a11' from GitHub
---
packages/parsec/parsec.el | 48 ++++++++++++++++++++++-----------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/packages/parsec/parsec.el b/packages/parsec/parsec.el
index 6abc7b9..3432e3d 100644
--- a/packages/parsec/parsec.el
+++ b/packages/parsec/parsec.el
@@ -572,30 +572,6 @@
(parsec-stop :expected (format "%s" pred)
:found (parsec-eof-or-char-as-string)))))
-(defun parsec-newline ()
- "Parse a newline character \"\\n\"."
- (parsec-ch ?\n))
-
-(defun parsec-crlf ()
- "Parse a carriage return (\'\\r\') followed by a newline \"\\n\"."
- (parsec-and (parsec-ch ?\r) (parsec-ch ?\n)))
-
-(defun parsec-eol ()
- "Parse a newline or a CRLF and return \"\\n\"."
- (parsec-or (parsec-newline) (parsec-crlf)))
-
-(defun parsec-eob ()
- "Indicate the end of file (buffer)."
- (unless (eobp)
- (parsec-stop :expected "`EOF'"
- :found (parsec-eof-or-char-as-string))))
-
-(defalias 'parsec-eof 'parsec-eob)
-
-(defun parsec-eol-or-eof ()
- "Indicate either eol or eof."
- (parsec-or (parsec-eol) (parsec-eof)))
-
(defun parsec-re (regexp)
"Parse the input matching the regular expression REGEXP."
(if (looking-at regexp)
@@ -1029,6 +1005,30 @@ Otherwise, return `(Just . p)' where p is the result of
PARSER."
(parsec-just ,res-sym)
parsec-nothing))))
+(defun parsec-newline ()
+ "Parse a newline character \"\\n\"."
+ (parsec-ch ?\n))
+
+(defun parsec-crlf ()
+ "Parse a carriage return (\'\\r\') followed by a newline \"\\n\"."
+ (parsec-and (parsec-ch ?\r) (parsec-ch ?\n)))
+
+(defun parsec-eol ()
+ "Parse a newline or a CRLF and return \"\\n\"."
+ (parsec-or (parsec-newline) (parsec-crlf)))
+
+(defun parsec-eob ()
+ "Indicate the end of file (buffer)."
+ (unless (eobp)
+ (parsec-stop :expected "`EOF'"
+ :found (parsec-eof-or-char-as-string))))
+
+(defalias 'parsec-eof 'parsec-eob)
+
+(defun parsec-eol-or-eof ()
+ "Indicate either eol or eof."
+ (parsec-or (parsec-eol) (parsec-eof)))
+
(defmacro parsec-with-input (input &rest parsers)
"With INPUT, start parsing by applying PARSERS sequentially."
(declare (indent 1))