Permalink
Browse files

Cells: Remove backtrackable from Range parser

  • Loading branch information...
joakin committed Feb 2, 2019
1 parent ca3ab6e commit ab0774ee4028b555de0f7a0179000bb1b9fc8704
Showing with 9 additions and 7 deletions.
  1. +9 −7 src/tasks/Cells/Cell/Parser.elm
@@ -15,12 +15,14 @@ type alias Range =
{ from : Position, to : Position }


range : Parser Range
range =
succeed Range
|= backtrackable Position.parser
|. symbol ":"
|= Position.parser
positionOrRange : Position -> Parser Expression
positionOrRange pos =
oneOf
[ succeed (ERange << Range pos)
|. symbol ":"
|= Position.parser
, succeed (ECoord pos)
]


float : Parser Float
@@ -63,7 +65,7 @@ expression : Parser Expression
expression =
oneOf
[ map EFloat float
, map ERange range
, Position.parser |> andThen positionOrRange
, map ECoord Position.parser
, map EApplication application
]

0 comments on commit ab0774e

Please sign in to comment.