mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Merge remote-tracking branch 'origin/parse-json' into output-source-range-annotations-to-json
This commit is contained in:
commit
1bd924b7db
@ -45,7 +45,7 @@ let whitespace: CharacterParser = String.lift(satisfy({ whitespaceChars.contains
|
||||
|
||||
// Quoted strings parser
|
||||
let stringBody: StringParser = { $0.map({ String($0) }).joinWithSeparator("") } <^>
|
||||
not(%"\\" <|> %"\"")*
|
||||
String.lift(noneOf("\n\"")*)
|
||||
let quoted = %"\"" *> stringBody <* %"\"" <* whitespace
|
||||
|
||||
typealias MembersParser = Parser<String, [(String, CofreeJSON)]>.Function;
|
||||
@ -100,7 +100,7 @@ let json: JSONParser = fix { json in
|
||||
Cofree(range, .Keyed(Dictionary(elements: values)))
|
||||
}
|
||||
|
||||
let doubleParser = String.lift(double()) <* whitespace
|
||||
let doubleParser = String.lift(double) <* whitespace
|
||||
let number: JSONParser = doubleParser --> { _, range, value in
|
||||
let num = JSONLeaf.Number(value)
|
||||
return Cofree(range, .Leaf(num))
|
||||
|
2
prototype/External/Madness
vendored
2
prototype/External/Madness
vendored
@ -1 +1 @@
|
||||
Subproject commit 1df941e0c5bb042e4fb9b32134e2a08d0f987078
|
||||
Subproject commit b9c5c80092ca25c88427d3be11b5f8e6719f4832
|
Loading…
Reference in New Issue
Block a user