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

Accept arbitrary rust code as case argument #19

Closed
la10736 opened this issue Apr 9, 2019 · 0 comments
Closed

Accept arbitrary rust code as case argument #19

la10736 opened this issue Apr 9, 2019 · 0 comments

Comments

@la10736
Copy link
Owner

la10736 commented Apr 9, 2019

As #18 pointed out is too cleaver use Unwrap("some rust code"). We can do better and parse arbitrary rust code in procedural macro attributes

Case like follow should be parsed:

case(42, -42, pippo("pluto"), Vec::new(), String::from(r#"prrr"#), 
            {
                let mut sum=0;
                for i in 1..3 {
                    sum += i;
                }
                sum
            }, vec![1,2,3])
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

No branches or pull requests

1 participant