new accessors
parent
17b3a17cec
commit
01fee5a1f4
|
@ -1,10 +1,11 @@
|
|||
! Copyright (C) 2007 Daniel Ehrenberg
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: namespaces parser lexer kernel sequences words quotations math ;
|
||||
USING: namespaces parser lexer kernel sequences words quotations math
|
||||
accessors ;
|
||||
IN: multiline
|
||||
|
||||
: next-line-text ( -- str )
|
||||
lexer get dup next-line lexer-line-text ;
|
||||
lexer get dup next-line text>> ;
|
||||
|
||||
: (parse-here) ( -- )
|
||||
next-line-text [
|
||||
|
@ -22,7 +23,7 @@ IN: multiline
|
|||
parse-here 1quotation define-inline ; parsing
|
||||
|
||||
: (parse-multiline-string) ( start-index end-text -- end-index )
|
||||
lexer get lexer-line-text [
|
||||
lexer get text>> [
|
||||
2dup start
|
||||
[ rot dupd >r >r swap subseq % r> r> length + ] [
|
||||
rot tail % "\n" % 0
|
||||
|
@ -32,8 +33,8 @@ IN: multiline
|
|||
|
||||
: parse-multiline-string ( end-text -- str )
|
||||
[
|
||||
lexer get lexer-column swap (parse-multiline-string)
|
||||
lexer get set-lexer-column
|
||||
lexer get column>> swap (parse-multiline-string)
|
||||
lexer get (>>column)
|
||||
] "" make rest but-last ;
|
||||
|
||||
: <"
|
||||
|
|
Loading…
Reference in New Issue