summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-06-11 02:29:26 -0400
committerJoe Crayne <joe@jerkface.net>2019-06-11 02:29:26 -0400
commit42eef741086804aa106870f5a375c65ac5d83ab2 (patch)
tree03a3773f55c84fadfc2eee93a10e809752f106de
parentd866df206e703854cfa95e6aabe3ed5ed3bfbcaa (diff)
Sundqvist: Allow leading spaces.
-rw-r--r--src/Graphics/WaveFront/Parse/OBJ.hs2
-rw-r--r--test/TestSundqvist.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Graphics/WaveFront/Parse/OBJ.hs b/src/Graphics/WaveFront/Parse/OBJ.hs
index 69cce47..2c3919e 100644
--- a/src/Graphics/WaveFront/Parse/OBJ.hs
+++ b/src/Graphics/WaveFront/Parse/OBJ.hs
@@ -72,7 +72,7 @@ obj = Atto.sepBy row lineSeparator -- <* Atto.endOfInput
72-- - Handle invalid rows (how to deal with mangled definitions w.r.t indices?) 72-- - Handle invalid rows (how to deal with mangled definitions w.r.t indices?)
73-- - Use ListLike or Monoid (or maybe Indexable, since that's the real requirement) (?) 73-- - Use ListLike or Monoid (or maybe Indexable, since that's the real requirement) (?)
74row :: (Fractional f, Integral i) => Atto.Parser (OBJToken f Text i []) 74row :: (Fractional f, Integral i) => Atto.Parser (OBJToken f Text i [])
75row = token <* ignore comment -- TODO: Let the separator handle comments (?) 75row = Atto.skipSpace *> token <* ignore comment -- TODO: Let the separator handle comments (?)
76 76
77 77
78-- | 78-- |
diff --git a/test/TestSundqvist.hs b/test/TestSundqvist.hs
index 6345cd9..935368a 100644
--- a/test/TestSundqvist.hs
+++ b/test/TestSundqvist.hs
@@ -18,4 +18,4 @@ main = do
18 r1 <- Load.obj (ddir ++ "/01.obj") 18 r1 <- Load.obj (ddir ++ "/01.obj")
19 print r1 19 print r1
20 -- Failed: endOfInput 20 -- Failed: endOfInput
21 -- Reason: vp token, leading spaces, empty lines 21 -- Reason: vp token,and blank lines