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

remove ebnf and disallow digits in dpath #116

Closed
wants to merge 1 commit into from
Closed

Conversation

stobiewan
Copy link
Collaborator

resolves #115
relates to #113

const runes = path.match(/[:.]/g)

need(names.length === runes.length && baned === null, `Invalid dpath`)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel this is unlikely to be correct, what about :a..b or similar
I think ebnf should be one of the last things to try to drop

Copy link
Collaborator Author

@stobiewan stobiewan May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An empty name like :a..b is fine because then names.length will not equal runes.length (2 != 3), and it'll be rejected.
Picked off ebnf so dmfxyz can keep looking at ethers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, it is still hard to convince myself it is correct though, also I think using a grammar is something worth showing, like keeping the dependency intentionally
Will think some more

@nmushegian
Copy link
Member

Can you reopen for just disallow numbers #115

@nmushegian nmushegian closed this May 21, 2022
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