Child position constants

Issue #197 new
Jesper Öqvist created an issue

Each AST class is generated with a getXYZChildPosition method to find the position of the child in the child array. However, it seems like the child positions could be stored in private constants in each such class.

Furthermore, the internal attributes are the only attributes (that should be) using the child positions so we should be able to completely remove the child position constants from the generated code.

Comments (1)

  1. Jesper Öqvist reporter

    One of the reasons why the child position constants are currently needed is that the actual positions of each child component is only computed in one of the last steps of the code generation.

    If we could decide the order of child components before anything needing to use the child positions is generated then we could completely remove the child position methods/constants.

  2. Log in to comment