mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
Added Sieve parser code in master
This commit is contained in:
parent
e90e8a55ce
commit
f4cd25f8ad
21 changed files with 2126 additions and 8 deletions
38
dev/Sieve/Extensions/rfc5183.js
Normal file
38
dev/Sieve/Extensions/rfc5183.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* https://tools.ietf.org/html/rfc5183
|
||||
*/
|
||||
|
||||
import {
|
||||
GrammarQuotedString,
|
||||
GrammarStringList,
|
||||
GrammarTest
|
||||
} from 'Sieve/Grammar';
|
||||
|
||||
export class EnvironmentCommand extends GrammarTest
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
super();
|
||||
this.name = new GrammarQuotedString;
|
||||
this.key_list = new GrammarStringList;
|
||||
}
|
||||
|
||||
get require() { return 'environment'; }
|
||||
|
||||
toString()
|
||||
{
|
||||
return 'environment'
|
||||
+ (this.comparator ? ' :comparator ' + this.comparator : '')
|
||||
+ ' ' + this.match_type
|
||||
+ ' ' + this.name
|
||||
+ ' ' + this.key_list.toString();
|
||||
}
|
||||
|
||||
pushArguments(args)
|
||||
{
|
||||
this.name = args[args.length-2];
|
||||
this.key_list = args[args.length-1];
|
||||
}
|
||||
}
|
||||
|
||||
//Sieve.Commands.environment = EnvironmentCommand;
|
||||
Loading…
Add table
Add a link
Reference in a new issue