Paste: HEREDOC:

Author: mncharity
Mode: factor
Date: Sun, 12 Jul 2009 18:02:27
Plain Text |
! IN: multiline

SYNTAX: HEREDOC:
    f parse-step drop dup pop ! ( -- str ) 
    lexer get next-line ! ( -- )
    0 (make-multiline-string) parsed ;

What?
Multiline string with arbitrary terminator.

Example:
[ "foo\nbar\n" ] [ HEREDOC: "END"
foo
bar
END ] unit-test

New Annotation

Summary:
Author:
Mode:
Body: