Get most valid Sieve scripts parsed properly

This commit is contained in:
the-djmaze 2024-09-24 01:37:04 +02:00
parent c254025d7a
commit 76ade5eac0
25 changed files with 175 additions and 71 deletions

View file

@ -68,9 +68,10 @@ export class AddressTest extends TestCommand
}
return result
+ (this.last ? ' :last' : (this.index.value ? ' :index ' + this.index : ''))
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ (this._comparator ? ' :comparator ' + this._comparator : '')
+ ' ' + this.address_part
+ ' ' + this.match_type
+ (this._match_type ? ' ' + this._match_type : '')
+ (this.relational_match ? ' ' + this.relational_match : '')
+ ' ' + this.header_list
+ ' ' + this.key_list;
}
@ -147,9 +148,10 @@ export class EnvelopeTest extends TestCommand
toString()
{
return 'envelope'
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ (this._comparator ? ' :comparator ' + this._comparator : '')
+ ' ' + this.address_part
+ ' ' + this.match_type
+ (this._match_type ? ' ' + this._match_type : '')
+ (this.relational_match ? ' ' + this.relational_match : '')
+ ' ' + this.envelope_part
+ ' ' + this.key_list;
}
@ -279,8 +281,9 @@ export class HeaderTest extends TestCommand
}
return result
+ (this.last ? ' :last' : (this.index.value ? ' :index ' + this.index : ''))
+ (this.comparator ? ' :comparator ' + this.comparator : '')
+ ' ' + this.match_type
+ (this._comparator ? ' :comparator ' + this._comparator : '')
+ (this._match_type ? ' ' + this._match_type : '')
+ (this.relational_match ? ' ' + this.relational_match : '')
+ ' ' + this.header_names
+ ' ' + this.key_list;
}