a syntax pearl for literal string arrays

db4
Joe Groff 2009-04-25 19:22:47 -05:00
parent 345b27a673
commit 592a840c52
5 changed files with 23 additions and 0 deletions

1
extra/qw/authors.txt Normal file
View File

@ -0,0 +1 @@
Joe Groff

11
extra/qw/qw-docs.factor Normal file
View File

@ -0,0 +1,11 @@
USING: help.markup help.syntax multiline ;
IN: qw
HELP: qw{
{ $syntax "qw{ lorem ipsum }" }
{ $description "Marks the beginning of a literal array of strings. Component strings are delimited by whitespace." }
{ $examples
{ $unchecked-example <" USING: prettyprint qw ;
qw{ pop quiz my hive of big wild ex tranny jocks } . ">
<" { "pop" "quiz" "my" "hive" "of" "big" "wild" "ex" "tranny" "jocks" } "> }
} ;

5
extra/qw/qw-tests.factor Normal file
View File

@ -0,0 +1,5 @@
! (c)2009 Joe Groff bsd license
USING: qw tools.test ;
IN: qw.tests
[ { "zippity" "doo" "dah" } ] [ qw{ zippity doo dah } ] unit-test

5
extra/qw/qw.factor Normal file
View File

@ -0,0 +1,5 @@
! (c)2009 Joe Groff bsd license
USING: lexer parser ;
IN: qw
SYNTAX: qw{ "}" parse-tokens parsed ;

1
extra/qw/summary.txt Normal file
View File

@ -0,0 +1 @@
Perlish syntax for literal arrays of whitespace-delimited strings (qw{ foo bar })