[hg] main-silver: Added Functions/Methods and Variables/Fields i...

  • From: Petr Kudryavtsev < >
  • To: , , , ,
  • Subject: [hg] main-silver: Added Functions/Methods and Variables/Fields i...
  • Date: Thu, 18 Apr 2013 11:26:45 -0700

changeset 8a8ce4db3595 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/8a8ce4db3595
description:
        Added Functions/Methods and Variables/Fields into symtab

diffstat:

 
cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/CppParserActionImpl.java
 |  13 ++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diffs (30 lines):

diff --git 
a/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/CppParserActionImpl.java
 
b/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/CppParserActionImpl.java
--- 
a/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/CppParserActionImpl.java
+++ 
b/cnd.modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/CppParserActionImpl.java
@@ -1011,6 +1011,13 @@
                     } else {
                         builder.create();
                     }
+                    
+                    // todo: decide what builders could be here
+                    if ((builder instanceof FunctionBuilder || builder 
instanceof VariableBuilder)) {
+                        CharSequence name = builder.getName();
+                        globalSymTab.enterLocal(name);
+                    }
+                    
                 } else if (declBuilder.getTypeBuilder() != null) {
                     // Here we will register forward declarations
 
@@ -3163,6 +3170,12 @@
                     
((MemberBuilder)builder).setVisibility(parent.getCurrentMemberVisibility());
                     parent.addMemberBuilder((MemberBuilder)builder);
                 }
+                
+                // todo: decide what builders could be here
+                if (builder instanceof FieldBuilder || builder instanceof 
MethodBuilder) {
+                    SymTabEntry classEntry = 
globalSymTab.enterLocal(builder.getName());
+                }
+                
             } else if (declBuilder.getTypeBuilder() != null && 
declBuilder.getTypeBuilder().getNameBuilder() != null) {
                 // Here we will register forward declarations inside 
class/struct
                 

[hg] main-silver: Added Functions/Methods and Variables/Fields i...

Petr Kudryavtsev 04/18/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close