Lines Matching refs:pDecl
56 AstDeclaration* AstScope::addDeclaration(AstDeclaration* pDecl) in addDeclaration() argument
60 if ((pDeclaration = lookupForAdd(pDecl)) != NULL) in addDeclaration()
62 if (pDecl->getNodeType() == NT_union_branch ) in addDeclaration()
64 m_declarations.push_back(pDecl); in addDeclaration()
65 return pDecl; in addDeclaration()
67 if ( pDecl->hasAncestor(pDeclaration) ) in addDeclaration()
69 idlc()->error()->error2(EIDL_REDEF_SCOPE, pDecl, pDeclaration); in addDeclaration()
72 if ( (pDecl->getNodeType() == pDeclaration->getNodeType()) && in addDeclaration()
73 (pDecl->getNodeType() == NT_sequence in addDeclaration()
74 || pDecl->getNodeType() == NT_array in addDeclaration()
75 || pDecl->getNodeType() == NT_instantiated_struct) ) in addDeclaration()
80 && (pDecl->getNodeType() == NT_interface) in addDeclaration()
83 m_declarations.push_back(pDecl); in addDeclaration()
84 return pDecl; in addDeclaration()
87 ( ((pDecl->getNodeType() == NT_interface_member) in addDeclaration()
89 ((pDecl->getNodeType() == NT_service_member) in addDeclaration()
93 m_declarations.push_back(pDecl); in addDeclaration()
94 return pDecl; in addDeclaration()
97 idlc()->error()->error2(EIDL_REDEF_SCOPE, scopeAsDecl(this), pDecl); in addDeclaration()
101 m_declarations.push_back(pDecl); in addDeclaration()
102 return pDecl; in addDeclaration()
109 AstDeclaration* pDecl = NULL; in getNodeCount() local
114 pDecl = *iter; in getNodeCount()
115 if ( pDecl->getNodeType() == nodeType ) in getNodeCount()
124 AstDeclaration* pDecl = NULL; in lookupByName() local
132 pDecl = scopeAsDecl(this); in lookupByName()
133 if ( !pDecl ) in lookupByName()
136 pScope = pDecl->getScope(); in lookupByName()
142 pDecl = lookupByName(subName); in lookupByName()
143 return pDecl; in lookupByName()
147 pDecl = pScope->lookupByName(scopedName); in lookupByName()
148 return pDecl; in lookupByName()
156 pDecl = lookupByNameLocal(firstScope); in lookupByName()
157 if ( !pDecl ) in lookupByName()
162 pDecl = scopeAsDecl(this); in lookupByName()
163 if ( pDecl ) in lookupByName()
165 pScope = pDecl->getScope(); in lookupByName()
167 pDecl = pScope->lookupByName(scopedName); in lookupByName()
169 pDecl = NULL; in lookupByName()
173 if ( !pDecl ) in lookupByName()
176 pDecl = lookupInInherited(scopedName); in lookupByName()
187 pScope = declAsScope(pDecl); in lookupByName()
190 pDecl = pScope->lookupByNameLocal(scopedName.getToken(nOffset, ':', i )); in lookupByName()
193 if( !pDecl ) in lookupByName()
197 if ( !pDecl ) in lookupByName()
200 pDecl = scopeAsDecl(this); in lookupByName()
201 if ( pDecl && (pDecl->getLocalName() != "") ) in lookupByName()
203 pScope = pDecl->getScope(); in lookupByName()
205 pDecl = pScope->lookupByName(scopedName); in lookupByName()
208 pDecl = NULL; in lookupByName()
214 return pDecl; in lookupByName()
221 AstDeclaration* pDecl = NULL; in lookupByNameLocal() local
225 pDecl = *iter; in lookupByNameLocal()
226 if ( pDecl->getLocalName() == name ) in lookupByNameLocal()
227 return pDecl; in lookupByNameLocal()
254 AstDeclaration* pDecl = resolved->lookupByNameLocal(scopedName); in lookupInInherited() local
255 if ( pDecl ) in lookupInInherited()
256 return pDecl; in lookupInInherited()
257 pDecl = resolved->lookupInInherited(scopedName); in lookupInInherited()
258 if ( pDecl ) in lookupInInherited()
259 return pDecl; in lookupInInherited()
268 AstDeclaration* pDecl = NULL; in lookupPrimitiveType() local
272 pDecl = scopeAsDecl(this); in lookupPrimitiveType()
273 if ( !pDecl ) in lookupPrimitiveType()
275 pScope = pDecl->getScope(); in lookupPrimitiveType()
331 pDecl = lookupByNameLocal(typeName); in lookupPrimitiveType()
333 if ( pDecl && (pDecl->getNodeType() == NT_predefined) ) in lookupPrimitiveType()
335 pBaseType = (AstBaseType*)pDecl; in lookupPrimitiveType()
338 return pDecl; in lookupPrimitiveType()
344 AstDeclaration* AstScope::lookupForAdd(AstDeclaration* pDecl) in lookupForAdd() argument
346 if ( !pDecl ) in lookupForAdd()
349 AstDeclaration* pRetDecl = lookupByNameLocal(pDecl->getLocalName()); in lookupForAdd()