peg.debugger: don't use formatting.
parent
3ed3e10074
commit
e9ed1f3a72
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue