NEP22 Debug Statement - ghewgill/neon-lang GitHub Wiki
This proposal introduces a new DEBUG
statement for printing diagnostic information.
Proposal
A new statement DEBUG
with the following syntax possibilities:
DEBUG "got here"
DEBUG n
DEBUG "current count:", n
DEBUG m, n
The output for the above might be:
(test.neon:1) got here
(test.neon:2) n (Number) = 5
(test.neon:3) current count: n (Number) = 5
(test.neon:4) m (Number) = 7, n (Number) = 5
The source filename and number in parentheses is the line number of the DEBUG
statement.
The debug information would be turned off by default, and enabled by an executor switch. There would also be a compiler switch to disable generation of debug output completely.