From 6271da50eb3d4bd3000b77436c4043087d5cee17 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sat, 25 Jan 2020 12:47:38 -0500 Subject: [PATCH] Add functions to scope --- src/common.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common.rs b/src/common.rs index a9e3dce..fce2590 100644 --- a/src/common.rs +++ b/src/common.rs @@ -3,6 +3,7 @@ use std::convert::TryFrom; use std::default::Default; use std::fmt::{self, Display}; +use crate::function::Function; use crate::mixin::Mixin; use crate::Token; @@ -340,6 +341,7 @@ impl Display for Pos { pub(crate) struct Scope { pub vars: HashMap>, pub mixins: HashMap, + pub functions: HashMap, } impl Scope { @@ -348,12 +350,14 @@ impl Scope { Self { vars: HashMap::new(), mixins: HashMap::new(), + functions: HashMap::new(), } } pub fn merge(&mut self, other: Scope) { self.vars.extend(other.vars); self.mixins.extend(other.mixins); + self.functions.extend(other.functions); } }