forked from jasder/antlr
Fix the layout of some generated Go code
And some related fixes. - Combined multiple blank lines between package decls into one - Moved some doc comments to just above what they document - Changed some doc comments to start with the documented thing's name - Removed some redundant anchor and wrap ST options - Changed an empty struct type containing just a newline to struct{} - Added some missing doc comments to exported interface methods - Removed unneeded parentheses around a single import - Prevents generating empty const blocks - Generates single-line package const decls if only one decl - Indented switch case bodies - Content checks for some template vars, e.g. if v defined then v else nothing - Removed template redundancies, e.g. from <attrs:{a | <a>}> to <attrs>. - Removed blank lines that group embedded types and fields separately - Changed some trivial one-line func/method decls to mult-line - Changed empty package slice decls to use nil, e.g. var foo []uint16 - Changed const int enums that used the ST <i> var to use iota instead - Replaced separator in GoTarget.encodeIntAsCharEscape with a template separator
This commit is contained in:
parent
ce5fb52989
commit
c3d6c20ee4
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.antlr.v4.codegen.target;
|
||||
|
||||
import org.antlr.v4.codegen.CodeGenerator;
|
||||
|
@ -66,7 +65,7 @@ public class GoTarget extends Target {
|
|||
|
||||
@Override
|
||||
public String encodeIntAsCharEscape(int v) {
|
||||
return Integer.toString(v) + ",";
|
||||
return Integer.toString(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue