forked from jasder/antlr
removed lower case formatting on types. Case has meaning in Go, needs preserving.
This commit is contained in:
parent
810000c23e
commit
7cbef5617c
|
@ -898,7 +898,7 @@ TokenListDecl(t) ::= "<t.name> []antlr.Token"
|
|||
RuleContextDecl(r) ::= "<r.name> I<r.ctxName> "
|
||||
RuleContextListDecl(rdecl) ::= "<rdecl.name> []I<rdecl.ctxName>"
|
||||
|
||||
AttributeDecl(d) ::= "<d.name> <d.type;format={lower}><if(d.initValue)>// TODO = <d.initValue><endif>"
|
||||
AttributeDecl(d) ::= "<d.name> <d.type><if(d.initValue)>// TODO = <d.initValue><endif>"
|
||||
|
||||
ContextTokenGetterDecl(t) ::= <<
|
||||
<t.name; format="cap">() antlr.TerminalNode {
|
||||
|
@ -1042,13 +1042,13 @@ Set<a.name; format="cap">([]I<a.ctxName>) }; separator="\n\n">
|
|||
<if(struct.attributeDecls)>
|
||||
|
||||
<struct.attributeDecls:{a | // Get<a.name; format="cap"> returns the <a.name> attribute.
|
||||
Get<a.name; format="cap">() <a.type;format="lower">}; separator="\n\n">
|
||||
Get<a.name; format="cap">() <a.type>}; separator="\n\n">
|
||||
<endif>
|
||||
|
||||
<if(struct.attributeDecls)>
|
||||
|
||||
<struct.attributeDecls:{a | // Set<a.name; format="cap"> sets the <a.name> attribute.
|
||||
Set<a.name; format="cap">(<a.type;format="lower">)}; separator="\n\n">
|
||||
Set<a.name; format="cap">(<a.type>)}; separator="\n\n">
|
||||
<endif>
|
||||
|
||||
|
||||
|
@ -1073,7 +1073,7 @@ func NewEmpty<struct.name>() *<struct.name> {
|
|||
|
||||
func (*<struct.name>) Is<struct.name>() {}
|
||||
|
||||
func New<struct.name>(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int<struct.ctorAttrs:{a | , <a.name> <a.type;format="lower">}>) *<struct.name> {
|
||||
func New<struct.name>(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int<struct.ctorAttrs:{a | , <a.name> <a.type>}>) *<struct.name> {
|
||||
var p = new(<struct.name>)
|
||||
|
||||
p.<if(contextSuperClass)><contextSuperClass><else>BaseParserRuleContext<endif> = <if(contextSuperClass)>New<contextSuperClass><else>antlr.NewBaseParserRuleContext<endif>(parent, invokingState)
|
||||
|
@ -1141,12 +1141,12 @@ func (s *<struct.name>) GetParser() antlr.Parser { return s.parser }
|
|||
|
||||
<if(struct.attributeDecls)>
|
||||
|
||||
<struct.attributeDecls:{a | func (s *<struct.name>) Get<a.name; format="cap">() <a.type;format="lower"> { return s.<a.name> \}}; separator="\n\n">
|
||||
<struct.attributeDecls:{a | func (s *<struct.name>) Get<a.name; format="cap">() <a.type> { return s.<a.name> \}}; separator="\n\n">
|
||||
<endif>
|
||||
|
||||
<if(struct.attributeDecls)>
|
||||
|
||||
<struct.attributeDecls:{a | func (s *<struct.name>) Set<a.name; format="cap">(v <a.type;format="lower">) { s.<a.name> = v \}}; separator="\n\n">
|
||||
<struct.attributeDecls:{a | func (s *<struct.name>) Set<a.name; format="cap">(v <a.type>) { s.<a.name> = v \}}; separator="\n\n">
|
||||
<endif>
|
||||
|
||||
<if(getters)>
|
||||
|
@ -1251,12 +1251,12 @@ func New<struct.name>(parser antlr.Parser, ctx antlr.ParserRuleContext) *<struct
|
|||
|
||||
<if(struct.attributeDecls)>
|
||||
|
||||
<struct.attributeDecls:{a | func (s *<struct.name>) Get<a.name; format="cap">() <a.type;format="lower"> { return s.<a.name> \}}; separator="\n\n">
|
||||
<struct.attributeDecls:{a | func (s *<struct.name>) Get<a.name; format="cap">() <a.type> { return s.<a.name> \}}; separator="\n\n">
|
||||
<endif>
|
||||
|
||||
<if(struct.attributeDecls)>
|
||||
|
||||
<struct.attributeDecls:{a | func (s *<struct.name>) Set<a.name; format="cap">(v <a.type;format="lower">) { s.<a.name> = v \}}; separator="\n\n">
|
||||
<struct.attributeDecls:{a | func (s *<struct.name>) Set<a.name; format="cap">(v <a.type>) { s.<a.name> = v \}}; separator="\n\n">
|
||||
<endif>
|
||||
|
||||
func (s *<struct.name>) GetRuleContext() antlr.RuleContext {
|
||||
|
|
Loading…
Reference in New Issue