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

Export ParseError, import URL #18

Merged
merged 3 commits into from
May 23, 2024
Merged

Export ParseError, import URL #18

merged 3 commits into from
May 23, 2024

Conversation

edemaine
Copy link
Collaborator

@edemaine edemaine commented May 21, 2024

This should enable fixing

https://github.com/DanielXMoore/Civet/blob/6197b5a53e510a9519df437c8e86c2c8198118c7/types/types.d.ts#L58

by adding this to parser.hera:

```
export { ParseError }
```

Also, yarn test isn't working on Windows, with error Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'. I added some code that should fix this, but still doesn't seem to. Progress though I think.

I also updated the ParseError interface and constructor to provide more convenience:

  • header field for the main message (first line after filename:line:column)
  • body field for the multiple lines of expected rules
  • message isn't an argument, but is automatically constructed as filename:line:column header\nbody
  • No more name argument; it should be "ParseError" in all cases

@edemaine edemaine merged commit 4226c5d into main May 23, 2024
4 checks passed
@edemaine
Copy link
Collaborator Author

Thanks! Could you release?

@edemaine edemaine deleted the export-parse-error branch May 23, 2024 14:54
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

Successfully merging this pull request may close these issues.

2 participants