Skip to content

TypedIdentifier - #6

Open
maciejhirsz wants to merge 2 commits into
axic:masterfrom
maciejhirsz:typed_identifier
Open

TypedIdentifier#6
maciejhirsz wants to merge 2 commits into
axic:masterfrom
maciejhirsz:typed_identifier

Conversation

@maciejhirsz

@maciejhirsz maciejhirsz commented Nov 12, 2018

Copy link
Copy Markdown

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.

Y-Nak pushed a commit to fe-lang/yultsur that referenced this pull request Nov 27, 2024
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