Use extra attribute
This commit is contained in:
parent
51cdedb9cc
commit
e498e19ffc
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
authors = ["greg <greg.shuflin@protonmail.com>"]
|
||||
|
||||
[dependencies]
|
||||
syn = "0.13.1"
|
||||
syn = { version = "0.13.1", features = ["full", "extra-traits"] }
|
||||
quote = "0.5"
|
||||
|
||||
[lib]
|
||||
|
@ -17,6 +17,11 @@ pub fn print_a_thing(_input: TokenStream) -> TokenStream {
|
||||
pub fn derive_programming_language_interface(input: TokenStream) -> TokenStream {
|
||||
let ast: DeriveInput = syn::parse(input).unwrap();
|
||||
let name = &ast.ident;
|
||||
let attrs = &ast.attrs;
|
||||
|
||||
println!("ATTRS {:?}", attrs);
|
||||
//let language_name = attrs.iter().find(
|
||||
|
||||
|
||||
let tokens = quote! {
|
||||
impl ProgrammingLanguageInterface for #name {
|
||||
|
@ -28,6 +28,7 @@ mod eval;
|
||||
use self::typechecking::{TypeContext};
|
||||
|
||||
#[derive(ProgrammingLanguageInterface)]
|
||||
#[LanguageName = "Schala"]
|
||||
pub struct Schala {
|
||||
state: eval::State<'static>,
|
||||
type_context: TypeContext
|
||||
|
Loading…
Reference in New Issue
Block a user