a syntax pearl for literal string arrays
parent
345b27a673
commit
592a840c52
|
@ -0,0 +1 @@
|
|||
Joe Groff
|
|
@ -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" } "> }
|
||||
} ;
|
|
@ -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
|
|
@ -0,0 +1,5 @@
|
|||
! (c)2009 Joe Groff bsd license
|
||||
USING: lexer parser ;
|
||||
IN: qw
|
||||
|
||||
SYNTAX: qw{ "}" parse-tokens parsed ;
|
|
@ -0,0 +1 @@
|
|||
Perlish syntax for literal arrays of whitespace-delimited strings (qw{ foo bar })
|
Loading…
Reference in New Issue