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
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 } ;
: 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 ;
{ 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 } } ;
] 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:" [
: 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 ;
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