Skip to content

Moved route matching into a separate method named parseToken.#18

Open
GertBurger wants to merge 1 commit intobrunotavares:masterfrom
GertBurger:refactor_route_parsing
Open

Moved route matching into a separate method named parseToken.#18
GertBurger wants to merge 1 commit intobrunotavares:masterfrom
GertBurger:refactor_route_parsing

Conversation

@GertBurger
Copy link
Copy Markdown

I moved the parsing of routes out of the parse method so that one can parse/match token without dispatching them.

All the tests pass but I think the behaviour is changed slightly in that the first matching route is always returned whereas the previous version would continue looking at routes if the dispatch failed.

I have kept the return values for the parse method.

@sigerello
Copy link
Copy Markdown

👍

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.

2 participants