]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor into uniscribe
authorU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Mon, 30 Mar 2009 03:52:58 +0000 (22:52 -0500)
committerU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Mon, 30 Mar 2009 03:52:58 +0000 (22:52 -0500)
basis/farkup/farkup-tests.factor
basis/farkup/farkup.factor
core/syntax/syntax.factor
core/words/alias/alias-tests.factor [new file with mode: 0644]

index 7cae523efba11908aa66759c4c5bf9388e18b656..abee7194a2f76c9b8c0bf33cb6644c1655cc3c47 100644 (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 [
index 41c6c4aa008f401c9f6f82a1b1b5bbd1669e5b10..c400457c0b8ea96ed8f5e743f6313aa3c1d39e12 100644 (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 )
index bcf9decdf38a19ffd522a3e7bc63e03acee5b80f..cb5cdfd5acc4b0438cb1c1d6541ecb8fa447b5c0 100644 (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
 
     ":" [
diff --git a/core/words/alias/alias-tests.factor b/core/words/alias/alias-tests.factor
new file mode 100644 (file)
index 0000000..0278a4d
--- /dev/null
@@ -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
\ No newline at end of file