Commit graph

9 commits

Author SHA1 Message Date
a5b1ac5c4c Better loop variable state handling
* Loops caused local scripts variables to be backed up then restored,
    which would have caused a set_var in a loop to have no effect.
  * Instead, we back up the state of the variable (existing or not,
    value) and either restore the original value or delete the variable
    if it didn't exist.
2022-09-04 22:54:03 +02:00
1b1c1281a2 Use abc for the instruction class and its abstract methods 2022-09-04 22:44:06 +02:00
c587f1479c Fixed weird indentation 2022-09-04 12:21:09 +02:00
36477385a1 Changed the long debugging output for loop/when 2022-09-04 12:20:49 +02:00
cc439110ae Remove allowed field names from instruction data
* It's pointless to have a distinct set of allowed fields for each
    instruction in the program
2022-09-04 11:50:42 +02:00
5ef2ffc55c Debugging support
* Support for dumping parsed programs as strings (both a basic,
    repr-like version and an indented version that is easier to read)
  * Display the parsed program if verbosity is high enough
  * Program tracing if verbosity is high enough
2022-09-04 11:35:07 +02:00
7b44cdc731 create_group - add_host and parent options
* The `add_host` option can be used to add the current host to the
    group being created. It avoids having to use a separate `add_host`
    instruction in this case.
  * The `parent` option can specify the parent group. It avoids having
    to use a separate `add_child` instruction in this case.
2022-09-03 10:43:01 +02:00
5f719d7ab8 "block" instruction implemented
The "block" instruction allows mulitple instructions to be grouped in
order to be executed based on a single condition, in a common loop, with
a local variable scope. In addition, it provides a way to recover from
errors.
2022-09-02 20:26:36 +02:00
17aa8e8c46 Initial import of the WIP plugin 2022-09-02 18:00:22 +02:00