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
|
2014-08-05 13:48:31 -04:00
|
|
|
t string-limit? set-global
|
2010-02-19 18:18:16 -05:00
|
|
|
|
|
|
|
: with-short-limits ( quot -- )
|
2012-07-19 14:24:45 -04:00
|
|
|
H{
|
|
|
|
{ line-limit 1 }
|
|
|
|
{ length-limit 15 }
|
|
|
|
{ nesting-limit 2 }
|
|
|
|
{ string-limit? t }
|
|
|
|
{ boa-tuples? t }
|
|
|
|
{ c-object-pointers? f }
|
|
|
|
} clone swap with-variables ; inline
|
2010-02-19 18:18:16 -05:00
|
|
|
|
|
|
|
: without-limits ( quot -- )
|
2012-07-19 14:24:45 -04:00
|
|
|
H{
|
|
|
|
{ nesting-limit f }
|
|
|
|
{ length-limit f }
|
|
|
|
{ line-limit f }
|
|
|
|
{ string-limit? f }
|
|
|
|
{ c-object-pointers? f }
|
|
|
|
} clone swap with-variables ; inline
|