From cbb6ca2a54e60e69316fc7b5b3c5a80bfd4c99b8 Mon Sep 17 00:00:00 2001 From: dibyendumajumdar Date: Sat, 28 Oct 2023 17:49:07 +0100 Subject: Remove id as we already have it in Node. --- .../src/main/java/com/seaofnodes/simple/node/ScopeNode.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'chapter05/src/main/java/com') 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> _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) { -- cgit v1.2.3