core: back to ; optional now.

locals-and-roots
Doug Coleman 2016-06-27 22:06:23 -07:00
parent 77b6f610d9
commit c0223d28f0
5 changed files with 20 additions and 22 deletions

View File

@ -9,7 +9,7 @@ ERROR: not-in-a-method-error ;
: scan-new-generic ( -- word ) scan-new dup reset-word ;
: (GENERIC:) ( quot -- )
[ scan-new-generic ] dip call scan-effect ";" expect define-generic ; inline
[ scan-new-generic ] dip call scan-effect define-generic ; inline
: create-method-in ( class generic -- method )
create-method dup set-last-word dup save-location ;

View File

@ -150,7 +150,7 @@ IN: bootstrap.syntax
"PRIMITIVE:" [
current-vocab name>>
scan-word scan-effect ";" expect ensure-primitive
scan-word scan-effect ensure-primitive
] define-core-syntax
"CS{" [
@ -171,7 +171,7 @@ IN: bootstrap.syntax
"QUALIFIED:" [ scan-token dup add-qualified ] define-core-syntax
"QUALIFIED-WITH:" [ scan-token scan-token ";" expect add-qualified ] define-core-syntax
"QUALIFIED-WITH:" [ scan-token scan-token add-qualified ] define-core-syntax
"FROM:" [
scan-token "=>" expect ";" parse-tokens add-words-from
@ -265,11 +265,11 @@ IN: bootstrap.syntax
"ALIAS:" [
scan-new-escaped scan-escaped-word ";" expect define-alias
scan-new-escaped scan-escaped-word define-alias
] define-core-syntax
"CONSTANT:" [
scan-new-word scan-object ";" expect define-constant
scan-new-word scan-object define-constant
] define-core-syntax
":" [
@ -310,7 +310,7 @@ IN: bootstrap.syntax
"INSTANCE:" [
location [
scan-word scan-word ";" expect 2dup add-mixin-instance
scan-word scan-word 2dup add-mixin-instance
<mixin-instance>
] dip remember-definition
] define-core-syntax
@ -342,7 +342,7 @@ IN: bootstrap.syntax
] define-core-syntax
"C:" [
scan-new-word scan-word ";" expect define-boa-word
scan-new-word scan-word define-boa-word
] define-core-syntax
"ERROR:" [

View File

@ -41,9 +41,9 @@ TUPLE: aux-buffers < pixel-format-attribute ;
TUPLE: sample-buffers < pixel-format-attribute ;
TUPLE: samples < pixel-format-attribute ;
HOOK: (make-pixel-format) ui-backend ( world attributes -- pixel-format-handle ) ;
HOOK: (free-pixel-format) ui-backend ( pixel-format -- ) ;
HOOK: (pixel-format-attribute) ui-backend ( pixel-format attribute-name -- value ) ;
HOOK: (make-pixel-format) ui-backend ( world attributes -- pixel-format-handle )
HOOK: (free-pixel-format) ui-backend ( pixel-format -- )
HOOK: (pixel-format-attribute) ui-backend ( pixel-format attribute-name -- value )
ERROR: invalid-pixel-format-attributes world attributes ;
@ -67,7 +67,7 @@ FUNCTOR< define-pixel-format-attribute-table ( NAME PERM TABLE -- )
WHERE
GENERIC: >PFA ( attribute -- pfas ) ;
GENERIC: >PFA ( attribute -- pfas )
M: object >PFA
drop { } ;
@ -84,10 +84,10 @@ M: pixel-format-attribute >PFA
FUNCTOR>
SYNTAX: \ PIXEL-FORMAT-ATTRIBUTE-TABLE:
scan-token scan-object scan-object ";" expect define-pixel-format-attribute-table ;
scan-token scan-object scan-object define-pixel-format-attribute-table ;
PRIVATE>
GENERIC: world-pixel-format-attributes ( world -- attributes ) ;
GENERIC: world-pixel-format-attributes ( world -- attributes )
GENERIC#: check-world-pixel-format 1 ( world pixel-format -- ) ;
GENERIC#: check-world-pixel-format 1 ( world pixel-format -- )

View File

@ -1,6 +1,6 @@
USING: classes.struct classes.tuple functors tools.test math
words kernel parser io.streams.string generic ;
QUALIFIED-WITH: alien.c-types c ;
QUALIFIED-WITH: alien.c-types c
IN: functors.tests
COMPILE<
@ -14,7 +14,7 @@ WHERE
TUPLE: B { value T } ;
C: <B> B ;
C: <B> B
FUNCTOR>
@ -90,7 +90,7 @@ W DEFINES ${W}
WHERE
GENERIC: W ( a -- b ) ;
GENERIC: W ( a -- b )
M: object W ;
M: integer W 1 + ;
@ -137,7 +137,7 @@ WHERE
TUPLE: W-tuple ;
: W-word ( -- ) ;
GENERIC: W-generic ( a -- b ) ;
GENERIC: W-generic ( a -- b )
M: W-tuple W-generic ;
SYMBOL: W-symbol

View File

@ -17,7 +17,7 @@ TUPLE: fake-call-next-method ;
TUPLE: fake-quotation seq ;
GENERIC: >fake-quotations ( quot -- fake ) ;
GENERIC: >fake-quotations ( quot -- fake )
M: callable >fake-quotations
>array >fake-quotations fake-quotation boa ;
@ -26,7 +26,7 @@ M: array >fake-quotations [ >fake-quotations ] { } map-as ;
M: object >fake-quotations ;
GENERIC: (fake-quotations>) ( fake -- ) ;
GENERIC: (fake-quotations>) ( fake -- )
: fake-quotations> ( fake -- quot )
[ (fake-quotations>) ] [ ] make ;
@ -107,13 +107,11 @@ FUNCTOR-SYNTAX: \ SYNTAX:
FUNCTOR-SYNTAX: \ INSTANCE:
scan-param suffix!
scan-param suffix!
";" expect
\ add-mixin-instance suffix! ;
FUNCTOR-SYNTAX: \ GENERIC:
scan-param suffix!
scan-effect suffix!
";" expect
\ define-simple-generic* suffix! ;
FUNCTOR-SYNTAX: \ MACRO: