Skip to content

Commit

Permalink
Mark some compiler structs as public
Browse files Browse the repository at this point in the history
  • Loading branch information
xtuc committed Apr 26, 2024
1 parent 45688a8 commit ec2e03c
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/compiler/grammar/actions/action_editheader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use crate::compiler::{
use crate::compiler::grammar::MatchType;

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) struct AddHeader {
pub struct AddHeader {
pub last: bool,
pub field_name: Value,
pub value: Value,
Expand All @@ -50,7 +50,7 @@ pub(crate) struct AddHeader {
*/
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) struct DeleteHeader {
pub struct DeleteHeader {
pub index: Option<i32>,
pub comparator: Comparator,
pub match_type: MatchType,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/actions/action_keep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::compiler::{
};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) struct Keep {
pub struct Keep {
pub flags: Vec<Value>,
}

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/actions/action_mime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub(crate) struct ExtractText {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) enum MimeOpts<T> {
pub enum MimeOpts<T> {
Type,
Subtype,
ContentType,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/actions/action_redirect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::compiler::{
};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) struct Redirect {
pub struct Redirect {
pub copy: bool,
pub address: Value,
pub notify: Notify,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/actions/action_reject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::compiler::{
};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) struct Reject {
pub struct Reject {
pub ereject: bool,
pub reason: Value,
}
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use super::{
use super::tests::test_ihave::Error;

#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
pub(crate) enum Instruction {
pub enum Instruction {
Require(Vec<Capability>),
Keep(Keep),
FileInto(FileInto),
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub enum AddressPart {
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) enum MatchType {
pub enum MatchType {
Is,
Contains,
Matches(u64),
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ use super::{

#[allow(clippy::enum_variant_names)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) enum Test {
pub enum Test {
True,
False,
Address(TestAddress),
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/tests/test_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use crate::compiler::{
use crate::compiler::grammar::{AddressPart, MatchType};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) struct TestAddress {
pub struct TestAddress {
pub header_list: Vec<Value>,
pub key_list: Vec<Value>,
pub address_part: AddressPart,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/grammar/tests/test_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use crate::compiler::{
use crate::compiler::grammar::{test::Test, MatchType};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) struct TestHeader {
pub struct TestHeader {
pub header_list: Vec<Value>,
pub key_list: Vec<Value>,
pub match_type: MatchType,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Default for Compiler {
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) enum Value {
pub enum Value {
Text(Arc<String>),
Number(Number),
Variable(VariableType),
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ pub(crate) const MAX_LOCAL_VARIABLES: usize = 256;

#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
pub struct Sieve {
instructions: Vec<Instruction>,
pub instructions: Vec<Instruction>,
num_vars: usize,
num_match_vars: usize,
}
Expand Down

0 comments on commit ec2e03c

Please sign in to comment.