diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-04-29 11:03:17 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-04-29 11:03:17 +0200 |
| commit | 14c9ff571d41e01fe46fb842aa5ea1b93497c4ab (patch) | |
| tree | 0a09cec0552dcd990d12df8ab361271112d4bb83 /src/syntax.rs | |
| parent | f279c52b503e9dacb558d8a46a75b42bc5222ee4 (diff) | |
Remove stack from parser ♻
Diffstat (limited to 'src/syntax.rs')
| -rw-r--r-- | src/syntax.rs | 9 |
1 files changed, 5 insertions, 4 deletions
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<dyn Function>, } -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) } } |
