Skip to content

Commit

Permalink
shift demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tonymorris committed Jun 28, 2012
1 parent ade136d commit 463d4d3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions example/src/main/scala/com/ephox/argonaut/ShiftDemo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ object ShiftDemo {
val r = (r1 ||| r2) := jString("cat")
// apply cursor-shift operations
val t = r <| s
// run cursor-shift and pretty-print with two-space indent
t.cursor match {
case None => "no cursor"
case Some(c) => (-c).spaces2
}
// run cursor-shift and pretty-print with two-space indent
val q =
t.cursor match {
case None => "no cursor"
case Some(c) => (-c).spaces2
}
q + '\n' + t.history.shows
}
, "Failed parse: " + _
)
Expand Down

0 comments on commit 463d4d3

Please sign in to comment.