Formatting
This commit is contained in:
+6
-1
@@ -103,7 +103,12 @@ fn execute(env: &Environment, source: &str) {
|
||||
let result = env.compile(source);
|
||||
for diag in &result.diagnostics.items {
|
||||
let level = format!("{:?}", diag.level).to_uppercase();
|
||||
let loc = diag.identity.as_ref().and_then(|id| id.location).map(|l| format!(" at {}:{}", l.line, l.col)).unwrap_or_default();
|
||||
let loc = diag
|
||||
.identity
|
||||
.as_ref()
|
||||
.and_then(|id| id.location)
|
||||
.map(|l| format!(" at {}:{}", l.line, l.col))
|
||||
.unwrap_or_default();
|
||||
eprintln!("{}{} : {}", level, loc, diag.message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user