From c0223d28f0e6d185bfadf36c74fe068ca521ebe7 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 27 Jun 2016 22:06:23 -0700 Subject: [PATCH] core: back to ; optional now. --- core/generic/parser/parser.factor | 2 +- core/syntax/syntax.factor | 12 ++++++------ frameworks/ui/pixel-formats/pixel-formats.factor | 14 +++++++------- language/functors/functors-tests.factor | 8 ++++---- language/functors/functors.factor | 6 ++---- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/core/generic/parser/parser.factor b/core/generic/parser/parser.factor index bf54ab61d8..583666d7ff 100644 --- a/core/generic/parser/parser.factor +++ b/core/generic/parser/parser.factor @@ -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 ; diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index 0462245510..f2ea4be814 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -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 ] 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:" [ diff --git a/frameworks/ui/pixel-formats/pixel-formats.factor b/frameworks/ui/pixel-formats/pixel-formats.factor index 5175d9a35f..adbd8a57ef 100644 --- a/frameworks/ui/pixel-formats/pixel-formats.factor +++ b/frameworks/ui/pixel-formats/pixel-formats.factor @@ -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 -- ) diff --git a/language/functors/functors-tests.factor b/language/functors/functors-tests.factor index df1cc70468..ca1082a3cc 100644 --- a/language/functors/functors-tests.factor +++ b/language/functors/functors-tests.factor @@ -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 ; +C: 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 diff --git a/language/functors/functors.factor b/language/functors/functors.factor index de4d0966cc..a930759cc3 100644 --- a/language/functors/functors.factor +++ b/language/functors/functors.factor @@ -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: