File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
tool/resources/org/antlr/v4/tool/templates/codegen/Go Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ GoTypeMap ::= [
2+ "boolean":"bool",
3+ default : key
4+ ]
5+
16fileHeader(grammarFileName, ANTLRVersion) ::= <<
27// Code generated from <grammarFileName> by ANTLR <ANTLRVersion>. DO NOT EDIT.
38>>
@@ -931,14 +936,14 @@ SetNonLocalAttr(s, rhsChunks) ::= "p.GetInvokingContext(<s.ruleIndex>).(*<s.rule
931936
932937AddToLabelList(a) ::= "<ctx(a.label)>.<a.listName> = append(<ctx(a.label)>.<a.listName>, <labelref(a.label)>)"
933938
934- TokenDecl(t) ::= "<t.escapedName> <TokenLabelType()>"
939+ TokenDecl(t) ::= "<t.escapedName> <GoTypeMap.( TokenLabelType() )>"
935940TokenTypeDecl(t) ::= "<t.escapedName> int"
936941TokenListDecl(t) ::= "<t.escapedName> []antlr.Token"
937942
938943RuleContextDecl(r) ::= "<r.escapedName> I<r.ctxName> "
939944RuleContextListDecl(rdecl) ::= "<rdecl.escapedName> []I<rdecl.ctxName>"
940945
941- AttributeDecl(d) ::= "<d.escapedName> <d.type><if(d.initValue)>// TODO = <d.initValue><endif>"
946+ AttributeDecl(d) ::= "<d.escapedName> <GoTypeMap.( d.type) ><if(d.initValue)>// TODO = <d.initValue><endif>"
942947
943948ContextTokenGetterDecl(t) ::= <<
944949<t.escapedName; format="cap">() antlr.TerminalNode<if(!t.signature)> {
You can’t perform that action at this time.
0 commit comments