[[nbpython-commits]] [hg] main/contrib: Improve Python AST view nodes

  • From: Tor Norbye < >
  • To:
  • Subject: [[nbpython-commits]] [hg] main/contrib: Improve Python AST view nodes
  • Date: Thu, 21 Oct 2010 08:34:33 -0700

changeset 2770a353d6d1 in main/contrib
details: http://hg.netbeans.org/main/contrib?cmd=changeset;node=2770a353d6d1
description:
        Improve Python AST view nodes

diffstat:

 python.editor/src/org/netbeans/modules/python/editor/PythonAstTreeNode.java 
|  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (25 lines):

diff --git 
a/python.editor/src/org/netbeans/modules/python/editor/PythonAstTreeNode.java 
b/python.editor/src/org/netbeans/modules/python/editor/PythonAstTreeNode.java
--- 
a/python.editor/src/org/netbeans/modules/python/editor/PythonAstTreeNode.java
+++ 
b/python.editor/src/org/netbeans/modules/python/editor/PythonAstTreeNode.java
@@ -38,6 +38,7 @@
 import org.openide.xml.XMLUtil;
 import org.python.antlr.PythonTree;
 import org.python.antlr.Visitor;
+import org.python.antlr.ast.Name;
 
 class PythonAstTreeNode implements AstTreeNode {
     private List<PythonAstTreeNode> children;
@@ -128,6 +129,13 @@
         sb.append(getEndOffset());
         sb.append(") ");
         //sb.append("</i>"); // NOI18N
+
+        if (node instanceof Name) {
+            sb.append('"');
+            sb.append(((Name)node).getInternalId());
+            sb.append('"');
+        }
+
         return sb.toString();
     }
 

[[nbpython-commits]] [hg] main/contrib: Improve Python AST view nodes

Tor Norbye 10/21/2010

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close