Add initial version of value analysis and dataflow constant propagation

This commit is contained in:
Jannis Christopher Köhl 2022-08-25 16:43:46 +00:00
parent 9b735a7132
commit 4f9c30fb67
26 changed files with 1948 additions and 2 deletions

View file

@ -471,7 +471,11 @@ pub trait Labeller<'a> {
/// Escape tags in such a way that it is suitable for inclusion in a
/// Graphviz HTML label.
pub fn escape_html(s: &str) -> String {
s.replace('&', "&amp;").replace('\"', "&quot;").replace('<', "&lt;").replace('>', "&gt;")
s.replace('&', "&amp;")
.replace('\"', "&quot;")
.replace('<', "&lt;")
.replace('>', "&gt;")
.replace('\n', "<br align=\"left\"/>")
}
impl<'a> LabelText<'a> {