From e08ec6f9e9f7a5f126c53874df0a905dfefc4dc3 Mon Sep 17 00:00:00 2001 From: howardwu Date: Sun, 7 Jun 2020 17:12:16 -0700 Subject: [PATCH] Migrate assignee --- ast/src/file.rs | 17 +++++++++++++++++ ast/src/functions/function.rs | 0 ast/src/functions/function_input.rs | 0 ast/src/functions/mod.rs | 0 ast/src/functions/test_function.rs | 0 5 files changed, 17 insertions(+) create mode 100644 ast/src/file.rs create mode 100644 ast/src/functions/function.rs create mode 100644 ast/src/functions/function_input.rs create mode 100644 ast/src/functions/mod.rs create mode 100644 ast/src/functions/test_function.rs diff --git a/ast/src/file.rs b/ast/src/file.rs new file mode 100644 index 0000000000..c8139def18 --- /dev/null +++ b/ast/src/file.rs @@ -0,0 +1,17 @@ +use crate::{ast::Rule, common::Test, imports::Import, circuits::Circuit}; + +use pest::Span; +use pest_ast::FromPest; +use std::fmt; + +#[derive(Clone, Debug, FromPest, PartialEq)] +#[pest_ast(rule(Rule::file))] +pub struct File<'ast> { + pub imports: Vec>, + pub circuits: Vec>, + pub functions: Vec>, + pub tests: Vec>, + pub eoi: EOI, + #[pest_ast(outer())] + pub span: Span<'ast>, +} diff --git a/ast/src/functions/function.rs b/ast/src/functions/function.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ast/src/functions/function_input.rs b/ast/src/functions/function_input.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ast/src/functions/mod.rs b/ast/src/functions/mod.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ast/src/functions/test_function.rs b/ast/src/functions/test_function.rs new file mode 100644 index 0000000000..e69de29bb2