Project

General

Profile

Task #5565

[expression] Setting traversal order in visitor

Added by Alexander Kamkin almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Andrei Tatarnikov
Category:
-
Target version:
Start date:
01/20/2015
Due date:
% Done:

100%

Estimated time:
Detected in build:
svn
Published in build:
150217

Description

There should be possibility to set up order of operands traversal.

After calling onOperationBegin the walker should call the getOrder method. The result is an integer array defining the traversal order:

onOperationBegin(operation);
int[] order = getOrder();
...
for (int index = 0; index < number; index++) {
  Operand operand = node.getOperand(order != null ? order[index] : index);
  onOperandBegin(operand, index); // IMPORTANT: index (not order[index])!
  ...
}

History

#1

Updated by Andrei Tatarnikov almost 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Implemented in r761.

#2

Updated by Andrei Tatarnikov over 5 years ago

  • Status changed from Resolved to Closed
  • Published in build set to 150217

Also available in: Atom PDF