From: Mark Wooding Date: Sun, 30 Aug 2015 09:58:38 +0000 (+0100) Subject: src/pset-parse.lisp: Allow brace-enclosed fragments as property values. X-Git-Tag: 0.2.0~51 X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/dbac800b3d4476312e1fc73e87931f31cdfdd9a0?hp=3f4ac959a30787a952451c672e6e97d4469631a9 src/pset-parse.lisp: Allow brace-enclosed fragments as property values. --- diff --git a/src/pset-parse.lisp b/src/pset-parse.lisp index f81ce92..11b4003 100644 --- a/src/pset-parse.lisp +++ b/src/pset-parse.lisp @@ -82,7 +82,8 @@ expression: term | expression `+' term | expression `-' term term: factor | term `*' factor | term `/' factor factor: primary | `+' factor | `-' factor - primary: int | id | string | `(' expression `)' | `?' lisp-expression + primary: int | id | string | `(' expression `)' | `{' fragment `}' + | `?' lisp-expression Only operators for dealing with integers are provided." (with-parser-context (token-scanner-context :scanner scanner) @@ -101,6 +102,11 @@ (multiple-value-bind (type value) (decode-property sexp) (values (cons type value) t t)))) + (#\{ + (values (cons :fragment + (parse-delimited-fragment scanner + #\{ #\})) + t t)) (t (values (list :int :id :char :string #\?) nil nil)))))