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

Will a PR for adding Parser.prototype.reportCurrentStatus() be acceptable? #651

Open
Henddher opened this issue Dec 17, 2024 · 1 comment

Comments

@Henddher
Copy link

Hello 👋

While experimenting and debugging grammar, I often rely on Parser.prototype.reportErrorCommon(...) to "dump" the state of the parser.

> parser.reportErrorCommon("", "")
'
Unexpected . Instead, I was expecting to see one of the following:

A character matching /[^:]/ based on:
    plaintext$ebnf$1 →  ● /[^:]/
    plaintext →  ● plaintext$ebnf$1
    line →  ● plaintext
A ":" based on:
    colons$string$1 →  ● ":" ":"
    colons →  ● colons$string$1 colons$ebnf$1
    markup_line →  ● colons markup_def
    line →  ● markup_line
'

A PR adding Parser.prototype.reportCurrentStatus() would leverage a minor refactoring in reportErrorCommon.

Would that be acceptable?

@kach
Copy link
Owner

kach commented Dec 17, 2024

Sure, go ahead.

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

2 participants