librasn / compiler

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

Backend trait with TokenStream #18

Closed v0-e closed 4 months ago

v0-e commented 4 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 4 months ago

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