diff --git a/basis/lists/lists.factor b/basis/lists/lists.factor index c47b0b3d26..f0352e8b8d 100644 --- a/basis/lists/lists.factor +++ b/basis/lists/lists.factor @@ -105,6 +105,8 @@ M: list >list ; M: sequence >list sequence>list ; +ERROR: list-syntax-error ; + list ( sequence -- list ) @@ -115,7 +117,7 @@ M: sequence >list sequence>list ; : (parse-list-literal) ( right-of-dot? -- ) scan-token { { "}" [ drop +nil+ , ] } - { "." [ drop t (parse-list-literal) ] } + { "." [ [ list-syntax-error ] when t (parse-list-literal) ] } [ parse-datum dup parsing-word? [ V{ } clone swap execute-parsing first