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

Make token matching semantics user-definable #198

Closed
wants to merge 2 commits into from
Closed

Conversation

tjvr
Copy link
Collaborator

@tjvr tjvr commented Mar 10, 2017

As per our conversation @Hardmath123.

This makes the custom tokens feature a little more useful; you can still define your own tokens with the %-syntax just as before, but now you have complete control over how symbols get matched with tokens inside the parser.

I couldn't detect any performance difference using our benchmarks.

@kach
Copy link
Owner

kach commented Mar 25, 2017

I'm wondering whether it should be named "matcher" or "match". I think "match" is better.

@tjvr
Copy link
Collaborator Author

tjvr commented Mar 25, 2017

I'll call it whatever you want :-)

@kach
Copy link
Owner

kach commented Mar 25, 2017

Well, I was asking you! :P I feel functions tend to be named verbs — "match" — but of course the key in the object is kind of a noun, since it is telling you what the matcher is. Naming this right is important because it's user-facing so we can't change it later.

@tjvr
Copy link
Collaborator Author

tjvr commented Mar 25, 2017

Yes, it should be a verb. I'd be more concerned about whether "match" is the right word in the first place :-)

@kach
Copy link
Owner

kach commented Mar 25, 2017

test is both a noun and a verb… :P

@tjvr tjvr mentioned this pull request Mar 28, 2017
@tjvr
Copy link
Collaborator Author

tjvr commented Mar 30, 2017

Closing in favour of #220.

@tjvr tjvr closed this Mar 30, 2017
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