noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
821 stars 177 forks source link

fix: Fix tokenization of unquoted types in macros #5326

Closed jfecher closed 5 days ago

jfecher commented 5 days ago

Description

Problem*

Resolves #5309

Summary*

Fixes the tokenization of types by converting them to a new QuotedType token. We can get the original (resolved) type from this token so that we don't need to re-resolve a type after it is inserted into a macro's token stream. A QuotedType token holds onto an ID for the type rather than the type itself since our Type type does not implement Send or Sync, which is required through ParseError and UnresolvedTypeData.

Additional Context

Documentation*

Check one:

PR Checklist*