@emartech/data-aggregator-language
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -29,3 +29,3 @@ { | ||
}, | ||
"version": "2.3.0" | ||
"version": "2.4.0" | ||
} |
@@ -163,2 +163,10 @@ 'use strict'; | ||
describe('Logical Operators', () => { | ||
describe('Not Operator', function() { | ||
it('works', function() { | ||
expect(aggregate('NOT EMPTY UNION programs.users')).to.eql(false); | ||
}); | ||
}); | ||
}); | ||
describe('when there is a parsing error', () => { | ||
@@ -165,0 +173,0 @@ it('throws an exception', () => { |
@@ -35,2 +35,6 @@ 'use strict'; | ||
notExpression(ctx) { | ||
return !this.visit(ctx.emptyExpression); | ||
} | ||
additionExpression(ctx) { | ||
@@ -37,0 +41,0 @@ return this.visit(ctx.lhs) + this._accumulateAdditiveRhs(ctx.rhs); |
@@ -14,2 +14,3 @@ 'use strict'; | ||
averageOperator, | ||
notOperator, | ||
emptyOperator, | ||
@@ -45,3 +46,4 @@ unionOperator, | ||
{ ALT: () => $.SUBRULE($.unionExpression, { LABEL: 'expression' }) }, | ||
{ ALT: () => $.SUBRULE($.emptyExpression, { LABEL: 'expression' }) } | ||
{ ALT: () => $.SUBRULE($.emptyExpression, { LABEL: 'expression' }) }, | ||
{ ALT: () => $.SUBRULE($.notExpression, { LABEL: 'expression' }) } | ||
]); | ||
@@ -60,2 +62,7 @@ }); | ||
$.RULE('notExpression', () => { | ||
$.CONSUME(notOperator); | ||
$.SUBRULE($.emptyExpression); | ||
}); | ||
$.RULE('additionExpression', () => { | ||
@@ -62,0 +69,0 @@ $.SUBRULE($.minusExpression, { LABEL: 'lhs' }); |
@@ -35,2 +35,7 @@ 'use strict'; | ||
const notOperator = createToken({ | ||
name: 'notOperator', | ||
pattern: /NOT/ | ||
}); | ||
const plusOperator = createToken({ | ||
@@ -87,2 +92,3 @@ name: 'plusOperator', | ||
averageOperator, | ||
notOperator, | ||
emptyOperator, | ||
@@ -89,0 +95,0 @@ unionOperator, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25026
605