File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,8 +168,31 @@ _thinks_ is happening can be really helpful!
168168-}
169169deadEndsToString : List DeadEnd -> String
170170deadEndsToString deadEnds =
171- " TODO deadEndsToString"
172-
171+ String . concat ( List . intersperse " ; " ( List . map deadEndToString deadEnds))
172+
173+
174+ deadEndToString : DeadEnd -> String
175+ deadEndToString deadend =
176+ problemToString deadend. problem ++ " at row " ++ String . fromInt deadend. row ++ " , col " ++ String . fromInt deadend. col
177+
178+
179+ problemToString : Problem -> String
180+ problemToString p =
181+ case p of
182+ Expecting s -> " expecting '" ++ s ++ " '"
183+ ExpectingInt -> " expecting int"
184+ ExpectingHex -> " expecting hex"
185+ ExpectingOctal -> " expecting octal"
186+ ExpectingBinary -> " expecting binary"
187+ ExpectingFloat -> " expecting float"
188+ ExpectingNumber -> " expecting number"
189+ ExpectingVariable -> " expecting variable"
190+ ExpectingSymbol s -> " expecting symbol '" ++ s ++ " '"
191+ ExpectingKeyword s -> " expecting keyword '" ++ s ++ " '"
192+ ExpectingEnd -> " expecting end"
193+ UnexpectedChar -> " unexpected char"
194+ Problem s -> " problem " ++ s
195+ BadRepeat -> " bad repeat"
173196
174197
175198-- PIPELINES
You can’t perform that action at this time.
0 commit comments