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

Parser error when calling single symbol macro #10

Closed
jcubic opened this issue May 8, 2019 · 1 comment
Closed

Parser error when calling single symbol macro #10

jcubic opened this issue May 8, 2019 · 1 comment
Labels
bug Something isn't working resolved

Comments

@jcubic
Copy link
Collaborator

jcubic commented May 8, 2019

If you try to parse single special macro ,@ you will get parse error.

@jcubic
Copy link
Collaborator Author

jcubic commented May 8, 2019

The fix:

if (!tokens.filter(t => t.match(/^[()]$/)).length && stack.length) {
    result = result.concat(stack);
    stack = [];
}

to be called at the end of the parse function, it will work the same as with numbers.

parse('` `');
// => (quasiquote) (quasiquote)
parse('10 20');
// => [10, 20]

@jcubic jcubic added bug Something isn't working resolved labels May 8, 2019
@jcubic jcubic closed this as completed May 8, 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 resolved
Projects
None yet
Development

No branches or pull requests

1 participant