Add new replacement format to the JSON
This commit is contained in:
parent
fd2beaadfa
commit
fcdd6055df
|
@ -45,11 +45,16 @@ instance ToJSON Replacement where
|
||||||
end = repEndPos replacement
|
end = repEndPos replacement
|
||||||
str = repString replacement in
|
str = repString replacement in
|
||||||
object [
|
object [
|
||||||
|
"precedence" .= repPrecedence replacement,
|
||||||
|
"insertionPoint" .=
|
||||||
|
case repInsertionPoint replacement of
|
||||||
|
InsertBefore -> "beforeStart" :: String
|
||||||
|
InsertAfter -> "afterEnd",
|
||||||
"line" .= posLine start,
|
"line" .= posLine start,
|
||||||
"endLine" .= posLine end,
|
|
||||||
"column" .= posColumn start,
|
"column" .= posColumn start,
|
||||||
|
"endLine" .= posLine end,
|
||||||
"endColumn" .= posColumn end,
|
"endColumn" .= posColumn end,
|
||||||
"replaceWith" .= str
|
"replacement" .= str
|
||||||
]
|
]
|
||||||
|
|
||||||
instance ToJSON PositionedComment where
|
instance ToJSON PositionedComment where
|
||||||
|
|
Loading…
Reference in New Issue