From: Jackson Harper Date: Sun, 9 Mar 2003 18:05:37 +0000 (-0000) Subject: * ILParser.jay: Add implemented interfaces X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=8c465f32cfb32a93c083d9934f383f15725b62b6;p=mono.git * ILParser.jay: Add implemented interfaces svn path=/trunk/mcs/; revision=12381 --- diff --git a/mcs/ilasm/parser/ChangeLog b/mcs/ilasm/parser/ChangeLog index ac70fcf07d2..7129723cb1e 100644 --- a/mcs/ilasm/parser/ChangeLog +++ b/mcs/ilasm/parser/ChangeLog @@ -1,3 +1,7 @@ +2003-03-09 Jackson Harper + + * ILParser.jay: Add implemented interfaces + 2003-03-08 Jackson Harper * ILParser.jay: Create method attributes diff --git a/mcs/ilasm/parser/ILParser.jay b/mcs/ilasm/parser/ILParser.jay index 45eec646d8b..104dd39a3e3 100644 --- a/mcs/ilasm/parser/ILParser.jay +++ b/mcs/ilasm/parser/ILParser.jay @@ -449,7 +449,12 @@ classHead : D_CLASS type_attr id extendsClause implClause } else { codegen.AddClass ((TypeAttr)$2, (string) $3, null); } - // TODO: extends/implements + + ArrayList impl_list = (ArrayList) $5; + if (impl_list != null) { + foreach (Class klass in impl_list) + codegen.CurrentClass.AddImplementedInterface (klass); + } } ; @@ -510,11 +515,20 @@ extendsClause : /* EMPTY */ ; implClause : /* EMPTY */ - | K_IMPLEMENTS classNames + | K_IMPLEMENTS classNames {$$ = $2; } ; -classNames : classNames COMMA className - | className +classNames : classNames COMMA type_ref + { + ArrayList class_list = (ArrayList) $1; + class_list.Add ($3); + } + | type_ref + { + ArrayList class_list = new ArrayList (); + class_list.Add ($1); + $$ = class_list; + } ; classDecls : /* EMPTY */