mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
drop sieve parser from sievescripts branch
This commit is contained in:
parent
2024088ea0
commit
ca91a6e408
18 changed files with 1 additions and 2138 deletions
|
|
@ -1,84 +0,0 @@
|
|||
/**
|
||||
* https://tools.ietf.org/html/rfc5429
|
||||
*/
|
||||
|
||||
(Sieve => {
|
||||
|
||||
const Grammar = Sieve.Grammar;
|
||||
|
||||
/**
|
||||
* https://tools.ietf.org/html/rfc5429#section-2.1
|
||||
*/
|
||||
class Ereject extends Grammar.Command
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
super('ereject');
|
||||
this._reason = new Grammar.QuotedString;
|
||||
}
|
||||
|
||||
get require() { return 'ereject'; }
|
||||
|
||||
toString()
|
||||
{
|
||||
return 'ereject ' + this._reason + ';';
|
||||
}
|
||||
|
||||
get reason()
|
||||
{
|
||||
return this._reason.value;
|
||||
}
|
||||
|
||||
set reason(value)
|
||||
{
|
||||
this._reason.value = value;
|
||||
}
|
||||
|
||||
pushArguments(args)
|
||||
{
|
||||
if (args[0] instanceof Grammar.StringType) {
|
||||
this._reason = args[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* https://tools.ietf.org/html/rfc5429#section-2.2
|
||||
*/
|
||||
class Reject extends Grammar.Command
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
super('reject');
|
||||
this._reason = new Grammar.QuotedString;
|
||||
}
|
||||
|
||||
get require() { return 'reject'; }
|
||||
|
||||
toString()
|
||||
{
|
||||
return 'reject ' + this._reason + ';';
|
||||
}
|
||||
|
||||
get reason()
|
||||
{
|
||||
return this._reason.value;
|
||||
}
|
||||
|
||||
set reason(value)
|
||||
{
|
||||
this._reason.value = value;
|
||||
}
|
||||
|
||||
pushArguments(args)
|
||||
{
|
||||
if (args[0] instanceof Grammar.StringType) {
|
||||
this._reason = args[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Sieve.Commands.ereject = Ereject;
|
||||
Sieve.Commands.reject = Reject;
|
||||
|
||||
})(this.Sieve);
|
||||
Loading…
Add table
Add a link
Reference in a new issue