diff options
| author | dibyendumajumdar <mobile@majumdar.org.uk> | 2023-10-28 17:49:07 +0100 |
|---|---|---|
| committer | Dibyendu Majumdar <dibyendumajumdar@users.noreply.github.com> | 2023-11-01 18:56:50 +0000 |
| commit | cbb6ca2a54e60e69316fc7b5b3c5a80bfd4c99b8 (patch) | |
| tree | e8223d81fa5ecad5a79af97ef8ae1f324040d31c /chapter05/src/main/java/com | |
| parent | 65cc1fa45d695266ad51252f7427ad8e9ab5ba04 (diff) | |
| download | Simple-cbb6ca2a54e60e69316fc7b5b3c5a80bfd4c99b8.tar.gz Simple-cbb6ca2a54e60e69316fc7b5b3c5a80bfd4c99b8.zip | |
Remove id as we already have it in Node.
Diffstat (limited to 'chapter05/src/main/java/com')
| -rw-r--r-- | chapter05/src/main/java/com/seaofnodes/simple/node/ScopeNode.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/chapter05/src/main/java/com/seaofnodes/simple/node/ScopeNode.java b/chapter05/src/main/java/com/seaofnodes/simple/node/ScopeNode.java index 5ac42c43..517ada00 100644 --- a/chapter05/src/main/java/com/seaofnodes/simple/node/ScopeNode.java +++ b/chapter05/src/main/java/com/seaofnodes/simple/node/ScopeNode.java @@ -17,19 +17,8 @@ public class ScopeNode extends Node { */ public final Stack<HashMap<String, Integer>> _scopes = new Stack<>(); - /** - * We duplicate ScopeNodes when branches occur, so it is useful to have - * a unique name for each ScopeNode; this helps when we want to visualize the - * graph - */ - private int _id; - - private static int _idCounter = 0; - - public ScopeNode() { _id = _idCounter++; } - @Override - public String label() { return "Scope" + _id; } + public String label() { return "Scope" + _nid; } @Override StringBuilder _print1(StringBuilder sb) { |
