modern: Rewriting core paths works!

modern-harvey2
Doug Coleman 2017-08-27 13:56:48 -05:00
parent b826b9bacc
commit 2e68e170fc
3 changed files with 16 additions and 3 deletions

View File

@ -138,4 +138,4 @@ IN: modern.tests
{
{ { "\"" "google.com" "\"" } }
} [ [[ "google.com" ]] string>literals >strings ] unit-test
} [ [[ "google.com" ]] string>literals >strings ] unit-test

View File

@ -39,10 +39,14 @@ M: array write-literal [ write-literal ] each ;
: rewrite-paths ( seq quot -- ) '[ _ rewrite-path ] each ; inline
]]
: rewrite-path-exact ( path -- )
[ path>literals ] [ ] bi write-modern-path ;
: rewrite-vocab-exact ( name -- )
modern-source-path [ path>literals ] [ ] bi write-modern-path ;
modern-source-path rewrite-path-exact ;
: rewrite-paths ( paths -- )
[ rewrite-path-exact ] each ;
: strings-core-to-file ( -- )
core-bootstrap-vocabs

View File

@ -106,6 +106,15 @@ ERROR: not-a-source-path path ;
: all-source-paths ( -- seq )
all-vocabs modern-source-paths ;
: core-docs-paths ( -- seq ) core-vocabs modern-docs-paths ;
: basis-docs-paths ( -- seq ) basis-vocabs modern-docs-paths ;
: extra-docs-paths ( -- seq ) extra-vocabs modern-docs-paths ;
: core-test-paths ( -- seq ) core-vocabs modern-tests-paths ;
: basis-test-paths ( -- seq ) basis-vocabs modern-tests-paths ;
: extra-test-paths ( -- seq ) extra-vocabs modern-tests-paths ;
: all-docs-paths ( -- seq )
all-vocabs modern-docs-paths ;