tree: c1825f5b7f2f704bd501846059bd347158b22e47 [path history] [tgz]
  1. api.go
  2. expression.go
  3. function.go
  4. identifier.go
  5. operator.go
  6. parser.go
  8. statement.go
  9. type.go


import ""

Package parser implements a parser for converting the api language into abstract syntax trees.


func Parse

func Parse(data string) (*ast.API, []parse.Error)

Parse takes a string containing a complete api description and returns the abstract syntax tree representation of it. If the string is not syntactically valid, it will also return the errors encountered. If errors are returned, the ast returned will be the incomplete tree so far, and may not be structurally valid.