summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-04-19 09:04:10 -0700
committercolin <colin@cicadas.surf>2024-04-19 09:04:10 -0700
commit26ab73172038366a3796b7cac5ebd82e7a4a12e0 (patch)
treede10f8d13fc979aaf3e18b2f81b51112454397da
parent6e075d897d8f293c17e52cb41fd50d5660e0db55 (diff)
Syntax changes
-rw-r--r--obwyn.lisp14
1 files changed, 7 insertions, 7 deletions
diff --git a/obwyn.lisp b/obwyn.lisp
index 19e2501..2fddfca 100644
--- a/obwyn.lisp
+++ b/obwyn.lisp
@@ -2,7 +2,7 @@
(:use #:cl)
(:local-nicknames
(#:a #:alexandria-2))
- (:export #:<- #:<~ #:>> #:<? #:?))
+ (:export #:do>))
(in-package :obwyn)
@@ -85,7 +85,7 @@
(defun literals-equal (a b)
(and (symbolp a) (symbolp b) (string-equal a b)))
-(argot:deflanguage >> (:literals= #'literals-equal)
+(argot:deflanguage do> (:literals= #'literals-equal)
(<start>
:match (:seq (:* <clause>) (:eof))
:then (expand-clauses (first <start>)))
@@ -98,13 +98,13 @@
<simple-clause>))
(<binding-clause>
- :match (:seq <values-bind> (:= :<-) (:item))
+ :match (:seq <values-bind> (:= :=) (:item))
:then (destructuring-bind (bindings _ form) <binding-clause>
(declare (ignore _))
(list :mvbind bindings form)))
(<predicate-binding-clause>
- :match (:seq (:@ var (:item)) (:= :<?) (:@ form (:item)))
+ :match (:seq (:@ var (:item)) (:= :when=) (:@ form (:item)))
:if (and (symbolp var) (not (keywordp var)))
:then (list :bindif var form)
:note "Bind variable to form, exit early if form evaluated to nil.")
@@ -115,7 +115,7 @@
:note "Either a symbol or a list suitable for passing to MULTIPLE-VALUE-BIND")
(<destructuring-clause>
- :match (:seq <destructuring-list> (:= :<~) (:item))
+ :match (:seq <destructuring-list> (:= :match=) (:item))
:then (destructuring-bind (bindings _ form) <destructuring-clause>
(declare (ignore _))
(list :dsbind bindings form)))
@@ -126,11 +126,11 @@
:note "An list that might be passed as the first argument to DESTRUCTURING-BIND.")
(<predicate-clause>
- :match (:seq (:= :?) (:item))
+ :match (:seq (:or= :when :?) (:item))
:then (list :when nil (second <predicate-clause>)))
(<simple-clause>
:match (:@ simple (:item))
- :if (not (member simple '(:<~ :<- :? :<?) :test #'literals-equal))
+ :if (not (member simple '(:when= :match= :when :=) :test #'literals-equal))
:then (list :simple nil simple)))