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 swallow slashes while parsing strings #48

Closed
2 tasks done
jcubic opened this issue May 18, 2020 · 1 comment
Closed
2 tasks done

Parser swallow slashes while parsing strings #48

jcubic opened this issue May 18, 2020 · 1 comment
Labels
bug Something isn't working unit tests
Milestone

Comments

@jcubic
Copy link
Collaborator

jcubic commented May 18, 2020

When --> docs is parsed

  "Helper macro that simplify calling methods on objects. It work with chaining

   usage: (--> ($ \"body\")
               (css \"color\" \"red\")
               (on \"click\" (lambda () (display \"click\"))))

          (--> document (querySelectorAll \"div\"))
          (--> (fetch \"https://jcubic.pl\") (text) (match /<title>([^<]+)<\\/title>/) 1)
          (--> document (querySelectorAll \".cmd-prompt\") 0 \"innerText\")"

it have regex as string /<title>([^<]+)<\\/title>/, the escaped slash (for string) is ignored by the parser, so you can't execute that code if you use (help -->) and copy paste.

  • fix issue
  • write unit tests
@jcubic jcubic added the bug Something isn't working label May 18, 2020
@jcubic
Copy link
Collaborator Author

jcubic commented Aug 20, 2020

The code was rewriten and fixed, when adding parsing of hex literals.

jcubic added a commit that referenced this issue Dec 19, 2020
@jcubic jcubic closed this as completed Dec 19, 2020
@jcubic jcubic added this to the 1.0 milestone Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unit tests
Projects
None yet
Development

No branches or pull requests

1 participant