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

TypedIdentifier #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

maciejhirsz
Copy link

@maciejhirsz maciejhirsz commented Nov 12, 2018

First batch of changes from the big PR:

  • Added TypedIdentifier, following the grammar spec, that must have a type. Function definitions and variable declarations now use Vec<TypedIdentifier> instead of Vec<Identifier>.
  • Added From impls to easily create instances of Identifier from string literals ("foo".into() or Identifier::from("foo")).
  • Validator impl for Identifier checks that the identifier is in accordance with the grammar.
  • Changed the error type from String to &'static str in the validator, although custom enum or using the error_chain crate would be better here I reckon.

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.

1 participant