From d2114e913c5735f52f438ca2ba001f92aa359e23 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 21 May 2020 14:19:43 -0700 Subject: [PATCH] syntax: allow anonymous MAIN:. --- core/syntax/syntax.factor | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index 06ec62fb8c..d6ce678e4d 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -242,8 +242,10 @@ IN: bootstrap.syntax ] define-core-syntax "MAIN:" [ - scan-word - dup ( -- ) check-stack-effect + scan-word dup \ [ = [ + drop "( main )" dup + parse-quotation ( -- ) define-declared + ] when dup ( -- ) check-stack-effect [ current-vocab main<< ] [ current-source-file get [ main<< ] [ drop ] if* ] bi ] define-core-syntax