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

Regex literals tokenizes incorrectly #463

Closed
PEZ opened this issue Nov 11, 2019 · 1 comment
Closed

Regex literals tokenizes incorrectly #463

PEZ opened this issue Nov 11, 2019 · 1 comment
Labels
bug Something isn't working paredit Paredit and structural editing

Comments

@PEZ
Copy link
Collaborator

PEZ commented Nov 11, 2019

Regular expression literals should tokenise as one form/s-expression, but they don't. E.g. #"foo" tokenizes as the the punc token # and a string "foo".

A way to see that this is happening is to type a regex literal as an argument to a function and watch how the signature help mini-hover, match the wrong active parameter:

image

@cfehse
Copy link
Contributor

cfehse commented Nov 12, 2019

@PEZ

Something similar is happening with the @ character. The form:
(print @fehse)
will be parsed to this:

0: {type: "open", offset: 0, raw: "(", state: {…}}
1: {type: "id", offset: 1, raw: "print", state: {…}}
2: {type: "ws", offset: 6, raw: " ", state: {…}}
3: {type: "junk", offset: 7, raw: "@", state: {…}}
4: {type: "id", offset: 8, raw: "fehse", state: {…}}
5: {type: "close", offset: 14, raw: ")", state: {…}}

@cfehse cfehse added bug Something isn't working paredit Paredit and structural editing labels Nov 12, 2019
@PEZ PEZ closed this as completed in 49a5665 Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working paredit Paredit and structural editing
Projects
None yet
Development

No branches or pull requests

2 participants