]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/multiline/multiline.factor
multiline: adding (( )) comments.
[factor.git] / basis / multiline / multiline.factor
index cd33adc9bed15bfeed6982090d646bc5967a301a..c6d5576347a7122ed29eab33f6b27b209e756b57 100644 (file)
@@ -1,8 +1,7 @@
 ! Copyright (C) 2007 Daniel Ehrenberg
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors combinators kernel lexer locals make math
-namespaces parser quotations sequences strings.parser
-strings.parser.private words ;
+USING: accessors kernel lexer make math namespaces parser
+quotations sequences strings.parser.private words ;
 IN: multiline
 
 <PRIVATE
@@ -44,7 +43,7 @@ SYNTAX: STRING:
         i text end subseq-index-from [| j |
             i j text subseq % j end length +
         ] [
-            text i bound tail % CHAR: \n ,
+            text i index-or-length tail % CHAR: \n ,
             lexer next-line
             0 end lexer (scan-multiline-string)
         ] if*
@@ -67,6 +66,8 @@ PRIVATE>
 
 SYNTAX: /* "*/" parse-multiline-string drop ;
 
+SYNTAX: (( "))" parse-multiline-string drop ;
+
 SYNTAX: [[ "]]" parse-multiline-string suffix! ;
 SYNTAX: [=[ "]=]" parse-multiline-string suffix! ;
 SYNTAX: [==[ "]==]" parse-multiline-string suffix! ;