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

docs for wait command include invalid syntax #517

Open
CharlesTaylor7 opened this issue Feb 9, 2024 · 0 comments
Open

docs for wait command include invalid syntax #517

CharlesTaylor7 opened this issue Feb 9, 2024 · 0 comments

Comments

@CharlesTaylor7
Copy link
Contributor

Problem

The documentation for the wait command advertises syntax that doesn't actually parse.

On this page of the docs:
https://hyperscript.org/commands/wait/#description

This snippet:

wait for load or 1s
if the result is not an Event
  throw 'Took too long to load.'
end

Workaround

The comparison the result is not an Event, fails to parse, but replacing the an with an a makes it hunky dory.

Potential Fix

Either we can (1) update the docs, or (2) update the parser to allow the construct of is not an Event.
I personally favor extending the parser to make this work.

Error

Screen Shot 2024-02-09 at 6 45 14 PM

Stacktrace:

    at a.raiseParseError (http://unpkg.com/hyperscript.org@0.9.12:1:12649)
    at i.raiseError (http://unpkg.com/hyperscript.org@0.9.12:1:6620)
    at i.requireToken (http://unpkg.com/hyperscript.org@0.9.12:1:7520)
    at http://unpkg.com/hyperscript.org@0.9.12:1:71097
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