Skip to content
Snippets Groups Projects
Commit d726c19d authored by Alexander Kaznacheev's avatar Alexander Kaznacheev
Browse files

fix MultilineStrings

parent 327564ba
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ convertMultilineStrings s = go s WaitingForString 0 ...@@ -11,7 +11,7 @@ convertMultilineStrings s = go s WaitingForString 0
'-':'-':s -> '-':'-': skipOneLineComment s '-':'-':s -> '-':'-': skipOneLineComment s
'{':'-':s -> '{':'-': skipComment s '{':'-':s -> '{':'-': skipComment s
'"':'"':'"':'\n':'"':'"':'"':s -> '"':'"': go s state 3 '"':'"':'"':'\n':'"':'"':'"':s -> '"':'"': go s state 3
'"':'"':'"':'\n':s -> '\n':' ':'"' : go s InString charCnt '"':'"':'"':'\n':s -> "\n" ++ replicate charCnt ' ' ++ "\"" ++ go s InString charCnt
'\n':s -> '\n' : go s state 0 '\n':s -> '\n' : go s state 0
c:s -> c : go s state (charCnt + 1) c:s -> c : go s state (charCnt + 1)
InString -> case s of InString -> case s of
...@@ -19,7 +19,7 @@ convertMultilineStrings s = go s WaitingForString 0 ...@@ -19,7 +19,7 @@ convertMultilineStrings s = go s WaitingForString 0
'\n':'"':'"':'"':s -> '"':'\n' : go s WaitingForString 0 '\n':'"':'"':'"':s -> '"':'\n' : go s WaitingForString 0
'"':s -> '\\':'"' : go s state charCnt '"':s -> '\\':'"' : go s state charCnt
'\\':s -> '\\':'\\' : go s state charCnt '\\':s -> '\\':'\\' : go s state charCnt
'\n':s -> "\\n\"\n" ++ replicate charCnt ' ' ++ " ++ \"" ++ go s state charCnt '\n':s -> "\\n\"\n" ++ replicate charCnt ' ' ++ "++ \"" ++ go s state charCnt
c:s -> c : go s state charCnt c:s -> c : go s state charCnt
where where
skipOneLineComment "" = go "" state charCnt skipOneLineComment "" = go "" state charCnt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment