diff --git a/basis/peg/debugger/debugger.factor b/basis/peg/debugger/debugger.factor index 32e9c18201..4cb10ea2ea 100644 --- a/basis/peg/debugger/debugger.factor +++ b/basis/peg/debugger/debugger.factor @@ -1,12 +1,17 @@ -USING: formatting io kernel accessors math.parser sequences prettyprint -debugger peg ; +USING: accessors debugger io kernel math.parser peg prettyprint +sequences ; IN: peg.debugger M: parse-error error. - [ position>> ] [ messages>> " or " join ] [ got>> ] tri - "Peg parsing error at character position %d.\nExpected %s\nGot '%s'\n" - printf ; + [ + "Peg parsing error at character position " write + position>> number>string write + ] [ + ".\nExpected " write messages>> " or " join write + ] [ + "\nGot '" write got>> write "'" print + ] tri ; M: parse-failed error. "The " write dup word>> pprint " word could not parse the following input:" print nl