peg.debugger: don't use formatting.
parent
3ed3e10074
commit
e9ed1f3a72
|
@ -1,12 +1,17 @@
|
||||||
USING: formatting io kernel accessors math.parser sequences prettyprint
|
USING: accessors debugger io kernel math.parser peg prettyprint
|
||||||
debugger peg ;
|
sequences ;
|
||||||
IN: peg.debugger
|
IN: peg.debugger
|
||||||
|
|
||||||
|
|
||||||
M: parse-error error.
|
M: parse-error error.
|
||||||
[ position>> ] [ messages>> " or " join ] [ got>> ] tri
|
[
|
||||||
"Peg parsing error at character position %d.\nExpected %s\nGot '%s'\n"
|
"Peg parsing error at character position " write
|
||||||
printf ;
|
position>> number>string write
|
||||||
|
] [
|
||||||
|
".\nExpected " write messages>> " or " join write
|
||||||
|
] [
|
||||||
|
"\nGot '" write got>> write "'" print
|
||||||
|
] tri ;
|
||||||
|
|
||||||
M: parse-failed error.
|
M: parse-failed error.
|
||||||
"The " write dup word>> pprint " word could not parse the following input:" print nl
|
"The " write dup word>> pprint " word could not parse the following input:" print nl
|
||||||
|
|
Loading…
Reference in New Issue