Merge branch 'master' of git://factorcode.org/git/factor into uniscribe

db4
U-SLAVA-DFB8FF805\Slava 2009-03-29 22:52:58 -05:00
commit 8ca25700c2
4 changed files with 15 additions and 8 deletions

View File

@ -182,7 +182,7 @@ link-no-follow? off
[ "<table><tr><td>foo|bar</td></tr></table>" ] [ "|foo\\|bar|" convert-farkup ] unit-test
[ "<p></p>" ] [ "\\" convert-farkup ] unit-test
! [ "<p>[abc]</p>" ] [ "[abc]" convert-farkup ] unit-test
[ "<p>[abc]</p>" ] [ "[abc]" convert-farkup ] unit-test
: random-markup ( -- string )
10 [

View File

@ -121,7 +121,7 @@ DEFER: (parse-paragraph)
] if
] if ;
: take-until ( state delimiter -- string/f state' )
: take-until ( state delimiter -- string state'/f )
V{ } clone (take-until) ;
: count= ( string -- n )
@ -186,11 +186,12 @@ DEFER: (parse-paragraph)
: parse-code ( state -- state' item )
dup 1 look CHAR: [ =
[ unclip-slice make-paragraph ] [
"{" take-until
[ rest ] dip
"}]" take-until
[ code boa ] dip swap
[ take-line make-paragraph ] [
dup "{" take-until [
[ nip rest ] dip
"}]" take-until
[ code boa ] dip swap
] [ drop take-line make-paragraph ] if*
] if ;
: parse-item ( state -- state' item )

View File

@ -138,7 +138,7 @@ IN: bootstrap.syntax
] define-core-syntax
"CONSTANT:" [
CREATE scan-object define-constant
CREATE-WORD scan-object define-constant
] define-core-syntax
":" [

View File

@ -0,0 +1,6 @@
USING: math eval tools.test effects ;
IN: words.alias.tests
ALIAS: foo +
[ ] [ "IN: words.alias.tests CONSTANT: foo 5" eval ] unit-test
[ (( -- value )) ] [ \ foo stack-effect ] unit-test