]> gitweb.factorcode.org Git - factor.git/commitdiff
peg.debugger: don't use formatting.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 23 Oct 2014 19:01:51 +0000 (12:01 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 23 Oct 2014 19:01:51 +0000 (12:01 -0700)
basis/peg/debugger/debugger.factor

index 32e9c182012925bebe2e4451a94ff45bec3a4cb7..4cb10ea2eabcedf23afa0b8f6e38f3e58dd17a38 100644 (file)
@@ -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