| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Proto3.Suite.DotProto.Parsing
Description
This module contains a near-direct translation of the proto3 grammar It uses String for easier compatibility with DotProto.Generator, which needs it for not very good reasons
Synopsis
- parseProto :: Path -> String -> Either ParseError DotProto
- parseProtoFile :: MonadIO m => Path -> FilePath -> m (Either ParseError DotProto)
Documentation
parseProto :: Path -> String -> Either ParseError DotProto Source #
parseProto mp inp attempts to parse inp as a DotProto. mp is the
module path to be injected into the AST as part of DotProtoMeta metadata on
a successful parse.
parseProtoFile :: MonadIO m => Path -> FilePath -> m (Either ParseError DotProto) Source #
parseProtoFile mp fp reads and parses the .proto file found at fp. mp
is used downstream during code generation when we need to generate names
which are a function of the source .proto file's filename and its path
relative to some --includeDir.