]> gitweb.factorcode.org Git - factor.git/commitdiff
basis/,extra/: using parse-array-def in a bunch of places
authorBjörn Lindqvist <bjourne@gmail.com>
Sat, 3 Dec 2016 12:16:08 +0000 (13:16 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Sat, 3 Dec 2016 12:23:24 +0000 (13:23 +0100)
basis/help/syntax/syntax.factor
basis/help/tips/tips-docs.factor
basis/help/tips/tips.factor
core/classes/union/union-tests.factor
core/syntax/syntax.factor
extra/gpu/render/render.factor
extra/gpu/shaders/shaders.factor

index 74c14e1f87acd2667f45292464dd3b4c4a6a7543..73f72e7b22e24f529fb8092ac024704153ca8d11 100644 (file)
@@ -7,14 +7,14 @@ IN: help.syntax
 SYNTAX: HELP:
     scan-word bootstrap-word
     [ >link save-location ]
-    [ [ \ ; parse-until >array ] dip set-word-help ]
+    [ [ parse-array-def ] dip set-word-help ]
     bi ;
 
 ERROR: article-expects-name-and-title got ;
 
 SYNTAX: ARTICLE:
     location [
-        \ ; parse-until >array
+        parse-array-def
         dup length 2 < [ article-expects-name-and-title ] when
         [ first2 ] [ 2 tail ] bi <article>
         over add-article >link
index 1320e7b95c92ecc62e6d84125513d3e2e6fd1660..17890c1a334778a2ad83eb336296d29f4407292d 100644 (file)
@@ -30,7 +30,12 @@ TIP: "Use the " { $link leaks. } " combinator to track down resource leaks." ;
 HELP: TIP:
 { $syntax "TIP: content ;" }
 { $values { "content" "a markup element" } }
-{ $description "Defines a new tip of the day." } ;
+{ $description "Defines a new tip of the day." }
+{ $examples
+  { $unchecked-example
+    "TIP: \"Factor is a fun programming language.\" ;"
+  }
+} ;
 
 ARTICLE: "all-tips-of-the-day" "All tips of the day"
 { $tips-of-the-day } ;
index d85aca9abaf7151cc0590a289d072a39ab3bb175..1b535d8dfad6c73e958fab7061a9abfbe4e676af 100644 (file)
@@ -22,7 +22,7 @@ M: tip set-where loc<< ;
 : add-tip ( tip -- ) tips get push ;
 
 SYNTAX: TIP:
-    parse-definition >array <tip>
+    parse-array-def <tip>
     [ save-location ] [ add-tip ] bi ;
 
 : a-tip ( -- tip ) tips get random ;
index f08cde6cda6f2814d6ca7ed2c83e6c3a10bf12c9..1497c1521a7f4d1732f8a86ac50c9e06d1a63b74 100644 (file)
@@ -105,6 +105,11 @@ M: a-union test-generic ;
 
 { f } [ "fast-union-2?" "classes.union.tests" lookup-word def>> \ fixnum-bitand swap member? ] unit-test
 
+{ { fixnum } } [
+    "IN: classes.union.tests USE: math UNION: um fixnum ;" eval( -- )
+    "um" "classes.union.tests" lookup-word "members" word-prop
+] unit-test
+
 ! Test union{
 
 TUPLE: stuff { a union{ integer string } } ;
index ab760813fce1edd0c0909ec2888982845211ae2e..a0908b704040445add2934b36ed1c1435416a9dc 100644 (file)
@@ -180,11 +180,11 @@ IN: bootstrap.syntax
     ] define-core-syntax
 
     "UNION:" [
-        scan-new-class parse-definition define-union-class
+        scan-new-class parse-array-def define-union-class
     ] define-core-syntax
 
     "INTERSECTION:" [
-        scan-new-class parse-definition define-intersection-class
+        scan-new-class parse-array-def define-intersection-class
     ] define-core-syntax
 
     "MIXIN:" [
index f157e322a81185555952f73c6f1e9618ea838518..6e4564e06cc6496dd4f441aa376e0f5143494f52 100755 (executable)
@@ -505,10 +505,10 @@ DEFER: [bind-uniform-tuple]
 : parse-uniform-tuple-definition ( -- class superclass uniforms )
     scan-new-class scan-token {
         { ";" [ uniform-tuple f ] }
-        { "<" [ scan-word parse-definition [ first3 uniform boa ] map ] }
+        { "<" [ scan-word parse-array-def [ first3 uniform boa ] map ] }
         { "{" [
             uniform-tuple
-            \ } parse-until parse-definition swap prefix
+            \ } parse-until parse-array-def swap prefix
             [ first3 uniform boa ] map
         ] }
     } case ;
index 8dac18ca70605cb2338b5b9c031f562f2e75b288..b677d1b763a4a0353310bc966c71f4b74948098a 100755 (executable)
@@ -614,7 +614,7 @@ SYNTAX: GLSL-PROGRAM:
     dup old-instances [
         f
         lexer get line>>
-        \ ; parse-until >array shaders-and-formats
+        parse-array-def shaders-and-formats
     ] dip
     program boa
     over reset-generic