core: adding lowercase syntax to core.

locals-and-roots
Doug Coleman 2016-06-03 11:18:48 -07:00
parent 5e8244c47e
commit 9f40bd3bac
3 changed files with 29 additions and 0 deletions

View File

@ -17,7 +17,9 @@ IN: bootstrap.syntax
"BV{"
"C:"
"CHAR:"
"char:"
"DEFER:"
"defer:"
"ERROR:"
"FORGET:"
"GENERIC#"
@ -26,14 +28,18 @@ IN: bootstrap.syntax
"H{"
"HS{"
"IN:"
"in:"
"INSTANCE:"
"M:"
"MAIN:"
"main:"
"MATH:"
"MIXIN:"
"NAN:"
"nan:"
"P\""
"POSTPONE:"
"postpone:"
"PREDICATE:"
"PRIMITIVE:"
"PRIVATE>"
@ -41,7 +47,9 @@ IN: bootstrap.syntax
"SINGLETON:"
"SINGLETONS:"
"BUILTIN:"
"builtin:"
"SYMBOL:"
"symbol:"
"SYMBOLS:"
"CONSTANT:"
"TUPLE:"
@ -51,6 +59,7 @@ IN: bootstrap.syntax
"UNION:"
"INTERSECTION:"
"USE:"
"use:"
"UNUSE:"
"USING:"
"QUALIFIED:"
@ -73,6 +82,12 @@ IN: bootstrap.syntax
"foldable"
"inline"
"recursive"
"@delimiter"
"@deprecated"
"@flushable"
"@foldable"
"@inline"
"@recursive"
"t"
"{"
"}"

View File

@ -98,6 +98,7 @@ GENERIC: literal>tag ( class -- string/f )
M: line-comment-literal literal>tag drop f ;
M: uppercase-colon-literal literal>tag
tag>> [ "word" ] [ >lower ] if-empty ;
! M: lowercase-colon-literal literal>tag tag>> ;
M: compound-literal literal>tag
base-literal literal>tag ;

View File

@ -68,12 +68,14 @@ IN: bootstrap.syntax
] define-core-syntax
"IN:" [ scan-token set-current-vocab ] define-core-syntax
"in:" [ scan-token set-current-vocab ] define-core-syntax
"<PRIVATE" [ begin-private ] define-core-syntax
"PRIVATE>" [ end-private ] define-core-syntax
"USE:" [ scan-token use-vocab ] define-core-syntax
"use:" [ scan-token use-vocab ] define-core-syntax
"UNUSE:" [ scan-token unuse-vocab ] define-core-syntax
@ -128,6 +130,7 @@ IN: bootstrap.syntax
"HS{" [ \ } [ >hash-set ] parse-literal ] define-core-syntax
"POSTPONE:" [ scan-word suffix! ] define-core-syntax
"postpone:" [ scan-word suffix! ] define-core-syntax
"\\" [ scan-word <wrapper> suffix! ] define-core-syntax
"M\\" [ scan-word scan-word lookup-method <wrapper> suffix! ] define-core-syntax
"inline" [ last-word make-inline ] define-core-syntax
@ -137,6 +140,13 @@ IN: bootstrap.syntax
"delimiter" [ last-word t "delimiter" set-word-prop ] define-core-syntax
"deprecated" [ last-word make-deprecated ] define-core-syntax
"@inline" [ last-word make-inline ] define-core-syntax
"@recursive" [ last-word make-recursive ] define-core-syntax
"@foldable" [ last-word make-foldable ] define-core-syntax
"@flushable" [ last-word make-flushable ] define-core-syntax
"@delimiter" [ last-word t "delimiter" set-word-prop ] define-core-syntax
"@deprecated" [ last-word make-deprecated ] define-core-syntax
"SYNTAX:" [
scan-new-word
mark-top-level-syntax
@ -152,6 +162,9 @@ IN: bootstrap.syntax
"SYMBOL:" [
scan-new-word define-symbol
] define-core-syntax
"symbol:" [
scan-new-word define-symbol
] define-core-syntax
"SYMBOLS:" [
";" [ create-word-in [ reset-generic ] [ define-symbol ] bi ] each-token