1
1
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:
Rob Rix 2015-10-20 15:42:35 -04:00
commit 1bd924b7db
2 changed files with 3 additions and 3 deletions

View File

@ -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))

@ -1 +1 @@
Subproject commit 1df941e0c5bb042e4fb9b32134e2a08d0f987078
Subproject commit b9c5c80092ca25c88427d3be11b5f8e6719f4832