File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -439,10 +439,25 @@ public void declaration_type_spec(Token udtKeyword, int type) {
439439 }
440440
441441 public void attr_spec (Token attrKeyword , int attr ) {
442+ Element preceeding = null ;
442443 String nestIn = "" ;
443444 switch (attr ) {
444445 case IActionEnums .AttrSpec_access :
445- // private
446+ preceeding = contextNode (-1 );
447+ int accessType = Integer .parseInt (getAttribute ("type" , preceeding ).getValue ());
448+ switch (accessType ) {
449+ case IActionEnums .AttrSpec_PUBLIC :
450+ nestIn = "public" ;
451+ break ;
452+ case IActionEnums .AttrSpec_PROTECTED :
453+ nestIn = "protected" ;
454+ break ;
455+ case IActionEnums .AttrSpec_PRIVATE :
456+ nestIn = "private" ;
457+ break ;
458+ default :
459+ throw new IllegalArgumentException (Integer .toString (attr ) + " - " + attrKeyword + ", type=" + Integer .toString (accessType ));
460+ }
446461 break ;
447462 case IActionEnums .AttrSpec_language_binding :
448463 // bind
@@ -497,6 +512,8 @@ public void attr_spec(Token attrKeyword, int attr) {
497512 }
498513 if (nestIn .length () > 0 )
499514 contextOpen ("attribute-" + nestIn );
515+ if (preceeding != null )
516+ moveHere (preceeding );
500517 super .attr_spec (attrKeyword , attr );
501518 if (nestIn .length () > 0 )
502519 contextClose ();
You can’t perform that action at this time.
0 commit comments