factor/basis/peg/debugger/debugger.factor

18 lines
479 B
Factor
Raw Normal View History

2014-10-23 15:01:51 -04:00
USING: accessors debugger io kernel math.parser peg prettyprint
sequences ;
IN: peg.debugger
M: parse-error error.
2014-10-23 15:01:51 -04:00
[
"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
input>> . ;