refactor: Change hero action syntax to verb.noun

- Change action name format from `obj.verb` to `verb.obj`
- Update decoder to look for `define.obj` or `configure.obj`
- Modify encoder export to use the new `define.obj` prefix
- Update all test constants and scripts to the new syntax
- Make Remark struct public for test visibility
This commit is contained in:
Mahmoud-Emad
2025-08-05 19:02:26 +03:00
parent 65d75a8148
commit b15c4cd15a
8 changed files with 187 additions and 178 deletions

View File

@@ -39,7 +39,7 @@ pub fn encode[T](val T) !string {
// export exports an encoder into encoded heroscript
pub fn (e Encoder) export() !string {
mut script := e.params.export(
pre: '!!${e.action_names.join('.')}.configure'
pre: '!!define.${e.action_names.join('.')}'
indent: ' '
skip_empty: true
)