App: extend Expression syntax

* Support sub-object reference syntax using the following syntax,
    Part.<<Box.>>.Placement
  or, with sub-object label referencing
    Part.<<$Cube.>>.Placement

* Extend indexing support, including range based indexing, e.g.
    A1[B2+1][C3][D4:-1]

* Add new constants, None, True, true, False, false.
This commit is contained in:
Zheng, Lei
2019-08-29 18:53:51 +08:00
committed by wmayer
parent 22fede14d8
commit a1417c5ffa
10 changed files with 7670 additions and 7381 deletions

View File

@@ -553,8 +553,7 @@ DocumentObjectExecReturn *App::PropertyExpressionEngine::execute(ExecuteOption o
App::any value;
try {
// Evaluate expression
std::unique_ptr<Expression> e(expressions[*it].expression->eval());
value = e->getValueAsAny();
value = expressions[*it].expression->getValueAsAny();
if(option == ExecuteOnRestore && prop->testStatus(Property::EvalOnRestore)) {
if(isAnyEqual(value, prop->getPathValue(*it)))
continue;