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

You can't define dolar syntax extension #318

Closed
jcubic opened this issue Feb 25, 2024 · 1 comment
Closed

You can't define dolar syntax extension #318

jcubic opened this issue Feb 25, 2024 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@jcubic
Copy link
Owner

jcubic commented Feb 25, 2024

This expression:

(set-special! "$" 'interpolate)

Completely screw up the parser.

it throws an error about the unbound first letter of any name:

lips> (define x 10)
Unbound variable `d'
@jcubic jcubic added the bug Something isn't working label Feb 25, 2024
@jcubic jcubic added this to the 1.0 milestone Feb 25, 2024
jcubic added a commit that referenced this issue Feb 26, 2024
The problem was that match on string implicity
converted the string to regular expression
and `$` or `^` was always matching
@jcubic
Copy link
Owner Author

jcubic commented Feb 26, 2024

The problem was that the Lexer state machine was expecting:

char.match("$")

and $ was implicitly converted to a regular expression that always match.

@jcubic jcubic closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant