From 14c9ff571d41e01fe46fb842aa5ea1b93497c4ab Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 29 Apr 2019 11:03:17 +0200 Subject: =?UTF-8?q?Remove=20stack=20from=20parser=20=E2=99=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/syntax.rs') diff --git a/src/syntax.rs b/src/syntax.rs index dd83b4a3..8d248ab7 100644 --- a/src/syntax.rs +++ b/src/syntax.rs @@ -3,6 +3,7 @@ use std::collections::HashMap; use std::fmt::{self, Display, Formatter}; use std::ops::Deref; + use crate::func::Function; use crate::utility::StrExt; @@ -68,18 +69,18 @@ pub enum Node { /// A literal word. Word(String), /// A function invocation. - Func(FuncInvocation), + Func(FuncCall), } /// A complete function invocation consisting of header and body. #[derive(Debug)] -pub struct FuncInvocation { +pub struct FuncCall { pub header: FuncHeader, pub body: Box, } -impl PartialEq for FuncInvocation { - fn eq(&self, other: &FuncInvocation) -> bool { +impl PartialEq for FuncCall { + fn eq(&self, other: &FuncCall) -> bool { (self.header == other.header) && (&self.body == &other.body) } } -- cgit v1.2.3