Skip to content

Code generator: Group statement: to be able to solve IF and FOR_EACH (and similar) #2

Description

@coderbloke

No need for dedicated IF and FOR_EACH (and similar) tag
In generator specification it can be defined, if a tag behaves as block statement
Closing tag can be provided there also.

For example

_IF_USE_EXT_LIN_
...
_END_

... nicely can live together with a ...

_FOR_EACH_ACTION_
...
_END_

... if the _END_ tags are defined per CodeGeneratorAction

CodeGeneratorActions:

  1. tag: _IF_USE_EXT_LIN_
    tag_type: IF
    close_tag: _END_
    action_method: _is_ext_lib_used
  2. tag: _FOR_EACH_ACTION_
    tag_type: FOR_EACH
    close_tag: _END_
    action_method: _get_actions

Such handle functions are no returning String as code substitution, but rather

  • bool fo IF
  • Array for FOR_EACH

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions