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

Adds curly brackets to route parser. #1363

Merged
merged 1 commit into from Mar 26, 2017

Conversation

Projects
None yet
2 participants
@jprider63
Copy link
Contributor

jprider63 commented Mar 22, 2017

As discussed on the google group. I still need to implement the &{} syntax.


where
parse :: String -> ( String, String)
parse ('{':s) = fmap ('{':) $ parseBracket s

This comment has been minimized.

Copy link
@snoyberg

snoyberg Mar 23, 2017

Member

Is there an advantage to retaining the surrounding braces? What about simply dropping them, and then removing the need for the dynamicPieceFromString below?

This comment has been minimized.

Copy link
@jprider63

jprider63 Mar 23, 2017

Author Contributor

I think that would be too permissive. Otherwise, lines could contain arbitrary braces in routes. For example, the following would probably parse:

/m{}y/{route with}/{spaces} RouteR GET

I prefer the current stricter grammar that requires the braces follow '#' so that braces can only surround types in the route.

This comment has been minimized.

Copy link
@snoyberg

snoyberg Mar 26, 2017

Member

Fair enough, that makes sense.

@snoyberg snoyberg merged commit 5b5e411 into yesodweb:master Mar 26, 2017

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@snoyberg

This comment has been minimized.

Copy link
Member

snoyberg commented Mar 26, 2017

Thanks!

snoyberg added a commit that referenced this pull request Mar 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.