Skip to content

Commit

Permalink
Complete rewrite.
Browse files Browse the repository at this point in the history
This makes pear significantly more robust: no more "remonad" warnings
and special-casing! The code is significantly smaller, easier to
understand, and easier to manager.

There is one major open question: How should input be passed to macros?

At present, it is not, and macros rely on the input being named `input`.
This approach will not work for macro_rules macros as it requires
breaking hygiene, and so a better approach is required.

One potential approach is to pass the input as the first parameter to
any macro prefixed with `pear`.
  • Loading branch information
SergioBenitez committed May 15, 2018
1 parent 44bbca0 commit d4f44e6
Show file tree
Hide file tree
Showing 35 changed files with 3,036 additions and 1,869 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Expand Up @@ -2,10 +2,10 @@
members = [
"lib/",
"codegen/",
"examples/http",
"examples/ini",
"examples/media_type",
"examples/exprs",
# "examples/http",
# "examples/media_type",
# "examples/exprs",
"examples/parens",
"examples/json",
"examples/uri",
Expand Down
7 changes: 6 additions & 1 deletion codegen/Cargo.toml
Expand Up @@ -6,7 +6,12 @@ description = "A (codegen) pear is a fruit."
license = "MIT/Apache-2.0"

[lib]
plugin = true
proc-macro = true

[dependencies]
quote = "*"
proc-macro2 = { version = "*", features = ["nightly"] }
syn = { version = "0.13.2", features = ["full", "extra-traits", "visit-mut"] }

[build-dependencies]
yansi = "0.4"
Expand Down

0 comments on commit d4f44e6

Please sign in to comment.