-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
908147d
commit eae7ac4
Showing
7 changed files
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
use protobuf_parse::pure; | ||
use protobuf_parse::Parser; | ||
use protobuf_parse::ParsedAndTypechecked; | ||
|
||
use crate::codegen::Codegen; | ||
|
||
pub(crate) fn parse_and_typecheck( | ||
codegen: &Codegen, | ||
) -> anyhow::Result<(ParsedAndTypechecked, String)> { | ||
let p = pure::parse_and_typecheck(&codegen.includes, &codegen.inputs)?; | ||
let p = Parser::new() | ||
.pure() | ||
.includes(&codegen.includes) | ||
.inputs(&codegen.inputs) | ||
.parse_and_typecheck()?; | ||
Ok((p, format!("protobuf-codegen={}", env!("CARGO_PKG_VERSION")))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
//! Parse `.proto` files using `protoc` command. | ||
mod parse_and_typecheck; | ||
|
||
pub use parse_and_typecheck::*; | ||
pub(crate) mod parse_and_typecheck; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters