mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
added ancestor
This commit is contained in:
@@ -4,6 +4,7 @@ const AndExp = require('./expressions/and');
|
||||
const OrExp = require('./expressions/or');
|
||||
const NotExp = require('./expressions/not');
|
||||
const ChildOfExp = require('./expressions/child_of');
|
||||
const DescendantOfExp = require('./expressions/descendant_of');
|
||||
const ParentOfExp = require('./expressions/parent_of');
|
||||
const RelationWhereExp = require('./expressions/relation_where');
|
||||
const PropertyComparisonExp = require('./expressions/property_comparison');
|
||||
@@ -64,6 +65,12 @@ function getExpression(tokens, parsingContext) {
|
||||
return new ParentOfExp(parseNoteProperty());
|
||||
}
|
||||
|
||||
if (tokens[i] === 'ancestors') {
|
||||
i += 1;
|
||||
|
||||
return new DescendantOfExp(parseNoteProperty());
|
||||
}
|
||||
|
||||
if (tokens[i] === 'labels') {
|
||||
if (tokens[i + 1] !== '.') {
|
||||
parsingContext.addError(`Expected "." to separate field path, god "${tokens[i + 1]}"`);
|
||||
|
||||
Reference in New Issue
Block a user