diff options
author | gokhale <gokhale@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-07 18:59:50 +0000 |
---|---|---|
committer | gokhale <gokhale@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-07 18:59:50 +0000 |
commit | c0eb4c83293b94bef916bd8192fa066aaa5e67c1 (patch) | |
tree | 3cd183d49f4ce39919bf9b5db9f8bbbc2693dc15 /TAO/TAO_IDL/ast/ast_interface.cpp | |
parent | 4403031effd291361b591fb13052e782bbc4fd3f (diff) | |
download | ATCD-c0eb4c83293b94bef916bd8192fa066aaa5e67c1.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/TAO_IDL/ast/ast_interface.cpp')
-rw-r--r-- | TAO/TAO_IDL/ast/ast_interface.cpp | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/TAO/TAO_IDL/ast/ast_interface.cpp b/TAO/TAO_IDL/ast/ast_interface.cpp index 569173d7069..e0d1ecbc3de 100644 --- a/TAO/TAO_IDL/ast/ast_interface.cpp +++ b/TAO/TAO_IDL/ast/ast_interface.cpp @@ -51,8 +51,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -500,6 +500,49 @@ AST_Typedef *AST_Interface::fe_add_typedef(AST_Typedef *t) } /* + * Add an AST_Native (a native declaration) to this scope + */ +AST_Native *AST_Interface::fe_add_native (AST_Native *t) +{ + AST_Decl *d; + + /* + * Can't add to interface which was not yet defined + */ + if (!is_defined()) { + idl_global->err()->error2(UTL_Error::EIDL_DECL_NOT_DEFINED, this, t); + return NULL; + } + /* + * Already defined and cannot be redefined? Or already used? + */ + if ((d = lookup_for_add(t, I_FALSE)) != NULL) { + if (!can_be_redefined(d)) { + idl_global->err()->error3(UTL_Error::EIDL_REDEF, t, this, d); + return NULL; + } + if (referenced(d)) { + idl_global->err()->error3(UTL_Error::EIDL_DEF_USE, t, this, d); + return NULL; + } + if (t->has_ancestor(d)) { + idl_global->err()->redefinition_in_scope(t, d); + return NULL; + } + } + /* + * Add it to scope + */ + add_to_scope(t); + /* + * Add it to set of locally referenced symbols + */ + add_to_referenced(t, I_FALSE); + + return t; +} + +/* * Dump this AST_Interface node to the ostream o */ void |