diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-20 01:46:24 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-20 01:46:24 -0600 |
commit | 7abe891766135b36e538b26e7d2433d3bf2a40b2 (patch) | |
tree | d718e980cee0f48ca2d24bd3720be69c49c9dc72 /vaporize/library/Kettle.java | |
parent | b7705e83c2026ff3983fc0b83f9b083d3e8be4c5 (diff) |
Fix many more issues with goto/branch found with GraphViz
Diffstat (limited to 'vaporize/library/Kettle.java')
-rw-r--r-- | vaporize/library/Kettle.java | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/vaporize/library/Kettle.java b/vaporize/library/Kettle.java index d76c938..38c941a 100644 --- a/vaporize/library/Kettle.java +++ b/vaporize/library/Kettle.java @@ -71,6 +71,20 @@ class Kettle { return String.join("\n", this.vapor); } + private void set(Node n, String s) { + /** + * Sets the position of Node n in the original + * file to String s. + */ + this.vapor.set(this.indexOf(n), s); + } + + protected int indexOf(Node n) { + return n.sourcePos.line-1; + } + + // METHODS INTENDED TO BE USED WITH CFG + /** * Needed because VBranch doesn't seem to * keep track of this... @@ -99,16 +113,4 @@ class Kettle { return index+1; } - protected int indexOf(Node n) { - return n.sourcePos.line-1; - } - - private void set(Node n, String s) { - /** - * Sets the position of Node n in the original - * file to String s. - */ - this.vapor.set(this.indexOf(n), s); - } - } |