diff --git a/core/bootstrap/syntax.factor b/core/bootstrap/syntax.factor index 51d4b6834b..19a234319d 100644 --- a/core/bootstrap/syntax.factor +++ b/core/bootstrap/syntax.factor @@ -13,6 +13,14 @@ IN: bootstrap.syntax ":" ";" "" + "UNIX>" + "LINUX>" + "MACOS>" "B{" "BV{" "C:" diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index 4b84a7d4f4..ac14a858c3 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -11,9 +11,9 @@ generic.standard hash-sets hashtables hashtables.identity hints init interpolate io.pathnames kernel lexer locals.errors locals.parser locals.types macros math memoize multiline namespaces parser quotations sbufs sequences slots source-files -splitting stack-checker strings strings.parser typed vectors -vocabs.parser words words.alias words.constant words.inlined -words.symbol ; +splitting stack-checker strings strings.parser system typed +vectors vocabs.parser vocabs.platforms words words.alias +words.constant words.inlined words.symbol ; IN: bootstrap.syntax ! These words are defined as a top-level form, instead of with @@ -52,7 +52,7 @@ IN: bootstrap.syntax dup [ define-fry-specifier ] curry each ; [ - { "]" "}" ";" ">>" } [ define-delimiter ] each + { "]" "}" ";" ">>" "UNIX>" "MACOS>" "LINUX>" "WINDOWS>" } [ define-delimiter ] each "PRIMITIVE:" [ current-vocab name>> @@ -69,6 +69,27 @@ IN: bootstrap.syntax "PRIVATE>" [ end-private ] define-core-syntax + "" parse-multiline-string + os unix? [ ".unix" parse-platform-section ] [ drop ] if + ] define-core-syntax + + "" parse-multiline-string + os macosx? [ ".macos" parse-platform-section ] [ drop ] if + ] define-core-syntax + + "" parse-multiline-string + os linux? [ ".linux" parse-platform-section ] [ drop ] if + ] define-core-syntax + + "" parse-multiline-string + os windows? [ ".windows" parse-platform-section ] [ drop ] if + ] define-core-syntax + + "USE:" [ scan-token use-vocab ] define-core-syntax "UNUSE:" [ scan-token unuse-vocab ] define-core-syntax diff --git a/basis/vocabs/platforms/authors.txt b/core/vocabs/platforms/authors.txt similarity index 100% rename from basis/vocabs/platforms/authors.txt rename to core/vocabs/platforms/authors.txt diff --git a/basis/vocabs/platforms/platforms.factor b/core/vocabs/platforms/platforms.factor similarity index 57% rename from basis/vocabs/platforms/platforms.factor rename to core/vocabs/platforms/platforms.factor index eeba724b4f..755e007e12 100644 --- a/basis/vocabs/platforms/platforms.factor +++ b/core/vocabs/platforms/platforms.factor @@ -18,19 +18,3 @@ IN: vocabs.platforms [ [ string-lines parse-lines ] curry with-nested-compilation-unit ] curry ] dip with-vocabulary drop ; inline - -SYNTAX: \" parse-multiline-string - os unix? [ ".unix" parse-platform-section ] [ drop ] if ; - -SYNTAX: \" parse-multiline-string - os macosx? [ ".macosx" parse-platform-section ] [ drop ] if ; - -SYNTAX: \" parse-multiline-string - os linux? [ ".linux" parse-platform-section ] [ drop ] if ; - -SYNTAX: \" parse-multiline-string - os windows? [ ".windows" parse-platform-section ] [ drop ] if ;