syntax: allow anonymous MAIN:.

master
John Benediktsson 2020-05-21 14:19:43 -07:00
parent 551e079da8
commit d2114e913c
1 changed files with 4 additions and 2 deletions

View File

@ -242,8 +242,10 @@ IN: bootstrap.syntax
] define-core-syntax ] define-core-syntax
"MAIN:" [ "MAIN:" [
scan-word scan-word dup \ [ = [
dup ( -- ) check-stack-effect drop "( main )" <uninterned-word> dup
parse-quotation ( -- ) define-declared
] when dup ( -- ) check-stack-effect
[ current-vocab main<< ] [ current-vocab main<< ]
[ current-source-file get [ main<< ] [ drop ] if* ] bi [ current-source-file get [ main<< ] [ drop ] if* ] bi
] define-core-syntax ] define-core-syntax