Skip to content

Conversation

@brendanzab
Copy link
Contributor

This common representation for delimeters should make pattern matching easier. Having a separate token::DelimToken enum also allows us to enforce the invariant that the opening and closing delimiters must be the same in ast::TtDelimited, removing the need to ensure matched delimiters when working with token trees, (for example, in gl-rs)

@brendanzab brendanzab force-pushed the token branch 3 times, most recently from dfbbb23 to 81a0142 Compare October 29, 2014 22:32
This common representation for delimeters should make pattern matching easier. Having a separate `token::DelimToken` enum also allows us to enforce the invariant that the opening and closing delimiters must be the same in `ast::TtDelimited`, removing the need to ensure matched delimiters when working with token trees.
We can simplify these usages due to the new delimiter representation. `Parser::expect_open_delim` has been added for convenience.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 31, 2014
Conflicts:
	src/libsyntax/parse/parser.rs
@bors bors merged commit 98a4770 into rust-lang:master Oct 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants