mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Add a root parser taking multiple sexprs.
This commit is contained in:
parent
ca5298da88
commit
ab4ec9e0aa
@ -16,6 +16,8 @@ enum Swift: Equatable {
|
||||
static let keyValue = KeyValue <^> (word <* ^"=" <*> (quoted <|> atom))
|
||||
static let branch: String -> State<Swift>? = Branch <^> (^"(" *> ws* *> word <* ws* <*> sexpr* <* ws* <* ^")")
|
||||
static let sexpr = delay { (branch <|> symbol <|> keyValue <|> (Swift.Atom <^> atom)) <* ws* }
|
||||
|
||||
static let root = ws* *> sexpr*
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user