Skip to content

Expand macro parsing to repeated patterns #311

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

Closed
sampersand opened this issue Jul 30, 2018 · 1 comment
Closed

Expand macro parsing to repeated patterns #311

sampersand opened this issue Jul 30, 2018 · 1 comment
Assignees
Labels
A-syntax Area: Syntax highlighting

Comments

@sampersand
Copy link

sampersand commented Jul 30, 2018

Sublime Text Version

Sublime Text 3 (Build 3176)

Rust Enhanced Version

v2.15.0

Operating system

macOS v10.13.4 (high sierra)

References

Improvement number 25 on #284 is also something that should be updated

Request

highlight repeated patterns:

macro_rules! foo {
	($($foo:expr),*) => {}
}

It'd be nice if $foo:expr would highlight as if i didn't have the $(),* surrounding it.

@ehuss ehuss added the A-syntax Area: Syntax highlighting label Jul 30, 2018
@ehuss
Copy link

ehuss commented Aug 4, 2018

I have a fix for this, I'll be posting the PR soon.

@ehuss ehuss self-assigned this Aug 4, 2018
bors bot added a commit that referenced this issue Aug 20, 2018
326: Syntax: Rewrite macro_rules r=ehuss a=ehuss

macro_rules failed in a lot of cases, this reworks it to fully support:
- Complete matcher syntax.
- Better bracket balancing support.
- Add `lifetime` designator (1.28).
- More resilient to odd syntax within the transcriber.  The content doesn't have
  to be Rust syntax, so it can sometimes get confused. Add a few escapes so it
  at least doesn't barf.
- At-most-once kleene operator (2018).

Closes #311 

<img width="903" alt="image" src="https://user-images.githubusercontent.com/43198/43736311-018cc660-9972-11e8-8931-d4d2bd5e7501.png">


Co-authored-by: Eric Huss <[email protected]>
@bors bors bot closed this as completed in #326 Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntax Area: Syntax highlighting
Projects
None yet
Development

No branches or pull requests

2 participants