librasn / compiler

An ASN1 compiler producing Rust bindings for the rasn framework
Other
13 stars 7 forks source link

Backend trait with TokenStream #18

Closed v0-e closed 6 months ago

v0-e commented 7 months ago

PR #17 introduced the generate() method into the Backend trait,

fn generate(&self, tld: ToplevelDefinition) -> Result<TokenStream, GeneratorError>;

However, based on my understanding, TokenStream is specialized for Rust tokens, which contradicts the intention of allowing custom Backends for other language bindings.

6d7a commented 7 months ago

That is indeed something that should change, thank you for pointing that out. Feel free to open a PR.