substitution WIP

This commit is contained in:
Rutger van Beusekom 2017-02-19 15:02:54 +01:00
parent 0a75234e52
commit 57b93d2902
4 changed files with 3 additions and 3 deletions

View File

@ -179,6 +179,7 @@ the GNU Public License, see COPYING for the copyleft.
(('script term "&") (list (background (transform term))))
(('script term) `(,(transform term)))
(('script terms ...) (transform terms))
(('substitution "$(" (script) ")") (stderr "FOO: " (transform script)) (transform script))
((('term command)) `(,(transform command)))
((('term command) ...) (map transform command))
((('term command) (('term commands) ...)) (map transform (cons command commands)))

View File

@ -37,8 +37,7 @@
(define-peg-pattern here-document all (and (+ (and (not-followed-by here-delim) peg-any)) here-delim))
(define-peg-string-patterns
"script <-- ws* (term (separator term)* separator?)? eof
eof < !. / error
"script <-- ws* (term (separator term)* separator?)?
error <-- .*
term <-- pipeline (sp* ('&&' / '||') ws* pipeline)*
pipeline <-- '!'? sp* command (sp* pipe ws* command)*

View File

@ -1 +0,0 @@
echo "$(ls)"

1
todo/substitution Normal file
View File

@ -0,0 +1 @@
echo $(find test -type f)