Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the rest of Rust syntax behind a feature flag (off by default) #4

Closed
68 tasks done
dtolnay opened this issue Sep 4, 2016 · 4 comments
Closed
68 tasks done

Comments

@dtolnay
Copy link
Owner

dtolnay commented Sep 4, 2016

Parsing structs and enums is enough for Macros 1.1 but parsing all of Rust may be useful for other things.

Items

  • ExternCrate
  • Use
  • Static
  • Const
  • Fn
  • Mod
  • ForeignMod
  • Ty
  • Enum (enabled by default)
  • Struct (enabled by default)
  • Union
  • Trait
  • DefaultImpl
  • Impl
  • Mac

Expressions

  • Box
  • Vec
  • Call
  • MethodCall
  • Tup
  • Binary
  • Unary
  • Lit
  • Cast
  • Type
  • If
  • IfLet
  • While
  • WhileLet
  • ForLoop
  • Loop
  • Match
  • Closure
  • Block
  • Assign
  • AssignOp
  • Field
  • TupField
  • Index
  • Range
  • Path
  • AddrOf
  • Break
  • Continue
  • Ret
  • Mac
  • Struct
  • Repeat
  • Paren
  • Try

Statements

  • Local
  • Item
  • Expr
  • Semi
  • Mac

Patterns

  • Wild
  • Ident
  • Struct
  • TupleStruct
  • Path
  • Tuple
  • Box
  • Ref
  • Lit
  • Range
  • Slice
  • Mac

Other

@dtolnay
Copy link
Owner Author

dtolnay commented Sep 5, 2016

This would allow serde_codegen to drop its dependency on Syntex entirely.

@tikue
Copy link

tikue commented Sep 6, 2016

In a plugin I'm using to transform idents, I need to parse traits, trait impls, and type paths. This is because macros can't perform an ident => ident transformation, so instead I have specialized versions of the macro for different contexts.

@gregkatz
Copy link
Contributor

Hi! Could I work on parsing the loop expression? Maybe if I'm able to handle that one fairly easily, I can move on to others.

@dtolnay
Copy link
Owner Author

dtolnay commented Sep 27, 2016

Absolutely! Thanks in advance. Let me know if I can help explain anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants