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

Match types when slurping #31

Open
GregPlowman opened this issue Feb 10, 2017 · 0 comments
Open

Match types when slurping #31

GregPlowman opened this issue Feb 10, 2017 · 0 comments

Comments

@GregPlowman
Copy link

I couldn't work out how to match types when slurping with __:

block = quote
    begin
        north
        east
        south
        west
    end
end

Untyped slurping works:

symbols = @match block begin
    begin
        s__
    end => s
end

but I wanted to match only Symbols, so I tried this but didn't work:

symbols = @match block begin
    begin
        s__Symbol
    end => s
end
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