mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-05-13 03:00:26 -04:00
Merge pull request #572 from powdr-labs/move_function_call
Move FunctionCall.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::{iter::once, ops::ControlFlow};
|
||||
|
||||
use crate::parsed::{asm::FunctionCall, Expression};
|
||||
use crate::parsed::{Expression, FunctionCall};
|
||||
|
||||
use super::FunctionStatement;
|
||||
|
||||
|
||||
@@ -132,15 +132,3 @@ pub struct Param {
|
||||
pub name: String,
|
||||
pub ty: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)]
|
||||
pub struct FunctionCall<T> {
|
||||
pub id: String,
|
||||
pub arguments: Vec<Expression<T>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)]
|
||||
pub enum PlookupOperator {
|
||||
In,
|
||||
Is,
|
||||
}
|
||||
|
||||
@@ -253,15 +253,6 @@ impl<T: Display> Display for FunctionCall<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for PlookupOperator {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
||||
match self {
|
||||
PlookupOperator::In => write!(f, "in"),
|
||||
PlookupOperator::Is => write!(f, "is"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Param {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
||||
write!(
|
||||
|
||||
@@ -5,8 +5,6 @@ use std::{iter::once, ops::ControlFlow};
|
||||
|
||||
use number::{DegreeType, FieldElement};
|
||||
|
||||
use self::asm::FunctionCall;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct PILFile<T>(pub Vec<PilStatement<T>>);
|
||||
|
||||
@@ -275,6 +273,12 @@ pub enum BinaryOperator {
|
||||
ShiftRight,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)]
|
||||
pub struct FunctionCall<T> {
|
||||
pub id: String,
|
||||
pub arguments: Vec<Expression<T>>,
|
||||
}
|
||||
|
||||
/// The definition of a function (excluding its name):
|
||||
/// Either a param-value mapping or an array expression.
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user