 USING: parser kernel namespaces sequences definitions io.files
 inspector continuations tools.crossref tools.vocabs 
 io prettyprint source-files assocs vocabs vocabs.loader
-io.backend splitting classes.tuple ;
+io.backend splitting accessors ;
 IN: editors
 
 TUPLE: no-edit-hook ;

: edit-vocab ( name -- )
    vocab-source-path 1 edit-location ;

: :edit ( -- )
    error get delegates [ parse-error? ] find-last nip [
        dup parse-error-file source-file-path
        swap parse-error-line edit-location
    ] when* ;

: fix ( word -- )
    "Fixing " write dup pprint " and all usages..." print nl
    dup usage swap prefix [
        "Editing " write dup .
        "RETURN moves on to the next usage, C+d stops." print
        flush
        edit
        readln
    ] all? drop ;

    require ;

: edit-location ( file line -- )
    >r (normalize-path) r>
    edit-hook get [ call ] [ no-edit-hook edit-location ] if* ;

: edit ( defspec -- )
