mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 04:22:15 +08:00
36 lines
616 B
JavaScript
36 lines
616 B
JavaScript
/**
|
|
* https://tools.ietf.org/html/rfc5183
|
|
*/
|
|
|
|
import {
|
|
GrammarQuotedString,
|
|
GrammarStringList,
|
|
TestCommand
|
|
} from 'Sieve/Grammar';
|
|
|
|
export class EnvironmentTest extends TestCommand
|
|
{
|
|
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;
|
|
}
|
|
|
|
pushArguments(args)
|
|
{
|
|
this.key_list = args.pop();
|
|
this.name = args.pop();
|
|
}
|
|
}
|