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

Use double quotes for word tokens #38

Open
ingydotnet opened this issue Mar 29, 2015 · 0 comments
Open

Use double quotes for word tokens #38

ingydotnet opened this issue Mar 29, 2015 · 0 comments

Comments

@ingydotnet
Copy link
Collaborator

ie, this:

"foo"

becomes:

/\bfoo\b/

and this:

"foo bar baz"

becomes:

/\b(?:foo|bar|baz)\b/

and maybe, we make double quotes define "tokens" instead of the special
regexes. We still need to think about what tokens are and how they get used in
grammars. Will create different issue for that.

Also we should probably eat leading whitespace on the regexes above. At least
by default. Tokenization semantic variations can be made with new Pegex
directives like: %TokenizationMethod whitespace.

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