From 1b60bd38ff9d5495bb0db383269178d93ac6ac2c Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 17 Oct 2018 15:29:32 -0700 Subject: [PATCH] Add codegen crate for schala-lang --- Cargo.toml | 1 + schala-lang/codegen/Cargo.toml | 12 ++++++++++++ schala-lang/codegen/src/lib.rs | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 schala-lang/codegen/Cargo.toml create mode 100644 schala-lang/codegen/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 3e417c2..05fba16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ maaru-lang = { path = "maaru" } rukka-lang = { path = "rukka" } robo-lang = { path = "robo" } schala-lang = { path = "schala-lang/language" } +codegen = { path = "schala-lang/codegen" } [build-dependencies] includedir_codegen = "0.2.0" diff --git a/schala-lang/codegen/Cargo.toml b/schala-lang/codegen/Cargo.toml new file mode 100644 index 0000000..9a54126 --- /dev/null +++ b/schala-lang/codegen/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "codegen" +version = "0.1.0" +authors = ["greg "] +edition = "2018" + +[lib] +proc-macro = true + +[dependencies] +syn = { version = "0.15.6", features = ["full", "extra-traits"] } +quote = "0.6.8" diff --git a/schala-lang/codegen/src/lib.rs b/schala-lang/codegen/src/lib.rs new file mode 100644 index 0000000..3e7003c --- /dev/null +++ b/schala-lang/codegen/src/lib.rs @@ -0,0 +1,11 @@ +extern crate proc_macro; +#[macro_use] +extern crate quote; +extern crate syn; + +use self::proc_macro::TokenStream; + +#[proc_macro_attribute] +pub fn parser_function(attr: TokenStream, item: TokenStream) -> TokenStream { + item +}