Merge branch 'trunk' of github.com:rtfeldman/roc into shadowing-report

This commit is contained in:
Chad Stearns 2020-04-05 15:57:26 -04:00
commit 6e00e6f4a2
14 changed files with 654 additions and 27 deletions

View file

@ -14,6 +14,7 @@ use ven_pretty::{BoxAllocator, DocAllocator, DocBuilder, Render, RenderAnnotated
/// A textual report.
pub struct Report {
pub title: String,
pub filename: PathBuf,
pub text: ReportText,
}
@ -128,6 +129,7 @@ pub fn can_problem(filename: PathBuf, problem: Problem) -> Report {
};
Report {
title: "SYNTAX PROBLEM".to_string(),
filename,
text: Concat(texts),
}
@ -327,11 +329,11 @@ where
Url => {
self.write_str("<")?;
}
GlobalTag | PrivateTag | RecordField | Keyword => {
GlobalTag | PrivateTag | Keyword => {
self.write_str("`")?;
}
CodeBlock | PlainText | LineNumber | Error | GutterBar | TypeVariable | Alias
| Module | Structure | Symbol | BinOp => {}
| RecordField | Module | Structure | Symbol | BinOp => {}
}
self.style_stack.push(*annotation);
Ok(())
@ -349,11 +351,11 @@ where
Url => {
self.write_str(">")?;
}
GlobalTag | PrivateTag | RecordField | Keyword => {
GlobalTag | PrivateTag | Keyword => {
self.write_str("`")?;
}
CodeBlock | PlainText | LineNumber | Error | GutterBar | TypeVariable | Alias
| Module | Structure | Symbol | BinOp => {}
| RecordField | Module | Structure | Symbol | BinOp => {}
},
}
Ok(())