diff options
author | Arun Isaac | 2023-10-09 14:51:56 +0100 |
---|---|---|
committer | Arun Isaac | 2023-10-09 20:32:39 +0100 |
commit | 7dbe776cb56803d9c66a847f5ac3613366754838 (patch) | |
tree | 19fc925dec08564921afdb3c9f96955bcf737bfb /ccwl/ccwl.scm | |
parent | 548cc54bc27b92c3a35a79d1af7440fbad896752 (diff) | |
download | ccwl-7dbe776cb56803d9c66a847f5ac3613366754838.tar.gz ccwl-7dbe776cb56803d9c66a847f5ac3613366754838.tar.lz ccwl-7dbe776cb56803d9c66a847f5ac3613366754838.zip |
ccwl: Error out if steps with expression commands have no identifier.
* ccwl/ccwl.scm (collect-steps): Error out if steps with expressions
that evaluate to commands have no identifier.
* tests/ccwl.scm ("step with expression that evaluates to a command
but without a step identifier must raise a &ccwl-violation
condition"): New test.
Diffstat (limited to 'ccwl/ccwl.scm')
-rw-r--r-- | ccwl/ccwl.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm index b158947..286fd7a 100644 --- a/ccwl/ccwl.scm +++ b/ccwl/ccwl.scm @@ -535,6 +535,12 @@ represented by <step> objects." (pairify (syntax->datum #'(args ...))))))))) ;; ccwl functions with an implicit step identifier ((function args ...) + ;; Ensure that steps with expression commands have identifiers. + (unless (symbol? (syntax->datum #'function)) + (raise-exception + (condition (ccwl-violation #'function) + (formatted-message "Step with expression ~a that evaluates to a command must have identifier" + (syntax->datum #'function))))) (collect-steps #'(function (function) args ...) input-keys)) ;; any other unrecognized syntax |