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
"MAIN:" [
scan-word
dup ( -- ) check-stack-effect
scan-word dup \ [ = [
drop "( main )" <uninterned-word> dup
parse-quotation ( -- ) define-declared
] when dup ( -- ) check-stack-effect
[ current-vocab main<< ]
[ current-source-file get [ main<< ] [ drop ] if* ] bi
] define-core-syntax