Skip to content

Commit eb6f7c7

Browse files
committed
Mark some compiler structs as public
Refs #3
1 parent 45688a8 commit eb6f7c7

17 files changed

+25
-25
lines changed

src/compiler/grammar/actions/action_editheader.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use crate::compiler::{
3636
use crate::compiler::grammar::MatchType;
3737

3838
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
39-
pub(crate) struct AddHeader {
39+
pub struct AddHeader {
4040
pub last: bool,
4141
pub field_name: Value,
4242
pub value: Value,
@@ -50,7 +50,7 @@ pub(crate) struct AddHeader {
5050
5151
*/
5252
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
53-
pub(crate) struct DeleteHeader {
53+
pub struct DeleteHeader {
5454
pub index: Option<i32>,
5555
pub comparator: Comparator,
5656
pub match_type: MatchType,

src/compiler/grammar/actions/action_keep.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use crate::compiler::{
3333
};
3434

3535
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
36-
pub(crate) struct Keep {
36+
pub struct Keep {
3737
pub flags: Vec<Value>,
3838
}
3939

src/compiler/grammar/actions/action_mime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub(crate) struct ExtractText {
5959
}
6060

6161
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
62-
pub(crate) enum MimeOpts<T> {
62+
pub enum MimeOpts<T> {
6363
Type,
6464
Subtype,
6565
ContentType,

src/compiler/grammar/actions/action_redirect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use crate::compiler::{
3333
};
3434

3535
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
36-
pub(crate) struct Redirect {
36+
pub struct Redirect {
3737
pub copy: bool,
3838
pub address: Value,
3939
pub notify: Notify,

src/compiler/grammar/actions/action_reject.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use crate::compiler::{
2929
};
3030

3131
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
32-
pub(crate) struct Reject {
32+
pub struct Reject {
3333
pub ereject: bool,
3434
pub reason: Value,
3535
}

src/compiler/grammar/actions/action_set.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use crate::{
3636
};
3737

3838
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
39-
pub(crate) enum Modifier {
39+
pub enum Modifier {
4040
Lower,
4141
Upper,
4242
LowerFirst,
@@ -65,7 +65,7 @@ impl Modifier {
6565
}
6666

6767
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
68-
pub(crate) struct Set {
68+
pub struct Set {
6969
pub modifiers: Vec<Modifier>,
7070
pub name: VariableType,
7171
pub value: Value,

src/compiler/grammar/actions/action_vacation.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use crate::{
3737
};
3838

3939
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
40-
pub(crate) struct Vacation {
40+
pub struct Vacation {
4141
pub subject: Option<Value>,
4242
pub from: Option<Value>,
4343
pub mime: bool,
@@ -46,15 +46,15 @@ pub(crate) struct Vacation {
4646
}
4747

4848
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
49-
pub(crate) struct TestVacation {
49+
pub struct TestVacation {
5050
pub addresses: Vec<Value>,
5151
pub period: Period,
5252
pub handle: Option<Value>,
5353
pub reason: Value,
5454
}
5555

5656
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
57-
pub(crate) enum Period {
57+
pub enum Period {
5858
Days(u64),
5959
Seconds(u64),
6060
Default,

src/compiler/grammar/instruction.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use super::{
5555
use super::tests::test_ihave::Error;
5656

5757
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
58-
pub(crate) enum Instruction {
58+
pub enum Instruction {
5959
Require(Vec<Capability>),
6060
Keep(Keep),
6161
FileInto(FileInto),

src/compiler/grammar/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub enum AddressPart {
103103
}
104104

105105
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
106-
pub(crate) enum MatchType {
106+
pub enum MatchType {
107107
Is,
108108
Contains,
109109
Matches(u64),
@@ -134,9 +134,9 @@ pub enum Comparator {
134134

135135
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
136136
pub struct Clear {
137-
pub(crate) local_vars_idx: u32,
138-
pub(crate) local_vars_num: u32,
139-
pub(crate) match_vars: u64,
137+
pub local_vars_idx: u32,
138+
pub local_vars_num: u32,
139+
pub match_vars: u64,
140140
}
141141

142142
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]

src/compiler/grammar/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ use super::{
5656

5757
#[allow(clippy::enum_variant_names)]
5858
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
59-
pub(crate) enum Test {
59+
pub enum Test {
6060
True,
6161
False,
6262
Address(TestAddress),

src/compiler/grammar/tests/test_address.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use crate::compiler::{
3232
use crate::compiler::grammar::{AddressPart, MatchType};
3333

3434
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
35-
pub(crate) struct TestAddress {
35+
pub struct TestAddress {
3636
pub header_list: Vec<Value>,
3737
pub key_list: Vec<Value>,
3838
pub address_part: AddressPart,

src/compiler/grammar/tests/test_body.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use crate::compiler::{
3232
use crate::compiler::grammar::{test::Test, MatchType};
3333

3434
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
35-
pub(crate) struct TestBody {
35+
pub struct TestBody {
3636
pub key_list: Vec<Value>,
3737
pub body_transform: BodyTransform,
3838
pub match_type: MatchType,
@@ -42,7 +42,7 @@ pub(crate) struct TestBody {
4242
}
4343

4444
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
45-
pub(crate) enum BodyTransform {
45+
pub enum BodyTransform {
4646
Raw,
4747
Content(Vec<Value>),
4848
Text,

src/compiler/grammar/tests/test_header.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use crate::compiler::{
3737
use crate::compiler::grammar::{test::Test, MatchType};
3838

3939
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
40-
pub(crate) struct TestHeader {
40+
pub struct TestHeader {
4141
pub header_list: Vec<Value>,
4242
pub key_list: Vec<Value>,
4343
pub match_type: MatchType,

src/compiler/grammar/tests/test_ihave.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub(crate) struct TestIhave {
3737
}
3838

3939
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
40-
pub(crate) struct Error {
40+
pub struct Error {
4141
pub message: Value,
4242
}
4343

src/compiler/grammar/tests/test_string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use crate::compiler::{
3232
use crate::compiler::grammar::{test::Test, MatchType};
3333

3434
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
35-
pub(crate) struct TestString {
35+
pub struct TestString {
3636
pub match_type: MatchType,
3737
pub comparator: Comparator,
3838
pub source: Vec<Value>,

src/compiler/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl Default for Compiler {
9595
}
9696

9797
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
98-
pub(crate) enum Value {
98+
pub enum Value {
9999
Text(Arc<String>),
100100
Number(Number),
101101
Variable(VariableType),

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub(crate) const MAX_LOCAL_VARIABLES: usize = 256;
284284

285285
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
286286
pub struct Sieve {
287-
instructions: Vec<Instruction>,
287+
pub instructions: Vec<Instruction>,
288288
num_vars: usize,
289289
num_match_vars: usize,
290290
}

0 commit comments

Comments
 (0)