@@ -25,11 +25,11 @@ use serde::{Deserialize, Serialize};
25
25
26
26
use crate :: compiler:: {
27
27
grammar:: instruction:: { CompilerState , Instruction } ,
28
- lexer:: { string :: StringItem , word:: Word , Token } ,
29
- CompileError ,
28
+ lexer:: { word:: Word , Token } ,
29
+ CompileError , Value , VariableType ,
30
30
} ;
31
31
32
- use super :: action_set:: { Modifier , Variable } ;
32
+ use super :: action_set:: Modifier ;
33
33
34
34
#[ derive( Debug , Eq , PartialEq , Clone , Serialize , Deserialize ) ]
35
35
pub ( crate ) struct ForEveryPart {
@@ -38,24 +38,24 @@ pub(crate) struct ForEveryPart {
38
38
39
39
#[ derive( Debug , Eq , PartialEq , Clone , Serialize , Deserialize ) ]
40
40
pub ( crate ) struct Replace {
41
- pub subject : Option < StringItem > ,
42
- pub from : Option < StringItem > ,
43
- pub replacement : StringItem ,
41
+ pub subject : Option < Value > ,
42
+ pub from : Option < Value > ,
43
+ pub replacement : Value ,
44
44
pub mime : bool ,
45
45
}
46
46
47
47
#[ derive( Debug , Eq , PartialEq , Clone , Serialize , Deserialize ) ]
48
48
pub ( crate ) struct Enclose {
49
- pub subject : Option < StringItem > ,
50
- pub headers : Vec < StringItem > ,
51
- pub value : StringItem ,
49
+ pub subject : Option < Value > ,
50
+ pub headers : Vec < Value > ,
51
+ pub value : Value ,
52
52
}
53
53
54
54
#[ derive( Debug , Eq , PartialEq , Clone , Serialize , Deserialize ) ]
55
55
pub ( crate ) struct ExtractText {
56
56
pub modifiers : Vec < Modifier > ,
57
57
pub first : Option < usize > ,
58
- pub name : Variable ,
58
+ pub name : VariableType ,
59
59
}
60
60
61
61
#[ derive( Debug , Clone , PartialEq , Eq , Serialize , Deserialize ) ]
@@ -188,10 +188,7 @@ impl<'x> CompilerState<'x> {
188
188
Ok ( ( ) )
189
189
}
190
190
191
- pub ( crate ) fn parse_mimeopts (
192
- & mut self ,
193
- opts : Word ,
194
- ) -> Result < MimeOpts < StringItem > , CompileError > {
191
+ pub ( crate ) fn parse_mimeopts ( & mut self , opts : Word ) -> Result < MimeOpts < Value > , CompileError > {
195
192
Ok ( match opts {
196
193
Word :: Type => MimeOpts :: Type ,
197
194
Word :: Subtype => MimeOpts :: Subtype ,
0 commit comments