Open zero-plusplus opened 1 year ago
This change was intended to be compatible with compiler directives, but has the fatal problem that all commas need to be escaped.
I therefore focused on the #If directive. This directive accepts a single expression and does not require escaping commas.
By viewing the conventional syntax as a special expression, the following can be used to preserve a minimum of usability. However, it is not fully compatible.
; Note that a space or comma is required after the directive name
; @Debug-Output => abc {"edf"}
; @Debug-Output (a == b)[=3] => abc {"edf"}
; @Debug-Output [=3] => abc {"edf"}
; @Debug-Output, (a == b)[=3] => abc {"edf"}
; If no condition is specified, the output operator (=>) can be omitted, but must be escaped as '=' if it starts with '`='
; @Debug-Output, abc {"edf"}
; The following means the same
; @Debug-Output, => => abc {"edf"}
; @Debug-Output, `=> abc {"edf"}
The syntax of the debug directive was not the specification we originally had in mind. The current specification was conceived to somehow make it feasible at a time when there was no knowledge of the expression evaluation process.
The original idea was to have the same syntax as the compiler directives.
Since this is a destructive change, I will change it at this time of a major update.
The changes are as follows.
Under the new specification, it will no longer be possible to specify the hit condition. However, this is not a problem, as hit conditions can be reproduced in the new evaluation process as follows.
GROUPPING in DebugOutput specifies the following keywords to the log in the new syntax
{:start:}
{:startCollapsed:}
{:end:}