Add support to Golang codegen for booleans by mdehoog · Pull Request #4231 · antlr/antlr4
Currently Golang codegen passes through boolean types without type conversion. This generates invalid Golang, as boolean is not Golang keyword.
This PR copies Swift's implementation of a type map:
| SwiftTypeMap ::= [ | |
| "int":"Int", | |
| "float":"Float", | |
| "long":"Int64", | |
| "double":"Double", | |
| "bool":"Bool", | |
| "boolean":"Bool", | |
| default : key | |
| ] |
mdehoog
marked this pull request as ready for review
Where is that input coming from? Something in your grammar itself? Can you give me an example? I am not saying this isn't a good idea, but I have forgotten where the type map comes in to it to be honest?
Also, is there a reason for you to do force pushes? Just forgot the -s on the commit?
mdehoog
deleted the
michael/go-boolean
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters