mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Fix some Sieve parser issues
This commit is contained in:
parent
62639acc5a
commit
f3935b1df4
3 changed files with 6 additions and 5 deletions
|
|
@ -18,9 +18,9 @@ import {
|
||||||
*/
|
*/
|
||||||
export class ConditionalCommand extends ControlCommand
|
export class ConditionalCommand extends ControlCommand
|
||||||
{
|
{
|
||||||
constructor()
|
constructor(identifier)
|
||||||
{
|
{
|
||||||
super();
|
super(identifier);
|
||||||
this.test = null;
|
this.test = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ class FlagCommand extends ActionCommand
|
||||||
|
|
||||||
toString()
|
toString()
|
||||||
{
|
{
|
||||||
return this.identifier + ' ' + this._variablename + ' ' + this.list_of_flags + ';';
|
let name = this._variablename;
|
||||||
|
return this.identifier + (name.length ? ' ' + this.variablename : '') + ' ' + this.list_of_flags + ';';
|
||||||
}
|
}
|
||||||
|
|
||||||
get variablename()
|
get variablename()
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ export class GrammarTestList extends Array
|
||||||
// return '(\r\n\t' + arrayToString(this, ',\r\n\t') + '\r\n)';
|
// return '(\r\n\t' + arrayToString(this, ',\r\n\t') + '\r\n)';
|
||||||
return '(' + this.join(', ') + ')';
|
return '(' + this.join(', ') + ')';
|
||||||
}
|
}
|
||||||
return this.length ? this[0] : '';
|
return this.length ? this[0].toString() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
push(value)
|
push(value)
|
||||||
|
|
@ -254,7 +254,7 @@ export class GrammarStringList extends Array
|
||||||
if (1 < this.length) {
|
if (1 < this.length) {
|
||||||
return '[' + this.join(',') + ']';
|
return '[' + this.join(',') + ']';
|
||||||
}
|
}
|
||||||
return this.length ? this[0] : '';
|
return this.length ? this[0].toString() : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
push(value)
|
push(value)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue