Make task engine message pretty printing part of the library
Pretty printing (error) messages that are produced by tasks requires some extra pretty printing code:
pp-message-top(pp-lang) = origin-track-forced((id, strip-annos; pp-message(pp-lang))) pp-message(pp-lang) = not(is-list); (is-string <+ pp-result(pp-lang) <+ pp-lang <+ (strip-annos; write-to-string)) pp-message(pp-lang) = map(pp-message(pp-lang)); concat-strings pp-result(pp-lang): result@Result(_) -> msg where if <task-has-failed> result then msg := "fail" else msg := <task-get-results; map(pp-message(pp-lang)); separate-by(|" or "); concat-strings> result end
This code is generic and should be added to the runtime libraries. In addition, the default analysis interface should be changed to use this pretty printer:
Submitted by Gabriƫl Konat on 11 March 2014 at 17:39analysis-single-default-interface = analysis-single-default(id, id, pp-message-top(pp-LANG-string)|<language>) analysis-multiple-default-interface = analysis-multiple-default(parse-file <+ !(), id, id, pp-message-top(pp-LANG-string)|<language>, <project-path>)
Log in to post comments