mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Merge branch 'trunk' of github.com:rtfeldman/roc into shadowing-report
This commit is contained in:
commit
6e00e6f4a2
14 changed files with 654 additions and 27 deletions
|
@ -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(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue