2010-02-19 18:18:16 -05:00
|
|
|
! Copyright (C) 2003, 2010 Slava Pestov.
|
2007-09-20 18:09:08 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2010-02-19 18:18:16 -05:00
|
|
|
USING: kernel namespaces ;
|
2008-09-06 04:23:54 -04:00
|
|
|
IN: prettyprint.config
|
2007-09-20 18:09:08 -04:00
|
|
|
|
|
|
|
! Configuration
|
|
|
|
SYMBOL: tab-size
|
|
|
|
SYMBOL: margin
|
|
|
|
SYMBOL: nesting-limit
|
|
|
|
SYMBOL: length-limit
|
|
|
|
SYMBOL: line-limit
|
2009-09-14 16:03:05 -04:00
|
|
|
SYMBOL: number-base
|
2008-09-06 04:23:54 -04:00
|
|
|
SYMBOL: string-limit?
|
|
|
|
SYMBOL: boa-tuples?
|
2009-08-30 21:23:55 -04:00
|
|
|
SYMBOL: c-object-pointers?
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2008-09-06 04:23:54 -04:00
|
|
|
4 tab-size set-global
|
|
|
|
64 margin set-global
|
2010-02-19 18:18:16 -05:00
|
|
|
15 nesting-limit set-global
|
|
|
|
100 length-limit set-global
|
2009-09-14 16:03:05 -04:00
|
|
|
10 number-base set-global
|
2010-02-19 18:18:16 -05:00
|
|
|
string-limit? on
|
|
|
|
|
|
|
|
: with-short-limits ( quot -- )
|
|
|
|
[
|
|
|
|
1 line-limit set
|
|
|
|
15 length-limit set
|
|
|
|
2 nesting-limit set
|
|
|
|
string-limit? on
|
|
|
|
boa-tuples? on
|
2010-03-12 17:32:34 -05:00
|
|
|
c-object-pointers? off
|
2010-02-19 18:18:16 -05:00
|
|
|
call
|
|
|
|
] with-scope ; inline
|
|
|
|
|
|
|
|
: without-limits ( quot -- )
|
|
|
|
[
|
|
|
|
nesting-limit off
|
|
|
|
length-limit off
|
|
|
|
line-limit off
|
|
|
|
string-limit? off
|
|
|
|
c-object-pointers? off
|
|
|
|
call
|
|
|
|
] with-scope ; inline
|