Add listener support to leafes (and nodes) for evaluated arguments

Issue #3 resolved
Siegfried Steiner created an issue

Impediment:

In case a Term has been evaluated, one has to check the Term after evaluation if it has been evaluated and retrieve its value. The resulting if then else structure is detached from the syntax declaration and results in a similar structure which may result in code hard to read and maintain.

Proposal:

A Term provides optional support for functions (in terms of a functional interface such as a consumer) which may be attached to a Term when declaring the syntax. The function is invoked with the Term as argument in case the Term participated in matching the command line arguments when parsing the syntax declaration.

Discussion:

To be discussed whether such a function is to be supported by just the Operand (and its successors) or also by the Condition types.

Comments (1)

  1. Log in to comment