From e8a72b0268c98e8ba5667f4f505d0ba3582e6b2c Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 24 Sep 2017 12:36:34 -0500 Subject: [PATCH] modern: Disallow compound syntax for now. --- extra/modern/modern.factor | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extra/modern/modern.factor b/extra/modern/modern.factor index 8cc7dc8cda..4304f45cfd 100644 --- a/extra/modern/modern.factor +++ b/extra/modern/modern.factor @@ -293,6 +293,12 @@ ERROR: mismatched-terminator n string slice ; f ] if ; inline +ERROR: compound-syntax-disallowed seq i obj ; +: check-for-compound-syntax ( seq -- seq' ) + dup [ length 1 > ] find + [ compound-syntax-disallowed ] [ drop ] if* + concat ; + : string>literals ( string -- sequence ) [ 0 ] dip [ [ @@ -306,7 +312,7 @@ ERROR: mismatched-terminator n string slice ; ] loop ] { } make f like [ , ] when* over ] loop - ] { } make 2nip ; + ] { } make 2nip check-for-compound-syntax ; : vocab>literals ( vocab -- sequence ) ".private" ?tail drop