pn.addChild(pl);
RESULT = pn;
:}
+ /* generic/template return value with one type, e.g. set<int> */
+ | PUBLIC IDENT:clsmeth LANG TYPE:typegen RANG IDENT:idmeth LPAR paramlist:pl RPAR SEMICOLON
+ {:
+ ParseNode pn = new ParseNode("method");
+ pn.addChild("method_class").setLiteral((String)clsmeth + "<" + typegen + ">");
+ pn.addChild("method_ident").setLiteral(idmeth);
+ pn.addChild(pl);
+ RESULT = pn;
+ :}
+ | PUBLIC IDENT:clsmeth LANG IDENT:clsgen RANG IDENT:idmeth LPAR paramlist:pl RPAR SEMICOLON
+ {:
+ ParseNode pn = new ParseNode("method");
+ pn.addChild("method_class").setLiteral((String)clsmeth + "<" + clsgen + ">");
+ pn.addChild("method_ident").setLiteral(idmeth);
+ pn.addChild(pl);
+ RESULT = pn;
+ :}
;
paramlist ::= paramlist:pl param:p
{:
pn.addChild("param_ident").setLiteral(idprm);
RESULT = pn;
:}
- /* generic/template with one type, e.g. list<int> */
+ /* generic/template with one type, e.g. set<int> */
| IDENT:clsprm LANG TYPE:typegen RANG IDENT:idprm
{:
ParseNode pn = new ParseNode("param");
RESULT = pn;
:}
/* Add comma at the end... */
- /* generic/template with one type, e.g. list<int> */
+ /* generic/template with one type, e.g. set<int> */
| IDENT:clsprm LANG TYPE:typegen RANG IDENT:idprm COMMA
{:
ParseNode pn = new ParseNode("param");