From 4f99e600079a3983bbeb623b3a058a3a4842c4d8 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sun, 12 Jan 2020 20:15:40 -0500 Subject: [PATCH] Commit mixin work --- src/mixin.rs | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 src/mixin.rs diff --git a/src/mixin.rs b/src/mixin.rs new file mode 100644 index 0000000..e7f98bb --- /dev/null +++ b/src/mixin.rs @@ -0,0 +1,84 @@ +use crate::common::Scope; +use crate::common::Symbol; +use crate::style::Style; +use crate::{Token, TokenKind}; + +#[derive(Debug, Clone)] +pub struct Mixin { + scope: Scope, + args: FuncArgs, + body: Vec, +} + +impl Mixin { + pub fn new(scope: Scope, args: FuncArgs, body: Vec) -> Self { + Mixin { scope, args, body } + } + + pub fn eval(&mut self) -> Vec