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

feat: Add some metaprogramming methods on `TypeDefinition` #5310

Closed jfecher closed 1 week ago

jfecher commented 1 week ago

Description

Problem*

Resolves #5285

Summary*

Implements as_type, generics, and fields on the TypeDefinition type.

The Type type isn't really supported yet so as_type and fields return Quoted token streams instead of Types for now.

Additional Context

A few bugs still need to be fixed after this PR for the vertical slice to work.

Documentation*

Check one:

PR Checklist*