mirror of
https://github.com/KarolS/millfork.git
synced 2024-09-10 11:54:30 +00:00
Added #infoeval preprocessor directive
This commit is contained in:
parent
35004220ca
commit
f37696df5a
@ -114,6 +114,11 @@ Emits a diagnostic message.
|
||||
`#warn` emits a warning. It may be treated as an error depending on compilation options.
|
||||
`#info` emits a benign diagnostic message.
|
||||
|
||||
### `#infoeval`
|
||||
|
||||
#infoeval <expr>
|
||||
|
||||
Evaluates an expression and emits the result as a diagnostic message.
|
||||
|
||||
### `#use`
|
||||
|
||||
|
@ -68,6 +68,11 @@ object Preprocessor {
|
||||
case "error" => if (enabled) log.error(param, pos)
|
||||
case "warn" => if (enabled) log.warn(param, pos)
|
||||
case "info" => if (enabled) log.info(param, pos)
|
||||
case "infoeval" =>
|
||||
if (enabled) {
|
||||
val value = evalParam(param, pos)
|
||||
log.info(s"$param = $value", pos)
|
||||
}
|
||||
case "if" =>
|
||||
if (enabled) {
|
||||
val value = evalParam(param, pos)
|
||||
|
Loading…
Reference in New Issue
Block a user