瀏覽代碼

style: format code (#1322)

Kevin Wan 3 年之前
父節點
當前提交
490ef13822

+ 0 - 1
tools/goctl/api/parser/g4/gen/api/apiparser_base_visitor.go

@@ -1,4 +1,3 @@
-
 package api // ApiParser
 import "github.com/zeromicro/antlr"
 

+ 169 - 169
tools/goctl/api/parser/g4/gen/api/apiparser_lexer.go

@@ -1,145 +1,148 @@
 package api
+
 import (
 	"fmt"
 	"unicode"
 
 	"github.com/zeromicro/antlr"
 )
-// Suppress unused import error
-var _ = fmt.Printf
-var _ = unicode.IsLetter
 
+// Suppress unused import error
+var (
+	_ = fmt.Printf
+	_ = unicode.IsLetter
+)
 
 var serializedLexerAtn = []uint16{
-	3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 26, 276, 
-	8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 
-	9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 
-	4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 
-	18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 
-	9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 
-	28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 3, 2, 3, 2, 
-	3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 
-	3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 
-	3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 
-	13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 
-	3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 
-	17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 
-	3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 6, 19, 142, 10, 
-	19, 13, 19, 14, 19, 143, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 
-	152, 10, 20, 12, 20, 14, 20, 155, 11, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 
-	20, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 166, 10, 21, 12, 21, 14, 21, 169, 
-	11, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 7, 22, 176, 10, 22, 12, 22, 
-	14, 22, 179, 11, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 6, 23, 186, 10, 
-	23, 13, 23, 14, 23, 187, 3, 23, 3, 23, 3, 24, 3, 24, 7, 24, 194, 10, 24, 
-	12, 24, 14, 24, 197, 11, 24, 3, 24, 3, 24, 7, 24, 201, 10, 24, 12, 24, 
-	14, 24, 204, 11, 24, 5, 24, 206, 10, 24, 3, 25, 3, 25, 7, 25, 210, 10, 
-	25, 12, 25, 14, 25, 213, 11, 25, 3, 26, 3, 26, 5, 26, 217, 10, 26, 3, 26, 
-	3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 225, 10, 27, 3, 27, 5, 27, 228, 
-	10, 27, 3, 27, 3, 27, 3, 27, 6, 27, 233, 10, 27, 13, 27, 14, 27, 234, 3, 
-	27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 242, 10, 27, 3, 28, 3, 28, 3, 28, 
-	7, 28, 247, 10, 28, 12, 28, 14, 28, 250, 11, 28, 3, 28, 5, 28, 253, 10, 
-	28, 3, 29, 3, 29, 3, 30, 3, 30, 7, 30, 259, 10, 30, 12, 30, 14, 30, 262, 
-	11, 30, 3, 30, 5, 30, 265, 10, 30, 3, 31, 3, 31, 5, 31, 269, 10, 31, 3, 
-	32, 3, 32, 3, 32, 3, 32, 5, 32, 275, 10, 32, 3, 153, 2, 33, 3, 3, 5, 4, 
-	7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 
-	27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 
-	45, 24, 47, 25, 49, 26, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 63, 2, 
-	3, 2, 20, 5, 2, 11, 12, 14, 15, 34, 34, 4, 2, 12, 12, 15, 15, 4, 2, 36, 
-	36, 94, 94, 6, 2, 12, 12, 15, 15, 94, 94, 98, 98, 4, 2, 11, 11, 34, 34, 
-	6, 2, 12, 12, 15, 15, 36, 36, 98, 98, 4, 2, 71, 71, 103, 103, 4, 2, 45, 
-	45, 47, 47, 10, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112, 
-	116, 116, 118, 118, 3, 2, 50, 53, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, 99, 
-	104, 3, 2, 50, 59, 4, 2, 50, 59, 97, 97, 6, 2, 38, 38, 67, 92, 97, 97, 
-	99, 124, 4, 2, 2, 129, 55298, 56321, 3, 2, 55298, 56321, 3, 2, 56322, 57345, 
-	2, 293, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 
-	2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 
-	3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 
-	25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 
-	2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 
-	2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 
-	2, 2, 2, 49, 3, 2, 2, 2, 3, 65, 3, 2, 2, 2, 5, 67, 3, 2, 2, 2, 7, 69, 3, 
-	2, 2, 2, 9, 71, 3, 2, 2, 2, 11, 73, 3, 2, 2, 2, 13, 75, 3, 2, 2, 2, 15, 
-	77, 3, 2, 2, 2, 17, 87, 3, 2, 2, 2, 19, 89, 3, 2, 2, 2, 21, 91, 3, 2, 2, 
-	2, 23, 99, 3, 2, 2, 2, 25, 101, 3, 2, 2, 2, 27, 103, 3, 2, 2, 2, 29, 106, 
-	3, 2, 2, 2, 31, 111, 3, 2, 2, 2, 33, 120, 3, 2, 2, 2, 35, 132, 3, 2, 2, 
-	2, 37, 141, 3, 2, 2, 2, 39, 147, 3, 2, 2, 2, 41, 161, 3, 2, 2, 2, 43, 172, 
-	3, 2, 2, 2, 45, 182, 3, 2, 2, 2, 47, 191, 3, 2, 2, 2, 49, 207, 3, 2, 2, 
-	2, 51, 214, 3, 2, 2, 2, 53, 241, 3, 2, 2, 2, 55, 243, 3, 2, 2, 2, 57, 254, 
-	3, 2, 2, 2, 59, 256, 3, 2, 2, 2, 61, 268, 3, 2, 2, 2, 63, 274, 3, 2, 2, 
-	2, 65, 66, 7, 63, 2, 2, 66, 4, 3, 2, 2, 2, 67, 68, 7, 42, 2, 2, 68, 6, 
-	3, 2, 2, 2, 69, 70, 7, 43, 2, 2, 70, 8, 3, 2, 2, 2, 71, 72, 7, 125, 2, 
-	2, 72, 10, 3, 2, 2, 2, 73, 74, 7, 127, 2, 2, 74, 12, 3, 2, 2, 2, 75, 76, 
-	7, 44, 2, 2, 76, 14, 3, 2, 2, 2, 77, 78, 7, 118, 2, 2, 78, 79, 7, 107, 
-	2, 2, 79, 80, 7, 111, 2, 2, 80, 81, 7, 103, 2, 2, 81, 82, 7, 48, 2, 2, 
-	82, 83, 7, 86, 2, 2, 83, 84, 7, 107, 2, 2, 84, 85, 7, 111, 2, 2, 85, 86, 
-	7, 103, 2, 2, 86, 16, 3, 2, 2, 2, 87, 88, 7, 93, 2, 2, 88, 18, 3, 2, 2, 
-	2, 89, 90, 7, 95, 2, 2, 90, 20, 3, 2, 2, 2, 91, 92, 7, 116, 2, 2, 92, 93, 
-	7, 103, 2, 2, 93, 94, 7, 118, 2, 2, 94, 95, 7, 119, 2, 2, 95, 96, 7, 116, 
-	2, 2, 96, 97, 7, 112, 2, 2, 97, 98, 7, 117, 2, 2, 98, 22, 3, 2, 2, 2, 99, 
-	100, 7, 47, 2, 2, 100, 24, 3, 2, 2, 2, 101, 102, 7, 49, 2, 2, 102, 26, 
-	3, 2, 2, 2, 103, 104, 7, 49, 2, 2, 104, 105, 7, 60, 2, 2, 105, 28, 3, 2, 
-	2, 2, 106, 107, 7, 66, 2, 2, 107, 108, 7, 102, 2, 2, 108, 109, 7, 113, 
-	2, 2, 109, 110, 7, 101, 2, 2, 110, 30, 3, 2, 2, 2, 111, 112, 7, 66, 2, 
-	2, 112, 113, 7, 106, 2, 2, 113, 114, 7, 99, 2, 2, 114, 115, 7, 112, 2, 
-	2, 115, 116, 7, 102, 2, 2, 116, 117, 7, 110, 2, 2, 117, 118, 7, 103, 2, 
-	2, 118, 119, 7, 116, 2, 2, 119, 32, 3, 2, 2, 2, 120, 121, 7, 107, 2, 2, 
-	121, 122, 7, 112, 2, 2, 122, 123, 7, 118, 2, 2, 123, 124, 7, 103, 2, 2, 
-	124, 125, 7, 116, 2, 2, 125, 126, 7, 104, 2, 2, 126, 127, 7, 99, 2, 2, 
-	127, 128, 7, 101, 2, 2, 128, 129, 7, 103, 2, 2, 129, 130, 7, 125, 2, 2, 
-	130, 131, 7, 127, 2, 2, 131, 34, 3, 2, 2, 2, 132, 133, 7, 66, 2, 2, 133, 
-	134, 7, 117, 2, 2, 134, 135, 7, 103, 2, 2, 135, 136, 7, 116, 2, 2, 136, 
-	137, 7, 120, 2, 2, 137, 138, 7, 103, 2, 2, 138, 139, 7, 116, 2, 2, 139, 
-	36, 3, 2, 2, 2, 140, 142, 9, 2, 2, 2, 141, 140, 3, 2, 2, 2, 142, 143, 3, 
-	2, 2, 2, 143, 141, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 3, 2, 2, 
-	2, 145, 146, 8, 19, 2, 2, 146, 38, 3, 2, 2, 2, 147, 148, 7, 49, 2, 2, 148, 
-	149, 7, 44, 2, 2, 149, 153, 3, 2, 2, 2, 150, 152, 11, 2, 2, 2, 151, 150, 
-	3, 2, 2, 2, 152, 155, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, 153, 151, 3, 2, 
-	2, 2, 154, 156, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 156, 157, 7, 44, 2, 2, 
-	157, 158, 7, 49, 2, 2, 158, 159, 3, 2, 2, 2, 159, 160, 8, 20, 3, 2, 160, 
-	40, 3, 2, 2, 2, 161, 162, 7, 49, 2, 2, 162, 163, 7, 49, 2, 2, 163, 167, 
-	3, 2, 2, 2, 164, 166, 10, 3, 2, 2, 165, 164, 3, 2, 2, 2, 166, 169, 3, 2, 
-	2, 2, 167, 165, 3, 2, 2, 2, 167, 168, 3, 2, 2, 2, 168, 170, 3, 2, 2, 2, 
-	169, 167, 3, 2, 2, 2, 170, 171, 8, 21, 3, 2, 171, 42, 3, 2, 2, 2, 172, 
-	177, 7, 36, 2, 2, 173, 176, 10, 4, 2, 2, 174, 176, 5, 53, 27, 2, 175, 173, 
-	3, 2, 2, 2, 175, 174, 3, 2, 2, 2, 176, 179, 3, 2, 2, 2, 177, 175, 3, 2, 
-	2, 2, 177, 178, 3, 2, 2, 2, 178, 180, 3, 2, 2, 2, 179, 177, 3, 2, 2, 2, 
-	180, 181, 7, 36, 2, 2, 181, 44, 3, 2, 2, 2, 182, 185, 7, 98, 2, 2, 183, 
-	186, 10, 5, 2, 2, 184, 186, 5, 53, 27, 2, 185, 183, 3, 2, 2, 2, 185, 184, 
-	3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 185, 3, 2, 2, 2, 187, 188, 3, 2, 
-	2, 2, 188, 189, 3, 2, 2, 2, 189, 190, 7, 98, 2, 2, 190, 46, 3, 2, 2, 2, 
-	191, 195, 7, 60, 2, 2, 192, 194, 9, 6, 2, 2, 193, 192, 3, 2, 2, 2, 194, 
-	197, 3, 2, 2, 2, 195, 193, 3, 2, 2, 2, 195, 196, 3, 2, 2, 2, 196, 205, 
-	3, 2, 2, 2, 197, 195, 3, 2, 2, 2, 198, 206, 5, 43, 22, 2, 199, 201, 10, 
-	7, 2, 2, 200, 199, 3, 2, 2, 2, 201, 204, 3, 2, 2, 2, 202, 200, 3, 2, 2, 
-	2, 202, 203, 3, 2, 2, 2, 203, 206, 3, 2, 2, 2, 204, 202, 3, 2, 2, 2, 205, 
-	198, 3, 2, 2, 2, 205, 202, 3, 2, 2, 2, 206, 48, 3, 2, 2, 2, 207, 211, 5, 
-	63, 32, 2, 208, 210, 5, 61, 31, 2, 209, 208, 3, 2, 2, 2, 210, 213, 3, 2, 
-	2, 2, 211, 209, 3, 2, 2, 2, 211, 212, 3, 2, 2, 2, 212, 50, 3, 2, 2, 2, 
-	213, 211, 3, 2, 2, 2, 214, 216, 9, 8, 2, 2, 215, 217, 9, 9, 2, 2, 216, 
-	215, 3, 2, 2, 2, 216, 217, 3, 2, 2, 2, 217, 218, 3, 2, 2, 2, 218, 219, 
-	5, 59, 30, 2, 219, 52, 3, 2, 2, 2, 220, 221, 7, 94, 2, 2, 221, 242, 9, 
-	10, 2, 2, 222, 227, 7, 94, 2, 2, 223, 225, 9, 11, 2, 2, 224, 223, 3, 2, 
-	2, 2, 224, 225, 3, 2, 2, 2, 225, 226, 3, 2, 2, 2, 226, 228, 9, 12, 2, 2, 
-	227, 224, 3, 2, 2, 2, 227, 228, 3, 2, 2, 2, 228, 229, 3, 2, 2, 2, 229, 
-	242, 9, 12, 2, 2, 230, 232, 7, 94, 2, 2, 231, 233, 7, 119, 2, 2, 232, 231, 
-	3, 2, 2, 2, 233, 234, 3, 2, 2, 2, 234, 232, 3, 2, 2, 2, 234, 235, 3, 2, 
-	2, 2, 235, 236, 3, 2, 2, 2, 236, 237, 5, 57, 29, 2, 237, 238, 5, 57, 29, 
-	2, 238, 239, 5, 57, 29, 2, 239, 240, 5, 57, 29, 2, 240, 242, 3, 2, 2, 2, 
-	241, 220, 3, 2, 2, 2, 241, 222, 3, 2, 2, 2, 241, 230, 3, 2, 2, 2, 242, 
-	54, 3, 2, 2, 2, 243, 252, 5, 57, 29, 2, 244, 247, 5, 57, 29, 2, 245, 247, 
-	7, 97, 2, 2, 246, 244, 3, 2, 2, 2, 246, 245, 3, 2, 2, 2, 247, 250, 3, 2, 
-	2, 2, 248, 246, 3, 2, 2, 2, 248, 249, 3, 2, 2, 2, 249, 251, 3, 2, 2, 2, 
-	250, 248, 3, 2, 2, 2, 251, 253, 5, 57, 29, 2, 252, 248, 3, 2, 2, 2, 252, 
-	253, 3, 2, 2, 2, 253, 56, 3, 2, 2, 2, 254, 255, 9, 13, 2, 2, 255, 58, 3, 
-	2, 2, 2, 256, 264, 9, 14, 2, 2, 257, 259, 9, 15, 2, 2, 258, 257, 3, 2, 
-	2, 2, 259, 262, 3, 2, 2, 2, 260, 258, 3, 2, 2, 2, 260, 261, 3, 2, 2, 2, 
-	261, 263, 3, 2, 2, 2, 262, 260, 3, 2, 2, 2, 263, 265, 9, 14, 2, 2, 264, 
-	260, 3, 2, 2, 2, 264, 265, 3, 2, 2, 2, 265, 60, 3, 2, 2, 2, 266, 269, 5, 
-	63, 32, 2, 267, 269, 9, 14, 2, 2, 268, 266, 3, 2, 2, 2, 268, 267, 3, 2, 
-	2, 2, 269, 62, 3, 2, 2, 2, 270, 275, 9, 16, 2, 2, 271, 275, 10, 17, 2, 
-	2, 272, 273, 9, 18, 2, 2, 273, 275, 9, 19, 2, 2, 274, 270, 3, 2, 2, 2, 
-	274, 271, 3, 2, 2, 2, 274, 272, 3, 2, 2, 2, 275, 64, 3, 2, 2, 2, 26, 2, 
-	143, 153, 167, 175, 177, 185, 187, 195, 202, 205, 211, 216, 224, 227, 234, 
+	3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 26, 276,
+	8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7,
+	9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12,
+	4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4,
+	18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23,
+	9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9,
+	28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 3, 2, 3, 2,
+	3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8,
+	3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10,
+	3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3,
+	13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16,
+	3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3,
+	17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18,
+	3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 6, 19, 142, 10,
+	19, 13, 19, 14, 19, 143, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20,
+	152, 10, 20, 12, 20, 14, 20, 155, 11, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3,
+	20, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 166, 10, 21, 12, 21, 14, 21, 169,
+	11, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 7, 22, 176, 10, 22, 12, 22,
+	14, 22, 179, 11, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 6, 23, 186, 10,
+	23, 13, 23, 14, 23, 187, 3, 23, 3, 23, 3, 24, 3, 24, 7, 24, 194, 10, 24,
+	12, 24, 14, 24, 197, 11, 24, 3, 24, 3, 24, 7, 24, 201, 10, 24, 12, 24,
+	14, 24, 204, 11, 24, 5, 24, 206, 10, 24, 3, 25, 3, 25, 7, 25, 210, 10,
+	25, 12, 25, 14, 25, 213, 11, 25, 3, 26, 3, 26, 5, 26, 217, 10, 26, 3, 26,
+	3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 225, 10, 27, 3, 27, 5, 27, 228,
+	10, 27, 3, 27, 3, 27, 3, 27, 6, 27, 233, 10, 27, 13, 27, 14, 27, 234, 3,
+	27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 242, 10, 27, 3, 28, 3, 28, 3, 28,
+	7, 28, 247, 10, 28, 12, 28, 14, 28, 250, 11, 28, 3, 28, 5, 28, 253, 10,
+	28, 3, 29, 3, 29, 3, 30, 3, 30, 7, 30, 259, 10, 30, 12, 30, 14, 30, 262,
+	11, 30, 3, 30, 5, 30, 265, 10, 30, 3, 31, 3, 31, 5, 31, 269, 10, 31, 3,
+	32, 3, 32, 3, 32, 3, 32, 5, 32, 275, 10, 32, 3, 153, 2, 33, 3, 3, 5, 4,
+	7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14,
+	27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23,
+	45, 24, 47, 25, 49, 26, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 63, 2,
+	3, 2, 20, 5, 2, 11, 12, 14, 15, 34, 34, 4, 2, 12, 12, 15, 15, 4, 2, 36,
+	36, 94, 94, 6, 2, 12, 12, 15, 15, 94, 94, 98, 98, 4, 2, 11, 11, 34, 34,
+	6, 2, 12, 12, 15, 15, 36, 36, 98, 98, 4, 2, 71, 71, 103, 103, 4, 2, 45,
+	45, 47, 47, 10, 2, 36, 36, 41, 41, 94, 94, 100, 100, 104, 104, 112, 112,
+	116, 116, 118, 118, 3, 2, 50, 53, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, 99,
+	104, 3, 2, 50, 59, 4, 2, 50, 59, 97, 97, 6, 2, 38, 38, 67, 92, 97, 97,
+	99, 124, 4, 2, 2, 129, 55298, 56321, 3, 2, 55298, 56321, 3, 2, 56322, 57345,
+	2, 293, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3,
+	2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17,
+	3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2,
+	25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2,
+	2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2,
+	2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2,
+	2, 2, 2, 49, 3, 2, 2, 2, 3, 65, 3, 2, 2, 2, 5, 67, 3, 2, 2, 2, 7, 69, 3,
+	2, 2, 2, 9, 71, 3, 2, 2, 2, 11, 73, 3, 2, 2, 2, 13, 75, 3, 2, 2, 2, 15,
+	77, 3, 2, 2, 2, 17, 87, 3, 2, 2, 2, 19, 89, 3, 2, 2, 2, 21, 91, 3, 2, 2,
+	2, 23, 99, 3, 2, 2, 2, 25, 101, 3, 2, 2, 2, 27, 103, 3, 2, 2, 2, 29, 106,
+	3, 2, 2, 2, 31, 111, 3, 2, 2, 2, 33, 120, 3, 2, 2, 2, 35, 132, 3, 2, 2,
+	2, 37, 141, 3, 2, 2, 2, 39, 147, 3, 2, 2, 2, 41, 161, 3, 2, 2, 2, 43, 172,
+	3, 2, 2, 2, 45, 182, 3, 2, 2, 2, 47, 191, 3, 2, 2, 2, 49, 207, 3, 2, 2,
+	2, 51, 214, 3, 2, 2, 2, 53, 241, 3, 2, 2, 2, 55, 243, 3, 2, 2, 2, 57, 254,
+	3, 2, 2, 2, 59, 256, 3, 2, 2, 2, 61, 268, 3, 2, 2, 2, 63, 274, 3, 2, 2,
+	2, 65, 66, 7, 63, 2, 2, 66, 4, 3, 2, 2, 2, 67, 68, 7, 42, 2, 2, 68, 6,
+	3, 2, 2, 2, 69, 70, 7, 43, 2, 2, 70, 8, 3, 2, 2, 2, 71, 72, 7, 125, 2,
+	2, 72, 10, 3, 2, 2, 2, 73, 74, 7, 127, 2, 2, 74, 12, 3, 2, 2, 2, 75, 76,
+	7, 44, 2, 2, 76, 14, 3, 2, 2, 2, 77, 78, 7, 118, 2, 2, 78, 79, 7, 107,
+	2, 2, 79, 80, 7, 111, 2, 2, 80, 81, 7, 103, 2, 2, 81, 82, 7, 48, 2, 2,
+	82, 83, 7, 86, 2, 2, 83, 84, 7, 107, 2, 2, 84, 85, 7, 111, 2, 2, 85, 86,
+	7, 103, 2, 2, 86, 16, 3, 2, 2, 2, 87, 88, 7, 93, 2, 2, 88, 18, 3, 2, 2,
+	2, 89, 90, 7, 95, 2, 2, 90, 20, 3, 2, 2, 2, 91, 92, 7, 116, 2, 2, 92, 93,
+	7, 103, 2, 2, 93, 94, 7, 118, 2, 2, 94, 95, 7, 119, 2, 2, 95, 96, 7, 116,
+	2, 2, 96, 97, 7, 112, 2, 2, 97, 98, 7, 117, 2, 2, 98, 22, 3, 2, 2, 2, 99,
+	100, 7, 47, 2, 2, 100, 24, 3, 2, 2, 2, 101, 102, 7, 49, 2, 2, 102, 26,
+	3, 2, 2, 2, 103, 104, 7, 49, 2, 2, 104, 105, 7, 60, 2, 2, 105, 28, 3, 2,
+	2, 2, 106, 107, 7, 66, 2, 2, 107, 108, 7, 102, 2, 2, 108, 109, 7, 113,
+	2, 2, 109, 110, 7, 101, 2, 2, 110, 30, 3, 2, 2, 2, 111, 112, 7, 66, 2,
+	2, 112, 113, 7, 106, 2, 2, 113, 114, 7, 99, 2, 2, 114, 115, 7, 112, 2,
+	2, 115, 116, 7, 102, 2, 2, 116, 117, 7, 110, 2, 2, 117, 118, 7, 103, 2,
+	2, 118, 119, 7, 116, 2, 2, 119, 32, 3, 2, 2, 2, 120, 121, 7, 107, 2, 2,
+	121, 122, 7, 112, 2, 2, 122, 123, 7, 118, 2, 2, 123, 124, 7, 103, 2, 2,
+	124, 125, 7, 116, 2, 2, 125, 126, 7, 104, 2, 2, 126, 127, 7, 99, 2, 2,
+	127, 128, 7, 101, 2, 2, 128, 129, 7, 103, 2, 2, 129, 130, 7, 125, 2, 2,
+	130, 131, 7, 127, 2, 2, 131, 34, 3, 2, 2, 2, 132, 133, 7, 66, 2, 2, 133,
+	134, 7, 117, 2, 2, 134, 135, 7, 103, 2, 2, 135, 136, 7, 116, 2, 2, 136,
+	137, 7, 120, 2, 2, 137, 138, 7, 103, 2, 2, 138, 139, 7, 116, 2, 2, 139,
+	36, 3, 2, 2, 2, 140, 142, 9, 2, 2, 2, 141, 140, 3, 2, 2, 2, 142, 143, 3,
+	2, 2, 2, 143, 141, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 3, 2, 2,
+	2, 145, 146, 8, 19, 2, 2, 146, 38, 3, 2, 2, 2, 147, 148, 7, 49, 2, 2, 148,
+	149, 7, 44, 2, 2, 149, 153, 3, 2, 2, 2, 150, 152, 11, 2, 2, 2, 151, 150,
+	3, 2, 2, 2, 152, 155, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, 153, 151, 3, 2,
+	2, 2, 154, 156, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 156, 157, 7, 44, 2, 2,
+	157, 158, 7, 49, 2, 2, 158, 159, 3, 2, 2, 2, 159, 160, 8, 20, 3, 2, 160,
+	40, 3, 2, 2, 2, 161, 162, 7, 49, 2, 2, 162, 163, 7, 49, 2, 2, 163, 167,
+	3, 2, 2, 2, 164, 166, 10, 3, 2, 2, 165, 164, 3, 2, 2, 2, 166, 169, 3, 2,
+	2, 2, 167, 165, 3, 2, 2, 2, 167, 168, 3, 2, 2, 2, 168, 170, 3, 2, 2, 2,
+	169, 167, 3, 2, 2, 2, 170, 171, 8, 21, 3, 2, 171, 42, 3, 2, 2, 2, 172,
+	177, 7, 36, 2, 2, 173, 176, 10, 4, 2, 2, 174, 176, 5, 53, 27, 2, 175, 173,
+	3, 2, 2, 2, 175, 174, 3, 2, 2, 2, 176, 179, 3, 2, 2, 2, 177, 175, 3, 2,
+	2, 2, 177, 178, 3, 2, 2, 2, 178, 180, 3, 2, 2, 2, 179, 177, 3, 2, 2, 2,
+	180, 181, 7, 36, 2, 2, 181, 44, 3, 2, 2, 2, 182, 185, 7, 98, 2, 2, 183,
+	186, 10, 5, 2, 2, 184, 186, 5, 53, 27, 2, 185, 183, 3, 2, 2, 2, 185, 184,
+	3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 185, 3, 2, 2, 2, 187, 188, 3, 2,
+	2, 2, 188, 189, 3, 2, 2, 2, 189, 190, 7, 98, 2, 2, 190, 46, 3, 2, 2, 2,
+	191, 195, 7, 60, 2, 2, 192, 194, 9, 6, 2, 2, 193, 192, 3, 2, 2, 2, 194,
+	197, 3, 2, 2, 2, 195, 193, 3, 2, 2, 2, 195, 196, 3, 2, 2, 2, 196, 205,
+	3, 2, 2, 2, 197, 195, 3, 2, 2, 2, 198, 206, 5, 43, 22, 2, 199, 201, 10,
+	7, 2, 2, 200, 199, 3, 2, 2, 2, 201, 204, 3, 2, 2, 2, 202, 200, 3, 2, 2,
+	2, 202, 203, 3, 2, 2, 2, 203, 206, 3, 2, 2, 2, 204, 202, 3, 2, 2, 2, 205,
+	198, 3, 2, 2, 2, 205, 202, 3, 2, 2, 2, 206, 48, 3, 2, 2, 2, 207, 211, 5,
+	63, 32, 2, 208, 210, 5, 61, 31, 2, 209, 208, 3, 2, 2, 2, 210, 213, 3, 2,
+	2, 2, 211, 209, 3, 2, 2, 2, 211, 212, 3, 2, 2, 2, 212, 50, 3, 2, 2, 2,
+	213, 211, 3, 2, 2, 2, 214, 216, 9, 8, 2, 2, 215, 217, 9, 9, 2, 2, 216,
+	215, 3, 2, 2, 2, 216, 217, 3, 2, 2, 2, 217, 218, 3, 2, 2, 2, 218, 219,
+	5, 59, 30, 2, 219, 52, 3, 2, 2, 2, 220, 221, 7, 94, 2, 2, 221, 242, 9,
+	10, 2, 2, 222, 227, 7, 94, 2, 2, 223, 225, 9, 11, 2, 2, 224, 223, 3, 2,
+	2, 2, 224, 225, 3, 2, 2, 2, 225, 226, 3, 2, 2, 2, 226, 228, 9, 12, 2, 2,
+	227, 224, 3, 2, 2, 2, 227, 228, 3, 2, 2, 2, 228, 229, 3, 2, 2, 2, 229,
+	242, 9, 12, 2, 2, 230, 232, 7, 94, 2, 2, 231, 233, 7, 119, 2, 2, 232, 231,
+	3, 2, 2, 2, 233, 234, 3, 2, 2, 2, 234, 232, 3, 2, 2, 2, 234, 235, 3, 2,
+	2, 2, 235, 236, 3, 2, 2, 2, 236, 237, 5, 57, 29, 2, 237, 238, 5, 57, 29,
+	2, 238, 239, 5, 57, 29, 2, 239, 240, 5, 57, 29, 2, 240, 242, 3, 2, 2, 2,
+	241, 220, 3, 2, 2, 2, 241, 222, 3, 2, 2, 2, 241, 230, 3, 2, 2, 2, 242,
+	54, 3, 2, 2, 2, 243, 252, 5, 57, 29, 2, 244, 247, 5, 57, 29, 2, 245, 247,
+	7, 97, 2, 2, 246, 244, 3, 2, 2, 2, 246, 245, 3, 2, 2, 2, 247, 250, 3, 2,
+	2, 2, 248, 246, 3, 2, 2, 2, 248, 249, 3, 2, 2, 2, 249, 251, 3, 2, 2, 2,
+	250, 248, 3, 2, 2, 2, 251, 253, 5, 57, 29, 2, 252, 248, 3, 2, 2, 2, 252,
+	253, 3, 2, 2, 2, 253, 56, 3, 2, 2, 2, 254, 255, 9, 13, 2, 2, 255, 58, 3,
+	2, 2, 2, 256, 264, 9, 14, 2, 2, 257, 259, 9, 15, 2, 2, 258, 257, 3, 2,
+	2, 2, 259, 262, 3, 2, 2, 2, 260, 258, 3, 2, 2, 2, 260, 261, 3, 2, 2, 2,
+	261, 263, 3, 2, 2, 2, 262, 260, 3, 2, 2, 2, 263, 265, 9, 14, 2, 2, 264,
+	260, 3, 2, 2, 2, 264, 265, 3, 2, 2, 2, 265, 60, 3, 2, 2, 2, 266, 269, 5,
+	63, 32, 2, 267, 269, 9, 14, 2, 2, 268, 266, 3, 2, 2, 2, 268, 267, 3, 2,
+	2, 2, 269, 62, 3, 2, 2, 2, 270, 275, 9, 16, 2, 2, 271, 275, 10, 17, 2,
+	2, 272, 273, 9, 18, 2, 2, 273, 275, 9, 19, 2, 2, 274, 270, 3, 2, 2, 2,
+	274, 271, 3, 2, 2, 2, 274, 272, 3, 2, 2, 2, 275, 64, 3, 2, 2, 2, 26, 2,
+	143, 153, 167, 175, 177, 185, 187, 195, 202, 205, 211, 216, 224, 227, 234,
 	241, 246, 248, 252, 260, 264, 268, 274, 4, 2, 3, 2, 2, 90, 2,
 }
 
@@ -152,28 +155,29 @@ var lexerModeNames = []string{
 }
 
 var lexerLiteralNames = []string{
-	"", "'='", "'('", "')'", "'{'", "'}'", "'*'", "'time.Time'", "'['", "']'", 
-	"'returns'", "'-'", "'/'", "'/:'", "'@doc'", "'@handler'", "'interface{}'", 
+	"", "'='", "'('", "')'", "'{'", "'}'", "'*'", "'time.Time'", "'['", "']'",
+	"'returns'", "'-'", "'/'", "'/:'", "'@doc'", "'@handler'", "'interface{}'",
 	"'@server'",
 }
 
 var lexerSymbolicNames = []string{
-	"", "", "", "", "", "", "", "", "", "", "", "", "", "", "ATDOC", "ATHANDLER", 
-	"INTERFACE", "ATSERVER", "WS", "COMMENT", "LINE_COMMENT", "STRING", "RAW_STRING", 
+	"", "", "", "", "", "", "", "", "", "", "", "", "", "", "ATDOC", "ATHANDLER",
+	"INTERFACE", "ATSERVER", "WS", "COMMENT", "LINE_COMMENT", "STRING", "RAW_STRING",
 	"LINE_VALUE", "ID",
 }
 
 var lexerRuleNames = []string{
-	"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", 
-	"T__9", "T__10", "T__11", "T__12", "ATDOC", "ATHANDLER", "INTERFACE", "ATSERVER", 
-	"WS", "COMMENT", "LINE_COMMENT", "STRING", "RAW_STRING", "LINE_VALUE", 
-	"ID", "ExponentPart", "EscapeSequence", "HexDigits", "HexDigit", "Digits", 
+	"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
+	"T__9", "T__10", "T__11", "T__12", "ATDOC", "ATHANDLER", "INTERFACE", "ATSERVER",
+	"WS", "COMMENT", "LINE_COMMENT", "STRING", "RAW_STRING", "LINE_VALUE",
+	"ID", "ExponentPart", "EscapeSequence", "HexDigits", "HexDigit", "Digits",
 	"LetterOrDigit", "Letter",
 }
+
 type ApiParserLexer struct {
 	*antlr.BaseLexer
 	channelNames []string
-	modeNames []string
+	modeNames    []string
 	// TODO: EOF string
 }
 
@@ -207,34 +211,30 @@ func NewApiParserLexer(input antlr.CharStream) *ApiParserLexer {
 
 // ApiParserLexer tokens.
 const (
-	ApiParserLexerT__0 = 1
-	ApiParserLexerT__1 = 2
-	ApiParserLexerT__2 = 3
-	ApiParserLexerT__3 = 4
-	ApiParserLexerT__4 = 5
-	ApiParserLexerT__5 = 6
-	ApiParserLexerT__6 = 7
-	ApiParserLexerT__7 = 8
-	ApiParserLexerT__8 = 9
-	ApiParserLexerT__9 = 10
-	ApiParserLexerT__10 = 11
-	ApiParserLexerT__11 = 12
-	ApiParserLexerT__12 = 13
-	ApiParserLexerATDOC = 14
-	ApiParserLexerATHANDLER = 15
-	ApiParserLexerINTERFACE = 16
-	ApiParserLexerATSERVER = 17
-	ApiParserLexerWS = 18
-	ApiParserLexerCOMMENT = 19
+	ApiParserLexerT__0         = 1
+	ApiParserLexerT__1         = 2
+	ApiParserLexerT__2         = 3
+	ApiParserLexerT__3         = 4
+	ApiParserLexerT__4         = 5
+	ApiParserLexerT__5         = 6
+	ApiParserLexerT__6         = 7
+	ApiParserLexerT__7         = 8
+	ApiParserLexerT__8         = 9
+	ApiParserLexerT__9         = 10
+	ApiParserLexerT__10        = 11
+	ApiParserLexerT__11        = 12
+	ApiParserLexerT__12        = 13
+	ApiParserLexerATDOC        = 14
+	ApiParserLexerATHANDLER    = 15
+	ApiParserLexerINTERFACE    = 16
+	ApiParserLexerATSERVER     = 17
+	ApiParserLexerWS           = 18
+	ApiParserLexerCOMMENT      = 19
 	ApiParserLexerLINE_COMMENT = 20
-	ApiParserLexerSTRING = 21
-	ApiParserLexerRAW_STRING = 22
-	ApiParserLexerLINE_VALUE = 23
-	ApiParserLexerID = 24
+	ApiParserLexerSTRING       = 21
+	ApiParserLexerRAW_STRING   = 22
+	ApiParserLexerLINE_VALUE   = 23
+	ApiParserLexerID           = 24
 )
 
-
-    const COMEMNTS = 88
-
-
-
+const COMEMNTS = 88

+ 252 - 270
tools/goctl/api/parser/g4/gen/api/apiparser_parser.go

@@ -8,184 +8,188 @@ import (
 )
 
 // Suppress unused import errors
-var _ = fmt.Printf
-var _ = reflect.Copy
-var _ = strconv.Itoa
-
+var (
+	_ = fmt.Printf
+	_ = reflect.Copy
+	_ = strconv.Itoa
+)
 
 var parserATN = []uint16{
-	3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 26, 349, 
-	4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 
-	4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 
-	9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 
-	18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 
-	4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 
-	29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 
-	9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 3, 2, 7, 
-	2, 78, 10, 2, 12, 2, 14, 2, 81, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 
-	3, 88, 10, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 5, 5, 98, 
-	10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 6, 7, 108, 10, 7, 
-	13, 7, 14, 7, 109, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 
-	10, 3, 10, 3, 10, 6, 10, 123, 10, 10, 13, 10, 14, 10, 124, 3, 10, 3, 10, 
-	3, 11, 3, 11, 5, 11, 131, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 
-	13, 3, 13, 3, 13, 7, 13, 141, 10, 13, 12, 13, 14, 13, 144, 11, 13, 3, 13, 
-	3, 13, 3, 14, 3, 14, 5, 14, 150, 10, 14, 3, 15, 3, 15, 5, 15, 154, 10, 
-	15, 3, 16, 3, 16, 3, 16, 5, 16, 159, 10, 16, 3, 16, 3, 16, 7, 16, 163, 
-	10, 16, 12, 16, 14, 16, 166, 11, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 
-	5, 17, 173, 10, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 5, 18, 180, 10, 
-	18, 3, 18, 3, 18, 7, 18, 184, 10, 18, 12, 18, 14, 18, 187, 11, 18, 3, 18, 
-	3, 18, 3, 19, 3, 19, 3, 19, 5, 19, 194, 10, 19, 3, 19, 3, 19, 3, 20, 3, 
-	20, 3, 20, 5, 20, 201, 10, 20, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 207, 
-	10, 21, 3, 22, 5, 22, 210, 10, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 
-	23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 222, 10, 23, 3, 24, 3, 24, 3, 24, 
-	3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 
-	26, 3, 26, 3, 26, 3, 27, 5, 27, 241, 10, 27, 3, 27, 3, 27, 3, 28, 3, 28, 
-	3, 28, 6, 28, 248, 10, 28, 13, 28, 14, 28, 249, 3, 28, 3, 28, 3, 29, 3, 
-	29, 3, 29, 3, 29, 3, 29, 7, 29, 259, 10, 29, 12, 29, 14, 29, 262, 11, 29, 
-	3, 29, 3, 29, 3, 30, 5, 30, 267, 10, 30, 3, 30, 3, 30, 5, 30, 271, 10, 
-	30, 3, 30, 3, 30, 3, 31, 3, 31, 5, 31, 277, 10, 31, 3, 31, 6, 31, 280, 
-	10, 31, 13, 31, 14, 31, 281, 3, 31, 5, 31, 285, 10, 31, 3, 31, 5, 31, 288, 
-	10, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 297, 10, 
-	33, 3, 33, 5, 33, 300, 10, 33, 3, 34, 3, 34, 5, 34, 304, 10, 34, 3, 34, 
-	3, 34, 3, 35, 3, 35, 3, 35, 5, 35, 311, 10, 35, 3, 35, 3, 35, 3, 36, 3, 
-	36, 3, 36, 3, 36, 3, 37, 3, 37, 5, 37, 321, 10, 37, 6, 37, 323, 10, 37, 
-	13, 37, 14, 37, 324, 3, 38, 3, 38, 3, 38, 3, 38, 7, 38, 331, 10, 38, 12, 
-	38, 14, 38, 334, 11, 38, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 340, 10, 38, 
-	6, 38, 342, 10, 38, 13, 38, 14, 38, 343, 3, 38, 5, 38, 347, 10, 38, 3, 
-	38, 2, 2, 39, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 
-	34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 
-	70, 72, 74, 2, 2, 2, 358, 2, 79, 3, 2, 2, 2, 4, 87, 3, 2, 2, 2, 6, 89, 
-	3, 2, 2, 2, 8, 97, 3, 2, 2, 2, 10, 99, 3, 2, 2, 2, 12, 103, 3, 2, 2, 2, 
-	14, 113, 3, 2, 2, 2, 16, 115, 3, 2, 2, 2, 18, 118, 3, 2, 2, 2, 20, 130, 
-	3, 2, 2, 2, 22, 132, 3, 2, 2, 2, 24, 136, 3, 2, 2, 2, 26, 149, 3, 2, 2, 
-	2, 28, 153, 3, 2, 2, 2, 30, 155, 3, 2, 2, 2, 32, 169, 3, 2, 2, 2, 34, 176, 
-	3, 2, 2, 2, 36, 190, 3, 2, 2, 2, 38, 200, 3, 2, 2, 2, 40, 202, 3, 2, 2, 
-	2, 42, 209, 3, 2, 2, 2, 44, 221, 3, 2, 2, 2, 46, 223, 3, 2, 2, 2, 48, 227, 
-	3, 2, 2, 2, 50, 235, 3, 2, 2, 2, 52, 240, 3, 2, 2, 2, 54, 244, 3, 2, 2, 
-	2, 56, 253, 3, 2, 2, 2, 58, 266, 3, 2, 2, 2, 60, 274, 3, 2, 2, 2, 62, 289, 
-	3, 2, 2, 2, 64, 292, 3, 2, 2, 2, 66, 301, 3, 2, 2, 2, 68, 307, 3, 2, 2, 
-	2, 70, 314, 3, 2, 2, 2, 72, 322, 3, 2, 2, 2, 74, 346, 3, 2, 2, 2, 76, 78, 
-	5, 4, 3, 2, 77, 76, 3, 2, 2, 2, 78, 81, 3, 2, 2, 2, 79, 77, 3, 2, 2, 2, 
-	79, 80, 3, 2, 2, 2, 80, 3, 3, 2, 2, 2, 81, 79, 3, 2, 2, 2, 82, 88, 5, 6, 
-	4, 2, 83, 88, 5, 8, 5, 2, 84, 88, 5, 18, 10, 2, 85, 88, 5, 20, 11, 2, 86, 
-	88, 5, 52, 27, 2, 87, 82, 3, 2, 2, 2, 87, 83, 3, 2, 2, 2, 87, 84, 3, 2, 
-	2, 2, 87, 85, 3, 2, 2, 2, 87, 86, 3, 2, 2, 2, 88, 5, 3, 2, 2, 2, 89, 90, 
-	8, 4, 1, 2, 90, 91, 7, 26, 2, 2, 91, 92, 7, 3, 2, 2, 92, 93, 8, 4, 1, 2, 
-	93, 94, 7, 23, 2, 2, 94, 7, 3, 2, 2, 2, 95, 98, 5, 10, 6, 2, 96, 98, 5, 
-	12, 7, 2, 97, 95, 3, 2, 2, 2, 97, 96, 3, 2, 2, 2, 98, 9, 3, 2, 2, 2, 99, 
-	100, 8, 6, 1, 2, 100, 101, 7, 26, 2, 2, 101, 102, 5, 16, 9, 2, 102, 11, 
-	3, 2, 2, 2, 103, 104, 8, 7, 1, 2, 104, 105, 7, 26, 2, 2, 105, 107, 7, 4, 
-	2, 2, 106, 108, 5, 14, 8, 2, 107, 106, 3, 2, 2, 2, 108, 109, 3, 2, 2, 2, 
-	109, 107, 3, 2, 2, 2, 109, 110, 3, 2, 2, 2, 110, 111, 3, 2, 2, 2, 111, 
-	112, 7, 5, 2, 2, 112, 13, 3, 2, 2, 2, 113, 114, 5, 16, 9, 2, 114, 15, 3, 
-	2, 2, 2, 115, 116, 8, 9, 1, 2, 116, 117, 7, 23, 2, 2, 117, 17, 3, 2, 2, 
-	2, 118, 119, 8, 10, 1, 2, 119, 120, 7, 26, 2, 2, 120, 122, 7, 4, 2, 2, 
-	121, 123, 5, 70, 36, 2, 122, 121, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124, 
-	122, 3, 2, 2, 2, 124, 125, 3, 2, 2, 2, 125, 126, 3, 2, 2, 2, 126, 127, 
-	7, 5, 2, 2, 127, 19, 3, 2, 2, 2, 128, 131, 5, 22, 12, 2, 129, 131, 5, 24, 
-	13, 2, 130, 128, 3, 2, 2, 2, 130, 129, 3, 2, 2, 2, 131, 21, 3, 2, 2, 2, 
-	132, 133, 8, 12, 1, 2, 133, 134, 7, 26, 2, 2, 134, 135, 5, 26, 14, 2, 135, 
-	23, 3, 2, 2, 2, 136, 137, 8, 13, 1, 2, 137, 138, 7, 26, 2, 2, 138, 142, 
-	7, 4, 2, 2, 139, 141, 5, 28, 15, 2, 140, 139, 3, 2, 2, 2, 141, 144, 3, 
-	2, 2, 2, 142, 140, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 143, 145, 3, 2, 2, 
-	2, 144, 142, 3, 2, 2, 2, 145, 146, 7, 5, 2, 2, 146, 25, 3, 2, 2, 2, 147, 
-	150, 5, 30, 16, 2, 148, 150, 5, 32, 17, 2, 149, 147, 3, 2, 2, 2, 149, 148, 
-	3, 2, 2, 2, 150, 27, 3, 2, 2, 2, 151, 154, 5, 34, 18, 2, 152, 154, 5, 36, 
-	19, 2, 153, 151, 3, 2, 2, 2, 153, 152, 3, 2, 2, 2, 154, 29, 3, 2, 2, 2, 
-	155, 156, 8, 16, 1, 2, 156, 158, 7, 26, 2, 2, 157, 159, 7, 26, 2, 2, 158, 
-	157, 3, 2, 2, 2, 158, 159, 3, 2, 2, 2, 159, 160, 3, 2, 2, 2, 160, 164, 
-	7, 6, 2, 2, 161, 163, 5, 38, 20, 2, 162, 161, 3, 2, 2, 2, 163, 166, 3, 
-	2, 2, 2, 164, 162, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 165, 167, 3, 2, 2, 
-	2, 166, 164, 3, 2, 2, 2, 167, 168, 7, 7, 2, 2, 168, 31, 3, 2, 2, 2, 169, 
-	170, 8, 17, 1, 2, 170, 172, 7, 26, 2, 2, 171, 173, 7, 3, 2, 2, 172, 171, 
-	3, 2, 2, 2, 172, 173, 3, 2, 2, 2, 173, 174, 3, 2, 2, 2, 174, 175, 5, 44, 
-	23, 2, 175, 33, 3, 2, 2, 2, 176, 177, 8, 18, 1, 2, 177, 179, 7, 26, 2, 
-	2, 178, 180, 7, 26, 2, 2, 179, 178, 3, 2, 2, 2, 179, 180, 3, 2, 2, 2, 180, 
-	181, 3, 2, 2, 2, 181, 185, 7, 6, 2, 2, 182, 184, 5, 38, 20, 2, 183, 182, 
-	3, 2, 2, 2, 184, 187, 3, 2, 2, 2, 185, 183, 3, 2, 2, 2, 185, 186, 3, 2, 
-	2, 2, 186, 188, 3, 2, 2, 2, 187, 185, 3, 2, 2, 2, 188, 189, 7, 7, 2, 2, 
-	189, 35, 3, 2, 2, 2, 190, 191, 8, 19, 1, 2, 191, 193, 7, 26, 2, 2, 192, 
-	194, 7, 3, 2, 2, 193, 192, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 195, 
-	3, 2, 2, 2, 195, 196, 5, 44, 23, 2, 196, 37, 3, 2, 2, 2, 197, 198, 6, 20, 
-	2, 2, 198, 201, 5, 40, 21, 2, 199, 201, 5, 42, 22, 2, 200, 197, 3, 2, 2, 
-	2, 200, 199, 3, 2, 2, 2, 201, 39, 3, 2, 2, 2, 202, 203, 8, 21, 1, 2, 203, 
-	204, 7, 26, 2, 2, 204, 206, 5, 44, 23, 2, 205, 207, 7, 24, 2, 2, 206, 205, 
-	3, 2, 2, 2, 206, 207, 3, 2, 2, 2, 207, 41, 3, 2, 2, 2, 208, 210, 7, 8, 
-	2, 2, 209, 208, 3, 2, 2, 2, 209, 210, 3, 2, 2, 2, 210, 211, 3, 2, 2, 2, 
-	211, 212, 7, 26, 2, 2, 212, 43, 3, 2, 2, 2, 213, 214, 8, 23, 1, 2, 214, 
-	222, 7, 26, 2, 2, 215, 222, 5, 48, 25, 2, 216, 222, 5, 50, 26, 2, 217, 
-	222, 7, 18, 2, 2, 218, 222, 7, 9, 2, 2, 219, 222, 5, 46, 24, 2, 220, 222, 
-	5, 30, 16, 2, 221, 213, 3, 2, 2, 2, 221, 215, 3, 2, 2, 2, 221, 216, 3, 
-	2, 2, 2, 221, 217, 3, 2, 2, 2, 221, 218, 3, 2, 2, 2, 221, 219, 3, 2, 2, 
-	2, 221, 220, 3, 2, 2, 2, 222, 45, 3, 2, 2, 2, 223, 224, 7, 8, 2, 2, 224, 
-	225, 8, 24, 1, 2, 225, 226, 7, 26, 2, 2, 226, 47, 3, 2, 2, 2, 227, 228, 
-	8, 25, 1, 2, 228, 229, 7, 26, 2, 2, 229, 230, 7, 10, 2, 2, 230, 231, 8, 
-	25, 1, 2, 231, 232, 7, 26, 2, 2, 232, 233, 7, 11, 2, 2, 233, 234, 5, 44, 
-	23, 2, 234, 49, 3, 2, 2, 2, 235, 236, 7, 10, 2, 2, 236, 237, 7, 11, 2, 
-	2, 237, 238, 5, 44, 23, 2, 238, 51, 3, 2, 2, 2, 239, 241, 5, 54, 28, 2, 
-	240, 239, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 242, 3, 2, 2, 2, 242, 
-	243, 5, 56, 29, 2, 243, 53, 3, 2, 2, 2, 244, 245, 7, 19, 2, 2, 245, 247, 
-	7, 4, 2, 2, 246, 248, 5, 70, 36, 2, 247, 246, 3, 2, 2, 2, 248, 249, 3, 
-	2, 2, 2, 249, 247, 3, 2, 2, 2, 249, 250, 3, 2, 2, 2, 250, 251, 3, 2, 2, 
-	2, 251, 252, 7, 5, 2, 2, 252, 55, 3, 2, 2, 2, 253, 254, 8, 29, 1, 2, 254, 
-	255, 7, 26, 2, 2, 255, 256, 5, 72, 37, 2, 256, 260, 7, 6, 2, 2, 257, 259, 
-	5, 58, 30, 2, 258, 257, 3, 2, 2, 2, 259, 262, 3, 2, 2, 2, 260, 258, 3, 
-	2, 2, 2, 260, 261, 3, 2, 2, 2, 261, 263, 3, 2, 2, 2, 262, 260, 3, 2, 2, 
-	2, 263, 264, 7, 7, 2, 2, 264, 57, 3, 2, 2, 2, 265, 267, 5, 60, 31, 2, 266, 
-	265, 3, 2, 2, 2, 266, 267, 3, 2, 2, 2, 267, 270, 3, 2, 2, 2, 268, 271, 
-	5, 54, 28, 2, 269, 271, 5, 62, 32, 2, 270, 268, 3, 2, 2, 2, 270, 269, 3, 
-	2, 2, 2, 271, 272, 3, 2, 2, 2, 272, 273, 5, 64, 33, 2, 273, 59, 3, 2, 2, 
-	2, 274, 276, 7, 16, 2, 2, 275, 277, 7, 4, 2, 2, 276, 275, 3, 2, 2, 2, 276, 
-	277, 3, 2, 2, 2, 277, 284, 3, 2, 2, 2, 278, 280, 5, 70, 36, 2, 279, 278, 
-	3, 2, 2, 2, 280, 281, 3, 2, 2, 2, 281, 279, 3, 2, 2, 2, 281, 282, 3, 2, 
-	2, 2, 282, 285, 3, 2, 2, 2, 283, 285, 7, 23, 2, 2, 284, 279, 3, 2, 2, 2, 
-	284, 283, 3, 2, 2, 2, 285, 287, 3, 2, 2, 2, 286, 288, 7, 5, 2, 2, 287, 
-	286, 3, 2, 2, 2, 287, 288, 3, 2, 2, 2, 288, 61, 3, 2, 2, 2, 289, 290, 7, 
-	17, 2, 2, 290, 291, 7, 26, 2, 2, 291, 63, 3, 2, 2, 2, 292, 293, 8, 33, 
-	1, 2, 293, 294, 7, 26, 2, 2, 294, 296, 5, 74, 38, 2, 295, 297, 5, 66, 34, 
-	2, 296, 295, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 299, 3, 2, 2, 2, 298, 
-	300, 5, 68, 35, 2, 299, 298, 3, 2, 2, 2, 299, 300, 3, 2, 2, 2, 300, 65, 
-	3, 2, 2, 2, 301, 303, 7, 4, 2, 2, 302, 304, 7, 26, 2, 2, 303, 302, 3, 2, 
-	2, 2, 303, 304, 3, 2, 2, 2, 304, 305, 3, 2, 2, 2, 305, 306, 7, 5, 2, 2, 
-	306, 67, 3, 2, 2, 2, 307, 308, 7, 12, 2, 2, 308, 310, 7, 4, 2, 2, 309, 
-	311, 5, 44, 23, 2, 310, 309, 3, 2, 2, 2, 310, 311, 3, 2, 2, 2, 311, 312, 
-	3, 2, 2, 2, 312, 313, 7, 5, 2, 2, 313, 69, 3, 2, 2, 2, 314, 315, 7, 26, 
-	2, 2, 315, 316, 8, 36, 1, 2, 316, 317, 7, 25, 2, 2, 317, 71, 3, 2, 2, 2, 
-	318, 320, 7, 26, 2, 2, 319, 321, 7, 13, 2, 2, 320, 319, 3, 2, 2, 2, 320, 
-	321, 3, 2, 2, 2, 321, 323, 3, 2, 2, 2, 322, 318, 3, 2, 2, 2, 323, 324, 
-	3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 324, 325, 3, 2, 2, 2, 325, 73, 3, 2, 
-	2, 2, 326, 327, 7, 14, 2, 2, 327, 332, 7, 26, 2, 2, 328, 329, 7, 13, 2, 
-	2, 329, 331, 7, 26, 2, 2, 330, 328, 3, 2, 2, 2, 331, 334, 3, 2, 2, 2, 332, 
-	330, 3, 2, 2, 2, 332, 333, 3, 2, 2, 2, 333, 342, 3, 2, 2, 2, 334, 332, 
-	3, 2, 2, 2, 335, 336, 7, 15, 2, 2, 336, 339, 7, 26, 2, 2, 337, 338, 7, 
-	13, 2, 2, 338, 340, 7, 26, 2, 2, 339, 337, 3, 2, 2, 2, 339, 340, 3, 2, 
-	2, 2, 340, 342, 3, 2, 2, 2, 341, 326, 3, 2, 2, 2, 341, 335, 3, 2, 2, 2, 
-	342, 343, 3, 2, 2, 2, 343, 341, 3, 2, 2, 2, 343, 344, 3, 2, 2, 2, 344, 
-	347, 3, 2, 2, 2, 345, 347, 7, 14, 2, 2, 346, 341, 3, 2, 2, 2, 346, 345, 
-	3, 2, 2, 2, 347, 75, 3, 2, 2, 2, 41, 79, 87, 97, 109, 124, 130, 142, 149, 
-	153, 158, 164, 172, 179, 185, 193, 200, 206, 209, 221, 240, 249, 260, 266, 
-	270, 276, 281, 284, 287, 296, 299, 303, 310, 320, 324, 332, 339, 341, 343, 
+	3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 26, 349,
+	4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7,
+	4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13,
+	9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9,
+	18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23,
+	4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4,
+	29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34,
+	9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 3, 2, 7,
+	2, 78, 10, 2, 12, 2, 14, 2, 81, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5,
+	3, 88, 10, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 5, 5, 98,
+	10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 6, 7, 108, 10, 7,
+	13, 7, 14, 7, 109, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3,
+	10, 3, 10, 3, 10, 6, 10, 123, 10, 10, 13, 10, 14, 10, 124, 3, 10, 3, 10,
+	3, 11, 3, 11, 5, 11, 131, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3,
+	13, 3, 13, 3, 13, 7, 13, 141, 10, 13, 12, 13, 14, 13, 144, 11, 13, 3, 13,
+	3, 13, 3, 14, 3, 14, 5, 14, 150, 10, 14, 3, 15, 3, 15, 5, 15, 154, 10,
+	15, 3, 16, 3, 16, 3, 16, 5, 16, 159, 10, 16, 3, 16, 3, 16, 7, 16, 163,
+	10, 16, 12, 16, 14, 16, 166, 11, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17,
+	5, 17, 173, 10, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 5, 18, 180, 10,
+	18, 3, 18, 3, 18, 7, 18, 184, 10, 18, 12, 18, 14, 18, 187, 11, 18, 3, 18,
+	3, 18, 3, 19, 3, 19, 3, 19, 5, 19, 194, 10, 19, 3, 19, 3, 19, 3, 20, 3,
+	20, 3, 20, 5, 20, 201, 10, 20, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 207,
+	10, 21, 3, 22, 5, 22, 210, 10, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3,
+	23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 222, 10, 23, 3, 24, 3, 24, 3, 24,
+	3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3,
+	26, 3, 26, 3, 26, 3, 27, 5, 27, 241, 10, 27, 3, 27, 3, 27, 3, 28, 3, 28,
+	3, 28, 6, 28, 248, 10, 28, 13, 28, 14, 28, 249, 3, 28, 3, 28, 3, 29, 3,
+	29, 3, 29, 3, 29, 3, 29, 7, 29, 259, 10, 29, 12, 29, 14, 29, 262, 11, 29,
+	3, 29, 3, 29, 3, 30, 5, 30, 267, 10, 30, 3, 30, 3, 30, 5, 30, 271, 10,
+	30, 3, 30, 3, 30, 3, 31, 3, 31, 5, 31, 277, 10, 31, 3, 31, 6, 31, 280,
+	10, 31, 13, 31, 14, 31, 281, 3, 31, 5, 31, 285, 10, 31, 3, 31, 5, 31, 288,
+	10, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 297, 10,
+	33, 3, 33, 5, 33, 300, 10, 33, 3, 34, 3, 34, 5, 34, 304, 10, 34, 3, 34,
+	3, 34, 3, 35, 3, 35, 3, 35, 5, 35, 311, 10, 35, 3, 35, 3, 35, 3, 36, 3,
+	36, 3, 36, 3, 36, 3, 37, 3, 37, 5, 37, 321, 10, 37, 6, 37, 323, 10, 37,
+	13, 37, 14, 37, 324, 3, 38, 3, 38, 3, 38, 3, 38, 7, 38, 331, 10, 38, 12,
+	38, 14, 38, 334, 11, 38, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 340, 10, 38,
+	6, 38, 342, 10, 38, 13, 38, 14, 38, 343, 3, 38, 5, 38, 347, 10, 38, 3,
+	38, 2, 2, 39, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32,
+	34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68,
+	70, 72, 74, 2, 2, 2, 358, 2, 79, 3, 2, 2, 2, 4, 87, 3, 2, 2, 2, 6, 89,
+	3, 2, 2, 2, 8, 97, 3, 2, 2, 2, 10, 99, 3, 2, 2, 2, 12, 103, 3, 2, 2, 2,
+	14, 113, 3, 2, 2, 2, 16, 115, 3, 2, 2, 2, 18, 118, 3, 2, 2, 2, 20, 130,
+	3, 2, 2, 2, 22, 132, 3, 2, 2, 2, 24, 136, 3, 2, 2, 2, 26, 149, 3, 2, 2,
+	2, 28, 153, 3, 2, 2, 2, 30, 155, 3, 2, 2, 2, 32, 169, 3, 2, 2, 2, 34, 176,
+	3, 2, 2, 2, 36, 190, 3, 2, 2, 2, 38, 200, 3, 2, 2, 2, 40, 202, 3, 2, 2,
+	2, 42, 209, 3, 2, 2, 2, 44, 221, 3, 2, 2, 2, 46, 223, 3, 2, 2, 2, 48, 227,
+	3, 2, 2, 2, 50, 235, 3, 2, 2, 2, 52, 240, 3, 2, 2, 2, 54, 244, 3, 2, 2,
+	2, 56, 253, 3, 2, 2, 2, 58, 266, 3, 2, 2, 2, 60, 274, 3, 2, 2, 2, 62, 289,
+	3, 2, 2, 2, 64, 292, 3, 2, 2, 2, 66, 301, 3, 2, 2, 2, 68, 307, 3, 2, 2,
+	2, 70, 314, 3, 2, 2, 2, 72, 322, 3, 2, 2, 2, 74, 346, 3, 2, 2, 2, 76, 78,
+	5, 4, 3, 2, 77, 76, 3, 2, 2, 2, 78, 81, 3, 2, 2, 2, 79, 77, 3, 2, 2, 2,
+	79, 80, 3, 2, 2, 2, 80, 3, 3, 2, 2, 2, 81, 79, 3, 2, 2, 2, 82, 88, 5, 6,
+	4, 2, 83, 88, 5, 8, 5, 2, 84, 88, 5, 18, 10, 2, 85, 88, 5, 20, 11, 2, 86,
+	88, 5, 52, 27, 2, 87, 82, 3, 2, 2, 2, 87, 83, 3, 2, 2, 2, 87, 84, 3, 2,
+	2, 2, 87, 85, 3, 2, 2, 2, 87, 86, 3, 2, 2, 2, 88, 5, 3, 2, 2, 2, 89, 90,
+	8, 4, 1, 2, 90, 91, 7, 26, 2, 2, 91, 92, 7, 3, 2, 2, 92, 93, 8, 4, 1, 2,
+	93, 94, 7, 23, 2, 2, 94, 7, 3, 2, 2, 2, 95, 98, 5, 10, 6, 2, 96, 98, 5,
+	12, 7, 2, 97, 95, 3, 2, 2, 2, 97, 96, 3, 2, 2, 2, 98, 9, 3, 2, 2, 2, 99,
+	100, 8, 6, 1, 2, 100, 101, 7, 26, 2, 2, 101, 102, 5, 16, 9, 2, 102, 11,
+	3, 2, 2, 2, 103, 104, 8, 7, 1, 2, 104, 105, 7, 26, 2, 2, 105, 107, 7, 4,
+	2, 2, 106, 108, 5, 14, 8, 2, 107, 106, 3, 2, 2, 2, 108, 109, 3, 2, 2, 2,
+	109, 107, 3, 2, 2, 2, 109, 110, 3, 2, 2, 2, 110, 111, 3, 2, 2, 2, 111,
+	112, 7, 5, 2, 2, 112, 13, 3, 2, 2, 2, 113, 114, 5, 16, 9, 2, 114, 15, 3,
+	2, 2, 2, 115, 116, 8, 9, 1, 2, 116, 117, 7, 23, 2, 2, 117, 17, 3, 2, 2,
+	2, 118, 119, 8, 10, 1, 2, 119, 120, 7, 26, 2, 2, 120, 122, 7, 4, 2, 2,
+	121, 123, 5, 70, 36, 2, 122, 121, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124,
+	122, 3, 2, 2, 2, 124, 125, 3, 2, 2, 2, 125, 126, 3, 2, 2, 2, 126, 127,
+	7, 5, 2, 2, 127, 19, 3, 2, 2, 2, 128, 131, 5, 22, 12, 2, 129, 131, 5, 24,
+	13, 2, 130, 128, 3, 2, 2, 2, 130, 129, 3, 2, 2, 2, 131, 21, 3, 2, 2, 2,
+	132, 133, 8, 12, 1, 2, 133, 134, 7, 26, 2, 2, 134, 135, 5, 26, 14, 2, 135,
+	23, 3, 2, 2, 2, 136, 137, 8, 13, 1, 2, 137, 138, 7, 26, 2, 2, 138, 142,
+	7, 4, 2, 2, 139, 141, 5, 28, 15, 2, 140, 139, 3, 2, 2, 2, 141, 144, 3,
+	2, 2, 2, 142, 140, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 143, 145, 3, 2, 2,
+	2, 144, 142, 3, 2, 2, 2, 145, 146, 7, 5, 2, 2, 146, 25, 3, 2, 2, 2, 147,
+	150, 5, 30, 16, 2, 148, 150, 5, 32, 17, 2, 149, 147, 3, 2, 2, 2, 149, 148,
+	3, 2, 2, 2, 150, 27, 3, 2, 2, 2, 151, 154, 5, 34, 18, 2, 152, 154, 5, 36,
+	19, 2, 153, 151, 3, 2, 2, 2, 153, 152, 3, 2, 2, 2, 154, 29, 3, 2, 2, 2,
+	155, 156, 8, 16, 1, 2, 156, 158, 7, 26, 2, 2, 157, 159, 7, 26, 2, 2, 158,
+	157, 3, 2, 2, 2, 158, 159, 3, 2, 2, 2, 159, 160, 3, 2, 2, 2, 160, 164,
+	7, 6, 2, 2, 161, 163, 5, 38, 20, 2, 162, 161, 3, 2, 2, 2, 163, 166, 3,
+	2, 2, 2, 164, 162, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 165, 167, 3, 2, 2,
+	2, 166, 164, 3, 2, 2, 2, 167, 168, 7, 7, 2, 2, 168, 31, 3, 2, 2, 2, 169,
+	170, 8, 17, 1, 2, 170, 172, 7, 26, 2, 2, 171, 173, 7, 3, 2, 2, 172, 171,
+	3, 2, 2, 2, 172, 173, 3, 2, 2, 2, 173, 174, 3, 2, 2, 2, 174, 175, 5, 44,
+	23, 2, 175, 33, 3, 2, 2, 2, 176, 177, 8, 18, 1, 2, 177, 179, 7, 26, 2,
+	2, 178, 180, 7, 26, 2, 2, 179, 178, 3, 2, 2, 2, 179, 180, 3, 2, 2, 2, 180,
+	181, 3, 2, 2, 2, 181, 185, 7, 6, 2, 2, 182, 184, 5, 38, 20, 2, 183, 182,
+	3, 2, 2, 2, 184, 187, 3, 2, 2, 2, 185, 183, 3, 2, 2, 2, 185, 186, 3, 2,
+	2, 2, 186, 188, 3, 2, 2, 2, 187, 185, 3, 2, 2, 2, 188, 189, 7, 7, 2, 2,
+	189, 35, 3, 2, 2, 2, 190, 191, 8, 19, 1, 2, 191, 193, 7, 26, 2, 2, 192,
+	194, 7, 3, 2, 2, 193, 192, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 195,
+	3, 2, 2, 2, 195, 196, 5, 44, 23, 2, 196, 37, 3, 2, 2, 2, 197, 198, 6, 20,
+	2, 2, 198, 201, 5, 40, 21, 2, 199, 201, 5, 42, 22, 2, 200, 197, 3, 2, 2,
+	2, 200, 199, 3, 2, 2, 2, 201, 39, 3, 2, 2, 2, 202, 203, 8, 21, 1, 2, 203,
+	204, 7, 26, 2, 2, 204, 206, 5, 44, 23, 2, 205, 207, 7, 24, 2, 2, 206, 205,
+	3, 2, 2, 2, 206, 207, 3, 2, 2, 2, 207, 41, 3, 2, 2, 2, 208, 210, 7, 8,
+	2, 2, 209, 208, 3, 2, 2, 2, 209, 210, 3, 2, 2, 2, 210, 211, 3, 2, 2, 2,
+	211, 212, 7, 26, 2, 2, 212, 43, 3, 2, 2, 2, 213, 214, 8, 23, 1, 2, 214,
+	222, 7, 26, 2, 2, 215, 222, 5, 48, 25, 2, 216, 222, 5, 50, 26, 2, 217,
+	222, 7, 18, 2, 2, 218, 222, 7, 9, 2, 2, 219, 222, 5, 46, 24, 2, 220, 222,
+	5, 30, 16, 2, 221, 213, 3, 2, 2, 2, 221, 215, 3, 2, 2, 2, 221, 216, 3,
+	2, 2, 2, 221, 217, 3, 2, 2, 2, 221, 218, 3, 2, 2, 2, 221, 219, 3, 2, 2,
+	2, 221, 220, 3, 2, 2, 2, 222, 45, 3, 2, 2, 2, 223, 224, 7, 8, 2, 2, 224,
+	225, 8, 24, 1, 2, 225, 226, 7, 26, 2, 2, 226, 47, 3, 2, 2, 2, 227, 228,
+	8, 25, 1, 2, 228, 229, 7, 26, 2, 2, 229, 230, 7, 10, 2, 2, 230, 231, 8,
+	25, 1, 2, 231, 232, 7, 26, 2, 2, 232, 233, 7, 11, 2, 2, 233, 234, 5, 44,
+	23, 2, 234, 49, 3, 2, 2, 2, 235, 236, 7, 10, 2, 2, 236, 237, 7, 11, 2,
+	2, 237, 238, 5, 44, 23, 2, 238, 51, 3, 2, 2, 2, 239, 241, 5, 54, 28, 2,
+	240, 239, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 242, 3, 2, 2, 2, 242,
+	243, 5, 56, 29, 2, 243, 53, 3, 2, 2, 2, 244, 245, 7, 19, 2, 2, 245, 247,
+	7, 4, 2, 2, 246, 248, 5, 70, 36, 2, 247, 246, 3, 2, 2, 2, 248, 249, 3,
+	2, 2, 2, 249, 247, 3, 2, 2, 2, 249, 250, 3, 2, 2, 2, 250, 251, 3, 2, 2,
+	2, 251, 252, 7, 5, 2, 2, 252, 55, 3, 2, 2, 2, 253, 254, 8, 29, 1, 2, 254,
+	255, 7, 26, 2, 2, 255, 256, 5, 72, 37, 2, 256, 260, 7, 6, 2, 2, 257, 259,
+	5, 58, 30, 2, 258, 257, 3, 2, 2, 2, 259, 262, 3, 2, 2, 2, 260, 258, 3,
+	2, 2, 2, 260, 261, 3, 2, 2, 2, 261, 263, 3, 2, 2, 2, 262, 260, 3, 2, 2,
+	2, 263, 264, 7, 7, 2, 2, 264, 57, 3, 2, 2, 2, 265, 267, 5, 60, 31, 2, 266,
+	265, 3, 2, 2, 2, 266, 267, 3, 2, 2, 2, 267, 270, 3, 2, 2, 2, 268, 271,
+	5, 54, 28, 2, 269, 271, 5, 62, 32, 2, 270, 268, 3, 2, 2, 2, 270, 269, 3,
+	2, 2, 2, 271, 272, 3, 2, 2, 2, 272, 273, 5, 64, 33, 2, 273, 59, 3, 2, 2,
+	2, 274, 276, 7, 16, 2, 2, 275, 277, 7, 4, 2, 2, 276, 275, 3, 2, 2, 2, 276,
+	277, 3, 2, 2, 2, 277, 284, 3, 2, 2, 2, 278, 280, 5, 70, 36, 2, 279, 278,
+	3, 2, 2, 2, 280, 281, 3, 2, 2, 2, 281, 279, 3, 2, 2, 2, 281, 282, 3, 2,
+	2, 2, 282, 285, 3, 2, 2, 2, 283, 285, 7, 23, 2, 2, 284, 279, 3, 2, 2, 2,
+	284, 283, 3, 2, 2, 2, 285, 287, 3, 2, 2, 2, 286, 288, 7, 5, 2, 2, 287,
+	286, 3, 2, 2, 2, 287, 288, 3, 2, 2, 2, 288, 61, 3, 2, 2, 2, 289, 290, 7,
+	17, 2, 2, 290, 291, 7, 26, 2, 2, 291, 63, 3, 2, 2, 2, 292, 293, 8, 33,
+	1, 2, 293, 294, 7, 26, 2, 2, 294, 296, 5, 74, 38, 2, 295, 297, 5, 66, 34,
+	2, 296, 295, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 299, 3, 2, 2, 2, 298,
+	300, 5, 68, 35, 2, 299, 298, 3, 2, 2, 2, 299, 300, 3, 2, 2, 2, 300, 65,
+	3, 2, 2, 2, 301, 303, 7, 4, 2, 2, 302, 304, 7, 26, 2, 2, 303, 302, 3, 2,
+	2, 2, 303, 304, 3, 2, 2, 2, 304, 305, 3, 2, 2, 2, 305, 306, 7, 5, 2, 2,
+	306, 67, 3, 2, 2, 2, 307, 308, 7, 12, 2, 2, 308, 310, 7, 4, 2, 2, 309,
+	311, 5, 44, 23, 2, 310, 309, 3, 2, 2, 2, 310, 311, 3, 2, 2, 2, 311, 312,
+	3, 2, 2, 2, 312, 313, 7, 5, 2, 2, 313, 69, 3, 2, 2, 2, 314, 315, 7, 26,
+	2, 2, 315, 316, 8, 36, 1, 2, 316, 317, 7, 25, 2, 2, 317, 71, 3, 2, 2, 2,
+	318, 320, 7, 26, 2, 2, 319, 321, 7, 13, 2, 2, 320, 319, 3, 2, 2, 2, 320,
+	321, 3, 2, 2, 2, 321, 323, 3, 2, 2, 2, 322, 318, 3, 2, 2, 2, 323, 324,
+	3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 324, 325, 3, 2, 2, 2, 325, 73, 3, 2,
+	2, 2, 326, 327, 7, 14, 2, 2, 327, 332, 7, 26, 2, 2, 328, 329, 7, 13, 2,
+	2, 329, 331, 7, 26, 2, 2, 330, 328, 3, 2, 2, 2, 331, 334, 3, 2, 2, 2, 332,
+	330, 3, 2, 2, 2, 332, 333, 3, 2, 2, 2, 333, 342, 3, 2, 2, 2, 334, 332,
+	3, 2, 2, 2, 335, 336, 7, 15, 2, 2, 336, 339, 7, 26, 2, 2, 337, 338, 7,
+	13, 2, 2, 338, 340, 7, 26, 2, 2, 339, 337, 3, 2, 2, 2, 339, 340, 3, 2,
+	2, 2, 340, 342, 3, 2, 2, 2, 341, 326, 3, 2, 2, 2, 341, 335, 3, 2, 2, 2,
+	342, 343, 3, 2, 2, 2, 343, 341, 3, 2, 2, 2, 343, 344, 3, 2, 2, 2, 344,
+	347, 3, 2, 2, 2, 345, 347, 7, 14, 2, 2, 346, 341, 3, 2, 2, 2, 346, 345,
+	3, 2, 2, 2, 347, 75, 3, 2, 2, 2, 41, 79, 87, 97, 109, 124, 130, 142, 149,
+	153, 158, 164, 172, 179, 185, 193, 200, 206, 209, 221, 240, 249, 260, 266,
+	270, 276, 281, 284, 287, 296, 299, 303, 310, 320, 324, 332, 339, 341, 343,
 	346,
 }
+
 var literalNames = []string{
-	"", "'='", "'('", "')'", "'{'", "'}'", "'*'", "'time.Time'", "'['", "']'", 
-	"'returns'", "'-'", "'/'", "'/:'", "'@doc'", "'@handler'", "'interface{}'", 
+	"", "'='", "'('", "')'", "'{'", "'}'", "'*'", "'time.Time'", "'['", "']'",
+	"'returns'", "'-'", "'/'", "'/:'", "'@doc'", "'@handler'", "'interface{}'",
 	"'@server'",
 }
+
 var symbolicNames = []string{
-	"", "", "", "", "", "", "", "", "", "", "", "", "", "", "ATDOC", "ATHANDLER", 
-	"INTERFACE", "ATSERVER", "WS", "COMMENT", "LINE_COMMENT", "STRING", "RAW_STRING", 
+	"", "", "", "", "", "", "", "", "", "", "", "", "", "", "ATDOC", "ATHANDLER",
+	"INTERFACE", "ATSERVER", "WS", "COMMENT", "LINE_COMMENT", "STRING", "RAW_STRING",
 	"LINE_VALUE", "ID",
 }
 
 var ruleNames = []string{
-	"api", "spec", "syntaxLit", "importSpec", "importLit", "importBlock", "importBlockValue", 
-	"importValue", "infoSpec", "typeSpec", "typeLit", "typeBlock", "typeLitBody", 
-	"typeBlockBody", "typeStruct", "typeAlias", "typeBlockStruct", "typeBlockAlias", 
-	"field", "normalField", "anonymousFiled", "dataType", "pointerType", "mapType", 
-	"arrayType", "serviceSpec", "atServer", "serviceApi", "serviceRoute", "atDoc", 
+	"api", "spec", "syntaxLit", "importSpec", "importLit", "importBlock", "importBlockValue",
+	"importValue", "infoSpec", "typeSpec", "typeLit", "typeBlock", "typeLitBody",
+	"typeBlockBody", "typeStruct", "typeAlias", "typeBlockStruct", "typeBlockAlias",
+	"field", "normalField", "anonymousFiled", "dataType", "pointerType", "mapType",
+	"arrayType", "serviceSpec", "atServer", "serviceApi", "serviceRoute", "atDoc",
 	"atHandler", "route", "body", "replybody", "kvLit", "serviceName", "path",
 }
+
 type ApiParserParser struct {
 	*antlr.BaseParser
 }
@@ -215,75 +219,74 @@ func NewApiParserParser(input antlr.TokenStream) *ApiParserParser {
 	return this
 }
 
-
 // ApiParserParser tokens.
 const (
-	ApiParserParserEOF = antlr.TokenEOF
-	ApiParserParserT__0 = 1
-	ApiParserParserT__1 = 2
-	ApiParserParserT__2 = 3
-	ApiParserParserT__3 = 4
-	ApiParserParserT__4 = 5
-	ApiParserParserT__5 = 6
-	ApiParserParserT__6 = 7
-	ApiParserParserT__7 = 8
-	ApiParserParserT__8 = 9
-	ApiParserParserT__9 = 10
-	ApiParserParserT__10 = 11
-	ApiParserParserT__11 = 12
-	ApiParserParserT__12 = 13
-	ApiParserParserATDOC = 14
-	ApiParserParserATHANDLER = 15
-	ApiParserParserINTERFACE = 16
-	ApiParserParserATSERVER = 17
-	ApiParserParserWS = 18
-	ApiParserParserCOMMENT = 19
+	ApiParserParserEOF          = antlr.TokenEOF
+	ApiParserParserT__0         = 1
+	ApiParserParserT__1         = 2
+	ApiParserParserT__2         = 3
+	ApiParserParserT__3         = 4
+	ApiParserParserT__4         = 5
+	ApiParserParserT__5         = 6
+	ApiParserParserT__6         = 7
+	ApiParserParserT__7         = 8
+	ApiParserParserT__8         = 9
+	ApiParserParserT__9         = 10
+	ApiParserParserT__10        = 11
+	ApiParserParserT__11        = 12
+	ApiParserParserT__12        = 13
+	ApiParserParserATDOC        = 14
+	ApiParserParserATHANDLER    = 15
+	ApiParserParserINTERFACE    = 16
+	ApiParserParserATSERVER     = 17
+	ApiParserParserWS           = 18
+	ApiParserParserCOMMENT      = 19
 	ApiParserParserLINE_COMMENT = 20
-	ApiParserParserSTRING = 21
-	ApiParserParserRAW_STRING = 22
-	ApiParserParserLINE_VALUE = 23
-	ApiParserParserID = 24
+	ApiParserParserSTRING       = 21
+	ApiParserParserRAW_STRING   = 22
+	ApiParserParserLINE_VALUE   = 23
+	ApiParserParserID           = 24
 )
 
 // ApiParserParser rules.
 const (
-	ApiParserParserRULE_api = 0
-	ApiParserParserRULE_spec = 1
-	ApiParserParserRULE_syntaxLit = 2
-	ApiParserParserRULE_importSpec = 3
-	ApiParserParserRULE_importLit = 4
-	ApiParserParserRULE_importBlock = 5
+	ApiParserParserRULE_api              = 0
+	ApiParserParserRULE_spec             = 1
+	ApiParserParserRULE_syntaxLit        = 2
+	ApiParserParserRULE_importSpec       = 3
+	ApiParserParserRULE_importLit        = 4
+	ApiParserParserRULE_importBlock      = 5
 	ApiParserParserRULE_importBlockValue = 6
-	ApiParserParserRULE_importValue = 7
-	ApiParserParserRULE_infoSpec = 8
-	ApiParserParserRULE_typeSpec = 9
-	ApiParserParserRULE_typeLit = 10
-	ApiParserParserRULE_typeBlock = 11
-	ApiParserParserRULE_typeLitBody = 12
-	ApiParserParserRULE_typeBlockBody = 13
-	ApiParserParserRULE_typeStruct = 14
-	ApiParserParserRULE_typeAlias = 15
-	ApiParserParserRULE_typeBlockStruct = 16
-	ApiParserParserRULE_typeBlockAlias = 17
-	ApiParserParserRULE_field = 18
-	ApiParserParserRULE_normalField = 19
-	ApiParserParserRULE_anonymousFiled = 20
-	ApiParserParserRULE_dataType = 21
-	ApiParserParserRULE_pointerType = 22
-	ApiParserParserRULE_mapType = 23
-	ApiParserParserRULE_arrayType = 24
-	ApiParserParserRULE_serviceSpec = 25
-	ApiParserParserRULE_atServer = 26
-	ApiParserParserRULE_serviceApi = 27
-	ApiParserParserRULE_serviceRoute = 28
-	ApiParserParserRULE_atDoc = 29
-	ApiParserParserRULE_atHandler = 30
-	ApiParserParserRULE_route = 31
-	ApiParserParserRULE_body = 32
-	ApiParserParserRULE_replybody = 33
-	ApiParserParserRULE_kvLit = 34
-	ApiParserParserRULE_serviceName = 35
-	ApiParserParserRULE_path = 36
+	ApiParserParserRULE_importValue      = 7
+	ApiParserParserRULE_infoSpec         = 8
+	ApiParserParserRULE_typeSpec         = 9
+	ApiParserParserRULE_typeLit          = 10
+	ApiParserParserRULE_typeBlock        = 11
+	ApiParserParserRULE_typeLitBody      = 12
+	ApiParserParserRULE_typeBlockBody    = 13
+	ApiParserParserRULE_typeStruct       = 14
+	ApiParserParserRULE_typeAlias        = 15
+	ApiParserParserRULE_typeBlockStruct  = 16
+	ApiParserParserRULE_typeBlockAlias   = 17
+	ApiParserParserRULE_field            = 18
+	ApiParserParserRULE_normalField      = 19
+	ApiParserParserRULE_anonymousFiled   = 20
+	ApiParserParserRULE_dataType         = 21
+	ApiParserParserRULE_pointerType      = 22
+	ApiParserParserRULE_mapType          = 23
+	ApiParserParserRULE_arrayType        = 24
+	ApiParserParserRULE_serviceSpec      = 25
+	ApiParserParserRULE_atServer         = 26
+	ApiParserParserRULE_serviceApi       = 27
+	ApiParserParserRULE_serviceRoute     = 28
+	ApiParserParserRULE_atDoc            = 29
+	ApiParserParserRULE_atHandler        = 30
+	ApiParserParserRULE_route            = 31
+	ApiParserParserRULE_body             = 32
+	ApiParserParserRULE_replybody        = 33
+	ApiParserParserRULE_kvLit            = 34
+	ApiParserParserRULE_serviceName      = 35
+	ApiParserParserRULE_path             = 36
 )
 
 // IApiContext is an interface to support dynamic dispatch.
@@ -303,7 +306,7 @@ type ApiContext struct {
 }
 
 func NewEmptyApiContext() *ApiContext {
-	var p = new(ApiContext)
+	p := new(ApiContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_api
 	return p
@@ -312,7 +315,7 @@ func NewEmptyApiContext() *ApiContext {
 func (*ApiContext) IsApiContext() {}
 
 func NewApiContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ApiContext {
-	var p = new(ApiContext)
+	p := new(ApiContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -325,8 +328,8 @@ func NewApiContext(parser antlr.Parser, parent antlr.ParserRuleContext, invoking
 func (s *ApiContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *ApiContext) AllSpec() []ISpecContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ISpecContext)(nil)).Elem())
-	var tst = make([]ISpecContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*ISpecContext)(nil)).Elem())
+	tst := make([]ISpecContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -338,7 +341,7 @@ func (s *ApiContext) AllSpec() []ISpecContext {
 }
 
 func (s *ApiContext) Spec(i int) ISpecContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ISpecContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ISpecContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -355,7 +358,6 @@ func (s *ApiContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) st
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ApiContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -366,15 +368,11 @@ func (s *ApiContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) Api() (localctx IApiContext) {
 	localctx = NewApiContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 0, ApiParserParserRULE_api)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -396,25 +394,20 @@ func (p *ApiParserParser) Api() (localctx IApiContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	for _la == ApiParserParserATSERVER || _la == ApiParserParserID {
 		{
 			p.SetState(74)
 			p.Spec()
 		}
 
-
 		p.SetState(79)
 		p.GetErrorHandler().Sync(p)
 		_la = p.GetTokenStream().LA(1)
 	}
 
-
-
 	return localctx
 }
 
-
 // ISpecContext is an interface to support dynamic dispatch.
 type ISpecContext interface {
 	antlr.ParserRuleContext
@@ -432,7 +425,7 @@ type SpecContext struct {
 }
 
 func NewEmptySpecContext() *SpecContext {
-	var p = new(SpecContext)
+	p := new(SpecContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_spec
 	return p
@@ -441,7 +434,7 @@ func NewEmptySpecContext() *SpecContext {
 func (*SpecContext) IsSpecContext() {}
 
 func NewSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SpecContext {
-	var p = new(SpecContext)
+	p := new(SpecContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -454,7 +447,7 @@ func NewSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokin
 func (s *SpecContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *SpecContext) SyntaxLit() ISyntaxLitContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ISyntaxLitContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ISyntaxLitContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -464,7 +457,7 @@ func (s *SpecContext) SyntaxLit() ISyntaxLitContext {
 }
 
 func (s *SpecContext) ImportSpec() IImportSpecContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportSpecContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IImportSpecContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -474,7 +467,7 @@ func (s *SpecContext) ImportSpec() IImportSpecContext {
 }
 
 func (s *SpecContext) InfoSpec() IInfoSpecContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IInfoSpecContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IInfoSpecContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -484,7 +477,7 @@ func (s *SpecContext) InfoSpec() IInfoSpecContext {
 }
 
 func (s *SpecContext) TypeSpec() ITypeSpecContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeSpecContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeSpecContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -494,7 +487,7 @@ func (s *SpecContext) TypeSpec() ITypeSpecContext {
 }
 
 func (s *SpecContext) ServiceSpec() IServiceSpecContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IServiceSpecContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IServiceSpecContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -511,7 +504,6 @@ func (s *SpecContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) s
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *SpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -522,9 +514,6 @@ func (s *SpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) Spec() (localctx ISpecContext) {
 	localctx = NewSpecContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 2, ApiParserParserRULE_spec)
@@ -555,7 +544,6 @@ func (p *ApiParserParser) Spec() (localctx ISpecContext) {
 			p.SyntaxLit()
 		}
 
-
 	case 2:
 		p.EnterOuterAlt(localctx, 2)
 		{
@@ -563,7 +551,6 @@ func (p *ApiParserParser) Spec() (localctx ISpecContext) {
 			p.ImportSpec()
 		}
 
-
 	case 3:
 		p.EnterOuterAlt(localctx, 3)
 		{
@@ -571,7 +558,6 @@ func (p *ApiParserParser) Spec() (localctx ISpecContext) {
 			p.InfoSpec()
 		}
 
-
 	case 4:
 		p.EnterOuterAlt(localctx, 4)
 		{
@@ -579,7 +565,6 @@ func (p *ApiParserParser) Spec() (localctx ISpecContext) {
 			p.TypeSpec()
 		}
 
-
 	case 5:
 		p.EnterOuterAlt(localctx, 5)
 		{
@@ -589,11 +574,9 @@ func (p *ApiParserParser) Spec() (localctx ISpecContext) {
 
 	}
 
-
 	return localctx
 }
 
-
 // ISyntaxLitContext is an interface to support dynamic dispatch.
 type ISyntaxLitContext interface {
 	antlr.ParserRuleContext
@@ -602,24 +585,22 @@ type ISyntaxLitContext interface {
 	GetParser() antlr.Parser
 
 	// GetSyntaxToken returns the syntaxToken token.
-	GetSyntaxToken() antlr.Token 
+	GetSyntaxToken() antlr.Token
 
 	// GetAssign returns the assign token.
-	GetAssign() antlr.Token 
+	GetAssign() antlr.Token
 
 	// GetVersion returns the version token.
-	GetVersion() antlr.Token 
-
+	GetVersion() antlr.Token
 
 	// SetSyntaxToken sets the syntaxToken token.
-	SetSyntaxToken(antlr.Token) 
+	SetSyntaxToken(antlr.Token)
 
 	// SetAssign sets the assign token.
-	SetAssign(antlr.Token) 
+	SetAssign(antlr.Token)
 
 	// SetVersion sets the version token.
-	SetVersion(antlr.Token) 
-
+	SetVersion(antlr.Token)
 
 	// IsSyntaxLitContext differentiates from other interfaces.
 	IsSyntaxLitContext()
@@ -627,14 +608,14 @@ type ISyntaxLitContext interface {
 
 type SyntaxLitContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser      antlr.Parser
 	syntaxToken antlr.Token
-	assign antlr.Token
-	version antlr.Token
+	assign      antlr.Token
+	version     antlr.Token
 }
 
 func NewEmptySyntaxLitContext() *SyntaxLitContext {
-	var p = new(SyntaxLitContext)
+	p := new(SyntaxLitContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_syntaxLit
 	return p
@@ -643,7 +624,7 @@ func NewEmptySyntaxLitContext() *SyntaxLitContext {
 func (*SyntaxLitContext) IsSyntaxLitContext() {}
 
 func NewSyntaxLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SyntaxLitContext {
-	var p = new(SyntaxLitContext)
+	p := new(SyntaxLitContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -652,3 +633,4 @@ func NewSyntaxLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, in
 
 	return p
 }
+

+ 27 - 74
tools/goctl/api/parser/g4/gen/api/apiparser_parser1.go

@@ -18,14 +18,12 @@ func (s *SyntaxLitContext) GetAssign() antlr.Token { return s.assign }
 
 func (s *SyntaxLitContext) GetVersion() antlr.Token { return s.version }
 
-
 func (s *SyntaxLitContext) SetSyntaxToken(v antlr.Token) { s.syntaxToken = v }
 
 func (s *SyntaxLitContext) SetAssign(v antlr.Token) { s.assign = v }
 
 func (s *SyntaxLitContext) SetVersion(v antlr.Token) { s.version = v }
 
-
 func (s *SyntaxLitContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
@@ -42,7 +40,6 @@ func (s *SyntaxLitContext) ToStringTree(ruleNames []string, recog antlr.Recogniz
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *SyntaxLitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -53,9 +50,6 @@ func (s *SyntaxLitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) SyntaxLit() (localctx ISyntaxLitContext) {
 	localctx = NewSyntaxLitContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 4, ApiParserParserRULE_syntaxLit)
@@ -77,18 +71,18 @@ func (p *ApiParserParser) SyntaxLit() (localctx ISyntaxLitContext) {
 	}()
 
 	p.EnterOuterAlt(localctx, 1)
-	match(p,"syntax")
+	match(p, "syntax")
 	{
 		p.SetState(88)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*SyntaxLitContext).syntaxToken = _m
 	}
 	{
 		p.SetState(89)
 
-		var _m = p.Match(ApiParserParserT__0)
+		_m := p.Match(ApiParserParserT__0)
 
 		localctx.(*SyntaxLitContext).assign = _m
 	}
@@ -96,17 +90,14 @@ func (p *ApiParserParser) SyntaxLit() (localctx ISyntaxLitContext) {
 	{
 		p.SetState(91)
 
-		var _m = p.Match(ApiParserParserSTRING)
+		_m := p.Match(ApiParserParserSTRING)
 
 		localctx.(*SyntaxLitContext).version = _m
 	}
 
-
-
 	return localctx
 }
 
-
 // IImportSpecContext is an interface to support dynamic dispatch.
 type IImportSpecContext interface {
 	antlr.ParserRuleContext
@@ -124,7 +115,7 @@ type ImportSpecContext struct {
 }
 
 func NewEmptyImportSpecContext() *ImportSpecContext {
-	var p = new(ImportSpecContext)
+	p := new(ImportSpecContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_importSpec
 	return p
@@ -133,7 +124,7 @@ func NewEmptyImportSpecContext() *ImportSpecContext {
 func (*ImportSpecContext) IsImportSpecContext() {}
 
 func NewImportSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportSpecContext {
-	var p = new(ImportSpecContext)
+	p := new(ImportSpecContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -146,7 +137,7 @@ func NewImportSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext, i
 func (s *ImportSpecContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *ImportSpecContext) ImportLit() IImportLitContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportLitContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IImportLitContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -156,7 +147,7 @@ func (s *ImportSpecContext) ImportLit() IImportLitContext {
 }
 
 func (s *ImportSpecContext) ImportBlock() IImportBlockContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportBlockContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IImportBlockContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -173,7 +164,6 @@ func (s *ImportSpecContext) ToStringTree(ruleNames []string, recog antlr.Recogni
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ImportSpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -184,9 +174,6 @@ func (s *ImportSpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ImportSpec() (localctx IImportSpecContext) {
 	localctx = NewImportSpecContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 6, ApiParserParserRULE_importSpec)
@@ -217,7 +204,6 @@ func (p *ApiParserParser) ImportSpec() (localctx IImportSpecContext) {
 			p.ImportLit()
 		}
 
-
 	case 2:
 		p.EnterOuterAlt(localctx, 2)
 		{
@@ -227,11 +213,9 @@ func (p *ApiParserParser) ImportSpec() (localctx IImportSpecContext) {
 
 	}
 
-
 	return localctx
 }
 
-
 // IImportLitContext is an interface to support dynamic dispatch.
 type IImportLitContext interface {
 	antlr.ParserRuleContext
@@ -242,23 +226,21 @@ type IImportLitContext interface {
 	// GetImportToken returns the importToken token.
 	GetImportToken() antlr.Token
 
-
 	// SetImportToken sets the importToken token.
 	SetImportToken(antlr.Token)
 
-
 	// IsImportLitContext differentiates from other interfaces.
 	IsImportLitContext()
 }
 
 type ImportLitContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser      antlr.Parser
 	importToken antlr.Token
 }
 
 func NewEmptyImportLitContext() *ImportLitContext {
-	var p = new(ImportLitContext)
+	p := new(ImportLitContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_importLit
 	return p
@@ -267,7 +249,7 @@ func NewEmptyImportLitContext() *ImportLitContext {
 func (*ImportLitContext) IsImportLitContext() {}
 
 func NewImportLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportLitContext {
-	var p = new(ImportLitContext)
+	p := new(ImportLitContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -281,12 +263,10 @@ func (s *ImportLitContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *ImportLitContext) GetImportToken() antlr.Token { return s.importToken }
 
-
 func (s *ImportLitContext) SetImportToken(v antlr.Token) { s.importToken = v }
 
-
 func (s *ImportLitContext) ImportValue() IImportValueContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportValueContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IImportValueContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -307,7 +287,6 @@ func (s *ImportLitContext) ToStringTree(ruleNames []string, recog antlr.Recogniz
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ImportLitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -318,9 +297,6 @@ func (s *ImportLitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ImportLit() (localctx IImportLitContext) {
 	localctx = NewImportLitContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 8, ApiParserParserRULE_importLit)
@@ -342,11 +318,11 @@ func (p *ApiParserParser) ImportLit() (localctx IImportLitContext) {
 	}()
 
 	p.EnterOuterAlt(localctx, 1)
-	match(p,"import")
+	match(p, "import")
 	{
 		p.SetState(98)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*ImportLitContext).importToken = _m
 	}
@@ -355,12 +331,9 @@ func (p *ApiParserParser) ImportLit() (localctx IImportLitContext) {
 		p.ImportValue()
 	}
 
-
-
 	return localctx
 }
 
-
 // IImportBlockContext is an interface to support dynamic dispatch.
 type IImportBlockContext interface {
 	antlr.ParserRuleContext
@@ -371,23 +344,21 @@ type IImportBlockContext interface {
 	// GetImportToken returns the importToken token.
 	GetImportToken() antlr.Token
 
-
 	// SetImportToken sets the importToken token.
 	SetImportToken(antlr.Token)
 
-
 	// IsImportBlockContext differentiates from other interfaces.
 	IsImportBlockContext()
 }
 
 type ImportBlockContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser      antlr.Parser
 	importToken antlr.Token
 }
 
 func NewEmptyImportBlockContext() *ImportBlockContext {
-	var p = new(ImportBlockContext)
+	p := new(ImportBlockContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_importBlock
 	return p
@@ -396,7 +367,7 @@ func NewEmptyImportBlockContext() *ImportBlockContext {
 func (*ImportBlockContext) IsImportBlockContext() {}
 
 func NewImportBlockContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportBlockContext {
-	var p = new(ImportBlockContext)
+	p := new(ImportBlockContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -410,17 +381,15 @@ func (s *ImportBlockContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *ImportBlockContext) GetImportToken() antlr.Token { return s.importToken }
 
-
 func (s *ImportBlockContext) SetImportToken(v antlr.Token) { s.importToken = v }
 
-
 func (s *ImportBlockContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
 
 func (s *ImportBlockContext) AllImportBlockValue() []IImportBlockValueContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IImportBlockValueContext)(nil)).Elem())
-	var tst = make([]IImportBlockValueContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*IImportBlockValueContext)(nil)).Elem())
+	tst := make([]IImportBlockValueContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -432,7 +401,7 @@ func (s *ImportBlockContext) AllImportBlockValue() []IImportBlockValueContext {
 }
 
 func (s *ImportBlockContext) ImportBlockValue(i int) IImportBlockValueContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportBlockValueContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IImportBlockValueContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -449,7 +418,6 @@ func (s *ImportBlockContext) ToStringTree(ruleNames []string, recog antlr.Recogn
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ImportBlockContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -460,15 +428,11 @@ func (s *ImportBlockContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ImportBlock() (localctx IImportBlockContext) {
 	localctx = NewImportBlockContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 10, ApiParserParserRULE_importBlock)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -486,11 +450,11 @@ func (p *ApiParserParser) ImportBlock() (localctx IImportBlockContext) {
 	}()
 
 	p.EnterOuterAlt(localctx, 1)
-	match(p,"import")
+	match(p, "import")
 	{
 		p.SetState(102)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*ImportBlockContext).importToken = _m
 	}
@@ -507,7 +471,6 @@ func (p *ApiParserParser) ImportBlock() (localctx IImportBlockContext) {
 			p.ImportBlockValue()
 		}
 
-
 		p.SetState(107)
 		p.GetErrorHandler().Sync(p)
 		_la = p.GetTokenStream().LA(1)
@@ -517,12 +480,9 @@ func (p *ApiParserParser) ImportBlock() (localctx IImportBlockContext) {
 		p.Match(ApiParserParserT__2)
 	}
 
-
-
 	return localctx
 }
 
-
 // IImportBlockValueContext is an interface to support dynamic dispatch.
 type IImportBlockValueContext interface {
 	antlr.ParserRuleContext
@@ -540,7 +500,7 @@ type ImportBlockValueContext struct {
 }
 
 func NewEmptyImportBlockValueContext() *ImportBlockValueContext {
-	var p = new(ImportBlockValueContext)
+	p := new(ImportBlockValueContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_importBlockValue
 	return p
@@ -549,7 +509,7 @@ func NewEmptyImportBlockValueContext() *ImportBlockValueContext {
 func (*ImportBlockValueContext) IsImportBlockValueContext() {}
 
 func NewImportBlockValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportBlockValueContext {
-	var p = new(ImportBlockValueContext)
+	p := new(ImportBlockValueContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -562,7 +522,7 @@ func NewImportBlockValueContext(parser antlr.Parser, parent antlr.ParserRuleCont
 func (s *ImportBlockValueContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *ImportBlockValueContext) ImportValue() IImportValueContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IImportValueContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IImportValueContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -579,7 +539,6 @@ func (s *ImportBlockValueContext) ToStringTree(ruleNames []string, recog antlr.R
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ImportBlockValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -590,9 +549,6 @@ func (s *ImportBlockValueContext) Accept(visitor antlr.ParseTreeVisitor) interfa
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ImportBlockValue() (localctx IImportBlockValueContext) {
 	localctx = NewImportBlockValueContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 12, ApiParserParserRULE_importBlockValue)
@@ -619,12 +575,9 @@ func (p *ApiParserParser) ImportBlockValue() (localctx IImportBlockValueContext)
 		p.ImportValue()
 	}
 
-
-
 	return localctx
 }
 
-
 // IImportValueContext is an interface to support dynamic dispatch.
 type IImportValueContext interface {
 	antlr.ParserRuleContext
@@ -642,7 +595,7 @@ type ImportValueContext struct {
 }
 
 func NewEmptyImportValueContext() *ImportValueContext {
-	var p = new(ImportValueContext)
+	p := new(ImportValueContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_importValue
 	return p
@@ -651,7 +604,7 @@ func NewEmptyImportValueContext() *ImportValueContext {
 func (*ImportValueContext) IsImportValueContext() {}
 
 func NewImportValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ImportValueContext {
-	var p = new(ImportValueContext)
+	p := new(ImportValueContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 

+ 48 - 99
tools/goctl/api/parser/g4/gen/api/apiparser_parser2.go

@@ -24,7 +24,6 @@ func (s *ImportValueContext) ToStringTree(ruleNames []string, recog antlr.Recogn
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ImportValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -35,9 +34,6 @@ func (s *ImportValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ImportValue() (localctx IImportValueContext) {
 	localctx = NewImportValueContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 14, ApiParserParserRULE_importValue)
@@ -65,12 +61,9 @@ func (p *ApiParserParser) ImportValue() (localctx IImportValueContext) {
 		p.Match(ApiParserParserSTRING)
 	}
 
-
-
 	return localctx
 }
 
-
 // IInfoSpecContext is an interface to support dynamic dispatch.
 type IInfoSpecContext interface {
 	antlr.ParserRuleContext
@@ -79,24 +72,22 @@ type IInfoSpecContext interface {
 	GetParser() antlr.Parser
 
 	// GetInfoToken returns the infoToken token.
-	GetInfoToken() antlr.Token 
+	GetInfoToken() antlr.Token
 
 	// GetLp returns the lp token.
-	GetLp() antlr.Token 
+	GetLp() antlr.Token
 
 	// GetRp returns the rp token.
-	GetRp() antlr.Token 
-
+	GetRp() antlr.Token
 
 	// SetInfoToken sets the infoToken token.
-	SetInfoToken(antlr.Token) 
+	SetInfoToken(antlr.Token)
 
 	// SetLp sets the lp token.
-	SetLp(antlr.Token) 
+	SetLp(antlr.Token)
 
 	// SetRp sets the rp token.
-	SetRp(antlr.Token) 
-
+	SetRp(antlr.Token)
 
 	// IsInfoSpecContext differentiates from other interfaces.
 	IsInfoSpecContext()
@@ -104,14 +95,14 @@ type IInfoSpecContext interface {
 
 type InfoSpecContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser    antlr.Parser
 	infoToken antlr.Token
-	lp antlr.Token
-	rp antlr.Token
+	lp        antlr.Token
+	rp        antlr.Token
 }
 
 func NewEmptyInfoSpecContext() *InfoSpecContext {
-	var p = new(InfoSpecContext)
+	p := new(InfoSpecContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_infoSpec
 	return p
@@ -120,7 +111,7 @@ func NewEmptyInfoSpecContext() *InfoSpecContext {
 func (*InfoSpecContext) IsInfoSpecContext() {}
 
 func NewInfoSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *InfoSpecContext {
-	var p = new(InfoSpecContext)
+	p := new(InfoSpecContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -138,21 +129,19 @@ func (s *InfoSpecContext) GetLp() antlr.Token { return s.lp }
 
 func (s *InfoSpecContext) GetRp() antlr.Token { return s.rp }
 
-
 func (s *InfoSpecContext) SetInfoToken(v antlr.Token) { s.infoToken = v }
 
 func (s *InfoSpecContext) SetLp(v antlr.Token) { s.lp = v }
 
 func (s *InfoSpecContext) SetRp(v antlr.Token) { s.rp = v }
 
-
 func (s *InfoSpecContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
 
 func (s *InfoSpecContext) AllKvLit() []IKvLitContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IKvLitContext)(nil)).Elem())
-	var tst = make([]IKvLitContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*IKvLitContext)(nil)).Elem())
+	tst := make([]IKvLitContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -164,7 +153,7 @@ func (s *InfoSpecContext) AllKvLit() []IKvLitContext {
 }
 
 func (s *InfoSpecContext) KvLit(i int) IKvLitContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IKvLitContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IKvLitContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -181,7 +170,6 @@ func (s *InfoSpecContext) ToStringTree(ruleNames []string, recog antlr.Recognize
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *InfoSpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -192,15 +180,11 @@ func (s *InfoSpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) InfoSpec() (localctx IInfoSpecContext) {
 	localctx = NewInfoSpecContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 16, ApiParserParserRULE_infoSpec)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -218,18 +202,18 @@ func (p *ApiParserParser) InfoSpec() (localctx IInfoSpecContext) {
 	}()
 
 	p.EnterOuterAlt(localctx, 1)
-	match(p,"info")
+	match(p, "info")
 	{
 		p.SetState(117)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*InfoSpecContext).infoToken = _m
 	}
 	{
 		p.SetState(118)
 
-		var _m = p.Match(ApiParserParserT__1)
+		_m := p.Match(ApiParserParserT__1)
 
 		localctx.(*InfoSpecContext).lp = _m
 	}
@@ -242,7 +226,6 @@ func (p *ApiParserParser) InfoSpec() (localctx IInfoSpecContext) {
 			p.KvLit()
 		}
 
-
 		p.SetState(122)
 		p.GetErrorHandler().Sync(p)
 		_la = p.GetTokenStream().LA(1)
@@ -250,17 +233,14 @@ func (p *ApiParserParser) InfoSpec() (localctx IInfoSpecContext) {
 	{
 		p.SetState(124)
 
-		var _m = p.Match(ApiParserParserT__2)
+		_m := p.Match(ApiParserParserT__2)
 
 		localctx.(*InfoSpecContext).rp = _m
 	}
 
-
-
 	return localctx
 }
 
-
 // ITypeSpecContext is an interface to support dynamic dispatch.
 type ITypeSpecContext interface {
 	antlr.ParserRuleContext
@@ -278,7 +258,7 @@ type TypeSpecContext struct {
 }
 
 func NewEmptyTypeSpecContext() *TypeSpecContext {
-	var p = new(TypeSpecContext)
+	p := new(TypeSpecContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeSpec
 	return p
@@ -287,7 +267,7 @@ func NewEmptyTypeSpecContext() *TypeSpecContext {
 func (*TypeSpecContext) IsTypeSpecContext() {}
 
 func NewTypeSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeSpecContext {
-	var p = new(TypeSpecContext)
+	p := new(TypeSpecContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -300,7 +280,7 @@ func NewTypeSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext, inv
 func (s *TypeSpecContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *TypeSpecContext) TypeLit() ITypeLitContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeLitContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeLitContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -310,7 +290,7 @@ func (s *TypeSpecContext) TypeLit() ITypeLitContext {
 }
 
 func (s *TypeSpecContext) TypeBlock() ITypeBlockContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeBlockContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeBlockContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -327,7 +307,6 @@ func (s *TypeSpecContext) ToStringTree(ruleNames []string, recog antlr.Recognize
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeSpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -338,9 +317,6 @@ func (s *TypeSpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeSpec() (localctx ITypeSpecContext) {
 	localctx = NewTypeSpecContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 18, ApiParserParserRULE_typeSpec)
@@ -371,7 +347,6 @@ func (p *ApiParserParser) TypeSpec() (localctx ITypeSpecContext) {
 			p.TypeLit()
 		}
 
-
 	case 2:
 		p.EnterOuterAlt(localctx, 2)
 		{
@@ -381,11 +356,9 @@ func (p *ApiParserParser) TypeSpec() (localctx ITypeSpecContext) {
 
 	}
 
-
 	return localctx
 }
 
-
 // ITypeLitContext is an interface to support dynamic dispatch.
 type ITypeLitContext interface {
 	antlr.ParserRuleContext
@@ -394,12 +367,10 @@ type ITypeLitContext interface {
 	GetParser() antlr.Parser
 
 	// GetTypeToken returns the typeToken token.
-	GetTypeToken() antlr.Token 
-
+	GetTypeToken() antlr.Token
 
 	// SetTypeToken sets the typeToken token.
-	SetTypeToken(antlr.Token) 
-
+	SetTypeToken(antlr.Token)
 
 	// IsTypeLitContext differentiates from other interfaces.
 	IsTypeLitContext()
@@ -407,12 +378,12 @@ type ITypeLitContext interface {
 
 type TypeLitContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser    antlr.Parser
 	typeToken antlr.Token
 }
 
 func NewEmptyTypeLitContext() *TypeLitContext {
-	var p = new(TypeLitContext)
+	p := new(TypeLitContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeLit
 	return p
@@ -421,7 +392,7 @@ func NewEmptyTypeLitContext() *TypeLitContext {
 func (*TypeLitContext) IsTypeLitContext() {}
 
 func NewTypeLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeLitContext {
-	var p = new(TypeLitContext)
+	p := new(TypeLitContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -435,12 +406,10 @@ func (s *TypeLitContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *TypeLitContext) GetTypeToken() antlr.Token { return s.typeToken }
 
-
 func (s *TypeLitContext) SetTypeToken(v antlr.Token) { s.typeToken = v }
 
-
 func (s *TypeLitContext) TypeLitBody() ITypeLitBodyContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeLitBodyContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeLitBodyContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -461,7 +430,6 @@ func (s *TypeLitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeLitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -472,9 +440,6 @@ func (s *TypeLitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeLit() (localctx ITypeLitContext) {
 	localctx = NewTypeLitContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 20, ApiParserParserRULE_typeLit)
@@ -496,11 +461,11 @@ func (p *ApiParserParser) TypeLit() (localctx ITypeLitContext) {
 	}()
 
 	p.EnterOuterAlt(localctx, 1)
-	match(p,"type")
+	match(p, "type")
 	{
 		p.SetState(131)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*TypeLitContext).typeToken = _m
 	}
@@ -509,12 +474,9 @@ func (p *ApiParserParser) TypeLit() (localctx ITypeLitContext) {
 		p.TypeLitBody()
 	}
 
-
-
 	return localctx
 }
 
-
 // ITypeBlockContext is an interface to support dynamic dispatch.
 type ITypeBlockContext interface {
 	antlr.ParserRuleContext
@@ -523,24 +485,22 @@ type ITypeBlockContext interface {
 	GetParser() antlr.Parser
 
 	// GetTypeToken returns the typeToken token.
-	GetTypeToken() antlr.Token 
+	GetTypeToken() antlr.Token
 
 	// GetLp returns the lp token.
-	GetLp() antlr.Token 
+	GetLp() antlr.Token
 
 	// GetRp returns the rp token.
-	GetRp() antlr.Token 
-
+	GetRp() antlr.Token
 
 	// SetTypeToken sets the typeToken token.
-	SetTypeToken(antlr.Token) 
+	SetTypeToken(antlr.Token)
 
 	// SetLp sets the lp token.
-	SetLp(antlr.Token) 
+	SetLp(antlr.Token)
 
 	// SetRp sets the rp token.
-	SetRp(antlr.Token) 
-
+	SetRp(antlr.Token)
 
 	// IsTypeBlockContext differentiates from other interfaces.
 	IsTypeBlockContext()
@@ -548,14 +508,14 @@ type ITypeBlockContext interface {
 
 type TypeBlockContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser    antlr.Parser
 	typeToken antlr.Token
-	lp antlr.Token
-	rp antlr.Token
+	lp        antlr.Token
+	rp        antlr.Token
 }
 
 func NewEmptyTypeBlockContext() *TypeBlockContext {
-	var p = new(TypeBlockContext)
+	p := new(TypeBlockContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeBlock
 	return p
@@ -564,7 +524,7 @@ func NewEmptyTypeBlockContext() *TypeBlockContext {
 func (*TypeBlockContext) IsTypeBlockContext() {}
 
 func NewTypeBlockContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeBlockContext {
-	var p = new(TypeBlockContext)
+	p := new(TypeBlockContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -582,21 +542,19 @@ func (s *TypeBlockContext) GetLp() antlr.Token { return s.lp }
 
 func (s *TypeBlockContext) GetRp() antlr.Token { return s.rp }
 
-
 func (s *TypeBlockContext) SetTypeToken(v antlr.Token) { s.typeToken = v }
 
 func (s *TypeBlockContext) SetLp(v antlr.Token) { s.lp = v }
 
 func (s *TypeBlockContext) SetRp(v antlr.Token) { s.rp = v }
 
-
 func (s *TypeBlockContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
 
 func (s *TypeBlockContext) AllTypeBlockBody() []ITypeBlockBodyContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*ITypeBlockBodyContext)(nil)).Elem())
-	var tst = make([]ITypeBlockBodyContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*ITypeBlockBodyContext)(nil)).Elem())
+	tst := make([]ITypeBlockBodyContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -608,7 +566,7 @@ func (s *TypeBlockContext) AllTypeBlockBody() []ITypeBlockBodyContext {
 }
 
 func (s *TypeBlockContext) TypeBlockBody(i int) ITypeBlockBodyContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeBlockBodyContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeBlockBodyContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -625,7 +583,6 @@ func (s *TypeBlockContext) ToStringTree(ruleNames []string, recog antlr.Recogniz
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeBlockContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -636,15 +593,11 @@ func (s *TypeBlockContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeBlock() (localctx ITypeBlockContext) {
 	localctx = NewTypeBlockContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 22, ApiParserParserRULE_typeBlock)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -662,18 +615,18 @@ func (p *ApiParserParser) TypeBlock() (localctx ITypeBlockContext) {
 	}()
 
 	p.EnterOuterAlt(localctx, 1)
-	match(p,"type")
+	match(p, "type")
 	{
 		p.SetState(135)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*TypeBlockContext).typeToken = _m
 	}
 	{
 		p.SetState(136)
 
-		var _m = p.Match(ApiParserParserT__1)
+		_m := p.Match(ApiParserParserT__1)
 
 		localctx.(*TypeBlockContext).lp = _m
 	}
@@ -681,14 +634,12 @@ func (p *ApiParserParser) TypeBlock() (localctx ITypeBlockContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	for _la == ApiParserParserID {
 		{
 			p.SetState(137)
 			p.TypeBlockBody()
 		}
 
-
 		p.SetState(142)
 		p.GetErrorHandler().Sync(p)
 		_la = p.GetTokenStream().LA(1)
@@ -696,12 +647,10 @@ func (p *ApiParserParser) TypeBlock() (localctx ITypeBlockContext) {
 	{
 		p.SetState(143)
 
-		var _m = p.Match(ApiParserParserT__2)
+		_m := p.Match(ApiParserParserT__2)
 
 		localctx.(*TypeBlockContext).rp = _m
 	}
 
-
-
 	return localctx
 }

+ 47 - 94
tools/goctl/api/parser/g4/gen/api/apiparser_parser3.go

@@ -10,7 +10,6 @@ import (
 // The apiparser_parser.go file was split into multiple files because it
 // was too large and caused a possible memory overflow during goctl installation.
 
-
 // ITypeLitBodyContext is an interface to support dynamic dispatch.
 type ITypeLitBodyContext interface {
 	antlr.ParserRuleContext
@@ -28,7 +27,7 @@ type TypeLitBodyContext struct {
 }
 
 func NewEmptyTypeLitBodyContext() *TypeLitBodyContext {
-	var p = new(TypeLitBodyContext)
+	p := new(TypeLitBodyContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeLitBody
 	return p
@@ -37,7 +36,7 @@ func NewEmptyTypeLitBodyContext() *TypeLitBodyContext {
 func (*TypeLitBodyContext) IsTypeLitBodyContext() {}
 
 func NewTypeLitBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeLitBodyContext {
-	var p = new(TypeLitBodyContext)
+	p := new(TypeLitBodyContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -50,7 +49,7 @@ func NewTypeLitBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext,
 func (s *TypeLitBodyContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *TypeLitBodyContext) TypeStruct() ITypeStructContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeStructContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeStructContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -60,7 +59,7 @@ func (s *TypeLitBodyContext) TypeStruct() ITypeStructContext {
 }
 
 func (s *TypeLitBodyContext) TypeAlias() ITypeAliasContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeAliasContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeAliasContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -77,7 +76,6 @@ func (s *TypeLitBodyContext) ToStringTree(ruleNames []string, recog antlr.Recogn
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeLitBodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -88,9 +86,6 @@ func (s *TypeLitBodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeLitBody() (localctx ITypeLitBodyContext) {
 	localctx = NewTypeLitBodyContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 24, ApiParserParserRULE_typeLitBody)
@@ -121,7 +116,6 @@ func (p *ApiParserParser) TypeLitBody() (localctx ITypeLitBodyContext) {
 			p.TypeStruct()
 		}
 
-
 	case 2:
 		p.EnterOuterAlt(localctx, 2)
 		{
@@ -131,11 +125,9 @@ func (p *ApiParserParser) TypeLitBody() (localctx ITypeLitBodyContext) {
 
 	}
 
-
 	return localctx
 }
 
-
 // ITypeBlockBodyContext is an interface to support dynamic dispatch.
 type ITypeBlockBodyContext interface {
 	antlr.ParserRuleContext
@@ -153,7 +145,7 @@ type TypeBlockBodyContext struct {
 }
 
 func NewEmptyTypeBlockBodyContext() *TypeBlockBodyContext {
-	var p = new(TypeBlockBodyContext)
+	p := new(TypeBlockBodyContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeBlockBody
 	return p
@@ -162,7 +154,7 @@ func NewEmptyTypeBlockBodyContext() *TypeBlockBodyContext {
 func (*TypeBlockBodyContext) IsTypeBlockBodyContext() {}
 
 func NewTypeBlockBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeBlockBodyContext {
-	var p = new(TypeBlockBodyContext)
+	p := new(TypeBlockBodyContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -175,7 +167,7 @@ func NewTypeBlockBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext
 func (s *TypeBlockBodyContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *TypeBlockBodyContext) TypeBlockStruct() ITypeBlockStructContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeBlockStructContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeBlockStructContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -185,7 +177,7 @@ func (s *TypeBlockBodyContext) TypeBlockStruct() ITypeBlockStructContext {
 }
 
 func (s *TypeBlockBodyContext) TypeBlockAlias() ITypeBlockAliasContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeBlockAliasContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeBlockAliasContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -202,7 +194,6 @@ func (s *TypeBlockBodyContext) ToStringTree(ruleNames []string, recog antlr.Reco
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeBlockBodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -213,9 +204,6 @@ func (s *TypeBlockBodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeBlockBody() (localctx ITypeBlockBodyContext) {
 	localctx = NewTypeBlockBodyContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 26, ApiParserParserRULE_typeBlockBody)
@@ -246,7 +234,6 @@ func (p *ApiParserParser) TypeBlockBody() (localctx ITypeBlockBodyContext) {
 			p.TypeBlockStruct()
 		}
 
-
 	case 2:
 		p.EnterOuterAlt(localctx, 2)
 		{
@@ -256,11 +243,9 @@ func (p *ApiParserParser) TypeBlockBody() (localctx ITypeBlockBodyContext) {
 
 	}
 
-
 	return localctx
 }
 
-
 // ITypeStructContext is an interface to support dynamic dispatch.
 type ITypeStructContext interface {
 	antlr.ParserRuleContext
@@ -269,30 +254,28 @@ type ITypeStructContext interface {
 	GetParser() antlr.Parser
 
 	// GetStructName returns the structName token.
-	GetStructName() antlr.Token 
+	GetStructName() antlr.Token
 
 	// GetStructToken returns the structToken token.
-	GetStructToken() antlr.Token 
+	GetStructToken() antlr.Token
 
 	// GetLbrace returns the lbrace token.
-	GetLbrace() antlr.Token 
+	GetLbrace() antlr.Token
 
 	// GetRbrace returns the rbrace token.
-	GetRbrace() antlr.Token 
-
+	GetRbrace() antlr.Token
 
 	// SetStructName sets the structName token.
-	SetStructName(antlr.Token) 
+	SetStructName(antlr.Token)
 
 	// SetStructToken sets the structToken token.
-	SetStructToken(antlr.Token) 
+	SetStructToken(antlr.Token)
 
 	// SetLbrace sets the lbrace token.
-	SetLbrace(antlr.Token) 
+	SetLbrace(antlr.Token)
 
 	// SetRbrace sets the rbrace token.
-	SetRbrace(antlr.Token) 
-
+	SetRbrace(antlr.Token)
 
 	// IsTypeStructContext differentiates from other interfaces.
 	IsTypeStructContext()
@@ -300,15 +283,15 @@ type ITypeStructContext interface {
 
 type TypeStructContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
-	structName antlr.Token
+	parser      antlr.Parser
+	structName  antlr.Token
 	structToken antlr.Token
-	lbrace antlr.Token
-	rbrace antlr.Token
+	lbrace      antlr.Token
+	rbrace      antlr.Token
 }
 
 func NewEmptyTypeStructContext() *TypeStructContext {
-	var p = new(TypeStructContext)
+	p := new(TypeStructContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeStruct
 	return p
@@ -317,7 +300,7 @@ func NewEmptyTypeStructContext() *TypeStructContext {
 func (*TypeStructContext) IsTypeStructContext() {}
 
 func NewTypeStructContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeStructContext {
-	var p = new(TypeStructContext)
+	p := new(TypeStructContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -337,7 +320,6 @@ func (s *TypeStructContext) GetLbrace() antlr.Token { return s.lbrace }
 
 func (s *TypeStructContext) GetRbrace() antlr.Token { return s.rbrace }
 
-
 func (s *TypeStructContext) SetStructName(v antlr.Token) { s.structName = v }
 
 func (s *TypeStructContext) SetStructToken(v antlr.Token) { s.structToken = v }
@@ -346,7 +328,6 @@ func (s *TypeStructContext) SetLbrace(v antlr.Token) { s.lbrace = v }
 
 func (s *TypeStructContext) SetRbrace(v antlr.Token) { s.rbrace = v }
 
-
 func (s *TypeStructContext) AllID() []antlr.TerminalNode {
 	return s.GetTokens(ApiParserParserID)
 }
@@ -356,8 +337,8 @@ func (s *TypeStructContext) ID(i int) antlr.TerminalNode {
 }
 
 func (s *TypeStructContext) AllField() []IFieldContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IFieldContext)(nil)).Elem())
-	var tst = make([]IFieldContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*IFieldContext)(nil)).Elem())
+	tst := make([]IFieldContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -369,7 +350,7 @@ func (s *TypeStructContext) AllField() []IFieldContext {
 }
 
 func (s *TypeStructContext) Field(i int) IFieldContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFieldContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IFieldContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -386,7 +367,6 @@ func (s *TypeStructContext) ToStringTree(ruleNames []string, recog antlr.Recogni
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeStructContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -397,15 +377,11 @@ func (s *TypeStructContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeStruct() (localctx ITypeStructContext) {
 	localctx = NewTypeStructContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 28, ApiParserParserRULE_typeStruct)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -429,7 +405,7 @@ func (p *ApiParserParser) TypeStruct() (localctx ITypeStructContext) {
 	{
 		p.SetState(154)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*TypeStructContext).structName = _m
 	}
@@ -437,21 +413,19 @@ func (p *ApiParserParser) TypeStruct() (localctx ITypeStructContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserID {
 		{
 			p.SetState(155)
 
-			var _m = p.Match(ApiParserParserID)
+			_m := p.Match(ApiParserParserID)
 
 			localctx.(*TypeStructContext).structToken = _m
 		}
-
 	}
 	{
 		p.SetState(158)
 
-		var _m = p.Match(ApiParserParserT__3)
+		_m := p.Match(ApiParserParserT__3)
 
 		localctx.(*TypeStructContext).lbrace = _m
 	}
@@ -465,8 +439,6 @@ func (p *ApiParserParser) TypeStruct() (localctx ITypeStructContext) {
 				p.SetState(159)
 				p.Field()
 			}
-
-
 		}
 		p.SetState(164)
 		p.GetErrorHandler().Sync(p)
@@ -475,17 +447,14 @@ func (p *ApiParserParser) TypeStruct() (localctx ITypeStructContext) {
 	{
 		p.SetState(165)
 
-		var _m = p.Match(ApiParserParserT__4)
+		_m := p.Match(ApiParserParserT__4)
 
 		localctx.(*TypeStructContext).rbrace = _m
 	}
 
-
-
 	return localctx
 }
 
-
 // ITypeAliasContext is an interface to support dynamic dispatch.
 type ITypeAliasContext interface {
 	antlr.ParserRuleContext
@@ -494,18 +463,16 @@ type ITypeAliasContext interface {
 	GetParser() antlr.Parser
 
 	// GetAlias returns the alias token.
-	GetAlias() antlr.Token 
+	GetAlias() antlr.Token
 
 	// GetAssign returns the assign token.
-	GetAssign() antlr.Token 
-
+	GetAssign() antlr.Token
 
 	// SetAlias sets the alias token.
-	SetAlias(antlr.Token) 
+	SetAlias(antlr.Token)
 
 	// SetAssign sets the assign token.
-	SetAssign(antlr.Token) 
-
+	SetAssign(antlr.Token)
 
 	// IsTypeAliasContext differentiates from other interfaces.
 	IsTypeAliasContext()
@@ -514,12 +481,12 @@ type ITypeAliasContext interface {
 type TypeAliasContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	alias antlr.Token
+	alias  antlr.Token
 	assign antlr.Token
 }
 
 func NewEmptyTypeAliasContext() *TypeAliasContext {
-	var p = new(TypeAliasContext)
+	p := new(TypeAliasContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeAlias
 	return p
@@ -528,7 +495,7 @@ func NewEmptyTypeAliasContext() *TypeAliasContext {
 func (*TypeAliasContext) IsTypeAliasContext() {}
 
 func NewTypeAliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeAliasContext {
-	var p = new(TypeAliasContext)
+	p := new(TypeAliasContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -544,14 +511,12 @@ func (s *TypeAliasContext) GetAlias() antlr.Token { return s.alias }
 
 func (s *TypeAliasContext) GetAssign() antlr.Token { return s.assign }
 
-
 func (s *TypeAliasContext) SetAlias(v antlr.Token) { s.alias = v }
 
 func (s *TypeAliasContext) SetAssign(v antlr.Token) { s.assign = v }
 
-
 func (s *TypeAliasContext) DataType() IDataTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -572,7 +537,6 @@ func (s *TypeAliasContext) ToStringTree(ruleNames []string, recog antlr.Recogniz
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeAliasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -583,15 +547,11 @@ func (s *TypeAliasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeAlias() (localctx ITypeAliasContext) {
 	localctx = NewTypeAliasContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 30, ApiParserParserRULE_typeAlias)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -613,7 +573,7 @@ func (p *ApiParserParser) TypeAlias() (localctx ITypeAliasContext) {
 	{
 		p.SetState(168)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*TypeAliasContext).alias = _m
 	}
@@ -621,28 +581,23 @@ func (p *ApiParserParser) TypeAlias() (localctx ITypeAliasContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserT__0 {
 		{
 			p.SetState(169)
 
-			var _m = p.Match(ApiParserParserT__0)
+			_m := p.Match(ApiParserParserT__0)
 
 			localctx.(*TypeAliasContext).assign = _m
 		}
-
 	}
 	{
 		p.SetState(172)
 		p.DataType()
 	}
 
-
-
 	return localctx
 }
 
-
 // ITypeBlockStructContext is an interface to support dynamic dispatch.
 type ITypeBlockStructContext interface {
 	antlr.ParserRuleContext
@@ -651,30 +606,28 @@ type ITypeBlockStructContext interface {
 	GetParser() antlr.Parser
 
 	// GetStructName returns the structName token.
-	GetStructName() antlr.Token 
+	GetStructName() antlr.Token
 
 	// GetStructToken returns the structToken token.
-	GetStructToken() antlr.Token 
+	GetStructToken() antlr.Token
 
 	// GetLbrace returns the lbrace token.
-	GetLbrace() antlr.Token 
+	GetLbrace() antlr.Token
 
 	// GetRbrace returns the rbrace token.
-	GetRbrace() antlr.Token 
-
+	GetRbrace() antlr.Token
 
 	// SetStructName sets the structName token.
-	SetStructName(antlr.Token) 
+	SetStructName(antlr.Token)
 
 	// SetStructToken sets the structToken token.
-	SetStructToken(antlr.Token) 
+	SetStructToken(antlr.Token)
 
 	// SetLbrace sets the lbrace token.
-	SetLbrace(antlr.Token) 
+	SetLbrace(antlr.Token)
 
 	// SetRbrace sets the rbrace token.
-	SetRbrace(antlr.Token) 
-
+	SetRbrace(antlr.Token)
 
 	// IsTypeBlockStructContext differentiates from other interfaces.
 	IsTypeBlockStructContext()

+ 40 - 91
tools/goctl/api/parser/g4/gen/api/apiparser_parser4.go

@@ -12,15 +12,15 @@ import (
 
 type TypeBlockStructContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
-	structName antlr.Token
+	parser      antlr.Parser
+	structName  antlr.Token
 	structToken antlr.Token
-	lbrace antlr.Token
-	rbrace antlr.Token
+	lbrace      antlr.Token
+	rbrace      antlr.Token
 }
 
 func NewEmptyTypeBlockStructContext() *TypeBlockStructContext {
-	var p = new(TypeBlockStructContext)
+	p := new(TypeBlockStructContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeBlockStruct
 	return p
@@ -29,7 +29,7 @@ func NewEmptyTypeBlockStructContext() *TypeBlockStructContext {
 func (*TypeBlockStructContext) IsTypeBlockStructContext() {}
 
 func NewTypeBlockStructContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeBlockStructContext {
-	var p = new(TypeBlockStructContext)
+	p := new(TypeBlockStructContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -49,7 +49,6 @@ func (s *TypeBlockStructContext) GetLbrace() antlr.Token { return s.lbrace }
 
 func (s *TypeBlockStructContext) GetRbrace() antlr.Token { return s.rbrace }
 
-
 func (s *TypeBlockStructContext) SetStructName(v antlr.Token) { s.structName = v }
 
 func (s *TypeBlockStructContext) SetStructToken(v antlr.Token) { s.structToken = v }
@@ -58,7 +57,6 @@ func (s *TypeBlockStructContext) SetLbrace(v antlr.Token) { s.lbrace = v }
 
 func (s *TypeBlockStructContext) SetRbrace(v antlr.Token) { s.rbrace = v }
 
-
 func (s *TypeBlockStructContext) AllID() []antlr.TerminalNode {
 	return s.GetTokens(ApiParserParserID)
 }
@@ -68,8 +66,8 @@ func (s *TypeBlockStructContext) ID(i int) antlr.TerminalNode {
 }
 
 func (s *TypeBlockStructContext) AllField() []IFieldContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IFieldContext)(nil)).Elem())
-	var tst = make([]IFieldContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*IFieldContext)(nil)).Elem())
+	tst := make([]IFieldContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -81,7 +79,7 @@ func (s *TypeBlockStructContext) AllField() []IFieldContext {
 }
 
 func (s *TypeBlockStructContext) Field(i int) IFieldContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IFieldContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IFieldContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -98,7 +96,6 @@ func (s *TypeBlockStructContext) ToStringTree(ruleNames []string, recog antlr.Re
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeBlockStructContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -109,15 +106,11 @@ func (s *TypeBlockStructContext) Accept(visitor antlr.ParseTreeVisitor) interfac
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeBlockStruct() (localctx ITypeBlockStructContext) {
 	localctx = NewTypeBlockStructContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 32, ApiParserParserRULE_typeBlockStruct)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -141,7 +134,7 @@ func (p *ApiParserParser) TypeBlockStruct() (localctx ITypeBlockStructContext) {
 	{
 		p.SetState(175)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*TypeBlockStructContext).structName = _m
 	}
@@ -149,21 +142,19 @@ func (p *ApiParserParser) TypeBlockStruct() (localctx ITypeBlockStructContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserID {
 		{
 			p.SetState(176)
 
-			var _m = p.Match(ApiParserParserID)
+			_m := p.Match(ApiParserParserID)
 
 			localctx.(*TypeBlockStructContext).structToken = _m
 		}
-
 	}
 	{
 		p.SetState(179)
 
-		var _m = p.Match(ApiParserParserT__3)
+		_m := p.Match(ApiParserParserT__3)
 
 		localctx.(*TypeBlockStructContext).lbrace = _m
 	}
@@ -177,8 +168,6 @@ func (p *ApiParserParser) TypeBlockStruct() (localctx ITypeBlockStructContext) {
 				p.SetState(180)
 				p.Field()
 			}
-
-
 		}
 		p.SetState(185)
 		p.GetErrorHandler().Sync(p)
@@ -187,17 +176,14 @@ func (p *ApiParserParser) TypeBlockStruct() (localctx ITypeBlockStructContext) {
 	{
 		p.SetState(186)
 
-		var _m = p.Match(ApiParserParserT__4)
+		_m := p.Match(ApiParserParserT__4)
 
 		localctx.(*TypeBlockStructContext).rbrace = _m
 	}
 
-
-
 	return localctx
 }
 
-
 // ITypeBlockAliasContext is an interface to support dynamic dispatch.
 type ITypeBlockAliasContext interface {
 	antlr.ParserRuleContext
@@ -206,18 +192,16 @@ type ITypeBlockAliasContext interface {
 	GetParser() antlr.Parser
 
 	// GetAlias returns the alias token.
-	GetAlias() antlr.Token 
+	GetAlias() antlr.Token
 
 	// GetAssign returns the assign token.
-	GetAssign() antlr.Token 
-
+	GetAssign() antlr.Token
 
 	// SetAlias sets the alias token.
-	SetAlias(antlr.Token) 
+	SetAlias(antlr.Token)
 
 	// SetAssign sets the assign token.
-	SetAssign(antlr.Token) 
-
+	SetAssign(antlr.Token)
 
 	// IsTypeBlockAliasContext differentiates from other interfaces.
 	IsTypeBlockAliasContext()
@@ -226,12 +210,12 @@ type ITypeBlockAliasContext interface {
 type TypeBlockAliasContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	alias antlr.Token
+	alias  antlr.Token
 	assign antlr.Token
 }
 
 func NewEmptyTypeBlockAliasContext() *TypeBlockAliasContext {
-	var p = new(TypeBlockAliasContext)
+	p := new(TypeBlockAliasContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_typeBlockAlias
 	return p
@@ -240,7 +224,7 @@ func NewEmptyTypeBlockAliasContext() *TypeBlockAliasContext {
 func (*TypeBlockAliasContext) IsTypeBlockAliasContext() {}
 
 func NewTypeBlockAliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeBlockAliasContext {
-	var p = new(TypeBlockAliasContext)
+	p := new(TypeBlockAliasContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -256,14 +240,12 @@ func (s *TypeBlockAliasContext) GetAlias() antlr.Token { return s.alias }
 
 func (s *TypeBlockAliasContext) GetAssign() antlr.Token { return s.assign }
 
-
 func (s *TypeBlockAliasContext) SetAlias(v antlr.Token) { s.alias = v }
 
 func (s *TypeBlockAliasContext) SetAssign(v antlr.Token) { s.assign = v }
 
-
 func (s *TypeBlockAliasContext) DataType() IDataTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -284,7 +266,6 @@ func (s *TypeBlockAliasContext) ToStringTree(ruleNames []string, recog antlr.Rec
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *TypeBlockAliasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -295,15 +276,11 @@ func (s *TypeBlockAliasContext) Accept(visitor antlr.ParseTreeVisitor) interface
 	}
 }
 
-
-
-
 func (p *ApiParserParser) TypeBlockAlias() (localctx ITypeBlockAliasContext) {
 	localctx = NewTypeBlockAliasContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 34, ApiParserParserRULE_typeBlockAlias)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -325,7 +302,7 @@ func (p *ApiParserParser) TypeBlockAlias() (localctx ITypeBlockAliasContext) {
 	{
 		p.SetState(189)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*TypeBlockAliasContext).alias = _m
 	}
@@ -333,28 +310,23 @@ func (p *ApiParserParser) TypeBlockAlias() (localctx ITypeBlockAliasContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserT__0 {
 		{
 			p.SetState(190)
 
-			var _m = p.Match(ApiParserParserT__0)
+			_m := p.Match(ApiParserParserT__0)
 
 			localctx.(*TypeBlockAliasContext).assign = _m
 		}
-
 	}
 	{
 		p.SetState(193)
 		p.DataType()
 	}
 
-
-
 	return localctx
 }
 
-
 // IFieldContext is an interface to support dynamic dispatch.
 type IFieldContext interface {
 	antlr.ParserRuleContext
@@ -372,7 +344,7 @@ type FieldContext struct {
 }
 
 func NewEmptyFieldContext() *FieldContext {
-	var p = new(FieldContext)
+	p := new(FieldContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_field
 	return p
@@ -381,7 +353,7 @@ func NewEmptyFieldContext() *FieldContext {
 func (*FieldContext) IsFieldContext() {}
 
 func NewFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FieldContext {
-	var p = new(FieldContext)
+	p := new(FieldContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -394,7 +366,7 @@ func NewFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invoki
 func (s *FieldContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *FieldContext) NormalField() INormalFieldContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*INormalFieldContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*INormalFieldContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -404,7 +376,7 @@ func (s *FieldContext) NormalField() INormalFieldContext {
 }
 
 func (s *FieldContext) AnonymousFiled() IAnonymousFiledContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IAnonymousFiledContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IAnonymousFiledContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -421,7 +393,6 @@ func (s *FieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer)
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *FieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -432,9 +403,6 @@ func (s *FieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) Field() (localctx IFieldContext) {
 	localctx = NewFieldContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 36, ApiParserParserRULE_field)
@@ -470,7 +438,6 @@ func (p *ApiParserParser) Field() (localctx IFieldContext) {
 			p.NormalField()
 		}
 
-
 	case 2:
 		p.EnterOuterAlt(localctx, 2)
 		{
@@ -480,11 +447,9 @@ func (p *ApiParserParser) Field() (localctx IFieldContext) {
 
 	}
 
-
 	return localctx
 }
 
-
 // INormalFieldContext is an interface to support dynamic dispatch.
 type INormalFieldContext interface {
 	antlr.ParserRuleContext
@@ -493,18 +458,16 @@ type INormalFieldContext interface {
 	GetParser() antlr.Parser
 
 	// GetFieldName returns the fieldName token.
-	GetFieldName() antlr.Token 
+	GetFieldName() antlr.Token
 
 	// GetTag returns the tag token.
-	GetTag() antlr.Token 
-
+	GetTag() antlr.Token
 
 	// SetFieldName sets the fieldName token.
-	SetFieldName(antlr.Token) 
+	SetFieldName(antlr.Token)
 
 	// SetTag sets the tag token.
-	SetTag(antlr.Token) 
-
+	SetTag(antlr.Token)
 
 	// IsNormalFieldContext differentiates from other interfaces.
 	IsNormalFieldContext()
@@ -512,13 +475,13 @@ type INormalFieldContext interface {
 
 type NormalFieldContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser    antlr.Parser
 	fieldName antlr.Token
-	tag antlr.Token
+	tag       antlr.Token
 }
 
 func NewEmptyNormalFieldContext() *NormalFieldContext {
-	var p = new(NormalFieldContext)
+	p := new(NormalFieldContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_normalField
 	return p
@@ -527,7 +490,7 @@ func NewEmptyNormalFieldContext() *NormalFieldContext {
 func (*NormalFieldContext) IsNormalFieldContext() {}
 
 func NewNormalFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NormalFieldContext {
-	var p = new(NormalFieldContext)
+	p := new(NormalFieldContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -543,14 +506,12 @@ func (s *NormalFieldContext) GetFieldName() antlr.Token { return s.fieldName }
 
 func (s *NormalFieldContext) GetTag() antlr.Token { return s.tag }
 
-
 func (s *NormalFieldContext) SetFieldName(v antlr.Token) { s.fieldName = v }
 
 func (s *NormalFieldContext) SetTag(v antlr.Token) { s.tag = v }
 
-
 func (s *NormalFieldContext) DataType() IDataTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -575,7 +536,6 @@ func (s *NormalFieldContext) ToStringTree(ruleNames []string, recog antlr.Recogn
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *NormalFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -586,9 +546,6 @@ func (s *NormalFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
 	}
 }
 
-
-
-
 func (p *ApiParserParser) NormalField() (localctx INormalFieldContext) {
 	localctx = NewNormalFieldContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 38, ApiParserParserRULE_normalField)
@@ -614,7 +571,7 @@ func (p *ApiParserParser) NormalField() (localctx INormalFieldContext) {
 	{
 		p.SetState(201)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*NormalFieldContext).fieldName = _m
 	}
@@ -625,25 +582,19 @@ func (p *ApiParserParser) NormalField() (localctx INormalFieldContext) {
 	p.SetState(204)
 	p.GetErrorHandler().Sync(p)
 
-
 	if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 {
 		{
 			p.SetState(203)
 
-			var _m = p.Match(ApiParserParserRAW_STRING)
+			_m := p.Match(ApiParserParserRAW_STRING)
 
 			localctx.(*NormalFieldContext).tag = _m
 		}
-
-
 	}
 
-
-
 	return localctx
 }
 
-
 // IAnonymousFiledContext is an interface to support dynamic dispatch.
 type IAnonymousFiledContext interface {
 	antlr.ParserRuleContext
@@ -652,12 +603,10 @@ type IAnonymousFiledContext interface {
 	GetParser() antlr.Parser
 
 	// GetStar returns the star token.
-	GetStar() antlr.Token 
-
+	GetStar() antlr.Token
 
 	// SetStar sets the star token.
-	SetStar(antlr.Token) 
-
+	SetStar(antlr.Token)
 
 	// IsAnonymousFiledContext differentiates from other interfaces.
 	IsAnonymousFiledContext()

+ 46 - 100
tools/goctl/api/parser/g4/gen/api/apiparser_parser5.go

@@ -13,11 +13,11 @@ import (
 type AnonymousFiledContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	star antlr.Token
+	star   antlr.Token
 }
 
 func NewEmptyAnonymousFiledContext() *AnonymousFiledContext {
-	var p = new(AnonymousFiledContext)
+	p := new(AnonymousFiledContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_anonymousFiled
 	return p
@@ -26,7 +26,7 @@ func NewEmptyAnonymousFiledContext() *AnonymousFiledContext {
 func (*AnonymousFiledContext) IsAnonymousFiledContext() {}
 
 func NewAnonymousFiledContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AnonymousFiledContext {
-	var p = new(AnonymousFiledContext)
+	p := new(AnonymousFiledContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -40,10 +40,8 @@ func (s *AnonymousFiledContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *AnonymousFiledContext) GetStar() antlr.Token { return s.star }
 
-
 func (s *AnonymousFiledContext) SetStar(v antlr.Token) { s.star = v }
 
-
 func (s *AnonymousFiledContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
@@ -56,7 +54,6 @@ func (s *AnonymousFiledContext) ToStringTree(ruleNames []string, recog antlr.Rec
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *AnonymousFiledContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -67,15 +64,11 @@ func (s *AnonymousFiledContext) Accept(visitor antlr.ParseTreeVisitor) interface
 	}
 }
 
-
-
-
 func (p *ApiParserParser) AnonymousFiled() (localctx IAnonymousFiledContext) {
 	localctx = NewAnonymousFiledContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 40, ApiParserParserRULE_anonymousFiled)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -97,28 +90,23 @@ func (p *ApiParserParser) AnonymousFiled() (localctx IAnonymousFiledContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserT__5 {
 		{
 			p.SetState(206)
 
-			var _m = p.Match(ApiParserParserT__5)
+			_m := p.Match(ApiParserParserT__5)
 
 			localctx.(*AnonymousFiledContext).star = _m
 		}
-
 	}
 	{
 		p.SetState(209)
 		p.Match(ApiParserParserID)
 	}
 
-
-
 	return localctx
 }
 
-
 // IDataTypeContext is an interface to support dynamic dispatch.
 type IDataTypeContext interface {
 	antlr.ParserRuleContext
@@ -127,18 +115,16 @@ type IDataTypeContext interface {
 	GetParser() antlr.Parser
 
 	// GetInter returns the inter token.
-	GetInter() antlr.Token 
+	GetInter() antlr.Token
 
 	// GetTime returns the time token.
-	GetTime() antlr.Token 
-
+	GetTime() antlr.Token
 
 	// SetInter sets the inter token.
-	SetInter(antlr.Token) 
+	SetInter(antlr.Token)
 
 	// SetTime sets the time token.
-	SetTime(antlr.Token) 
-
+	SetTime(antlr.Token)
 
 	// IsDataTypeContext differentiates from other interfaces.
 	IsDataTypeContext()
@@ -147,12 +133,12 @@ type IDataTypeContext interface {
 type DataTypeContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	inter antlr.Token
-	time antlr.Token
+	inter  antlr.Token
+	time   antlr.Token
 }
 
 func NewEmptyDataTypeContext() *DataTypeContext {
-	var p = new(DataTypeContext)
+	p := new(DataTypeContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_dataType
 	return p
@@ -161,7 +147,7 @@ func NewEmptyDataTypeContext() *DataTypeContext {
 func (*DataTypeContext) IsDataTypeContext() {}
 
 func NewDataTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DataTypeContext {
-	var p = new(DataTypeContext)
+	p := new(DataTypeContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -177,18 +163,16 @@ func (s *DataTypeContext) GetInter() antlr.Token { return s.inter }
 
 func (s *DataTypeContext) GetTime() antlr.Token { return s.time }
 
-
 func (s *DataTypeContext) SetInter(v antlr.Token) { s.inter = v }
 
 func (s *DataTypeContext) SetTime(v antlr.Token) { s.time = v }
 
-
 func (s *DataTypeContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
 
 func (s *DataTypeContext) MapType() IMapTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IMapTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IMapTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -198,7 +182,7 @@ func (s *DataTypeContext) MapType() IMapTypeContext {
 }
 
 func (s *DataTypeContext) ArrayType() IArrayTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IArrayTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IArrayTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -212,7 +196,7 @@ func (s *DataTypeContext) INTERFACE() antlr.TerminalNode {
 }
 
 func (s *DataTypeContext) PointerType() IPointerTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IPointerTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IPointerTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -222,7 +206,7 @@ func (s *DataTypeContext) PointerType() IPointerTypeContext {
 }
 
 func (s *DataTypeContext) TypeStruct() ITypeStructContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*ITypeStructContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*ITypeStructContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -239,7 +223,6 @@ func (s *DataTypeContext) ToStringTree(ruleNames []string, recog antlr.Recognize
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *DataTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -250,9 +233,6 @@ func (s *DataTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) DataType() (localctx IDataTypeContext) {
 	localctx = NewDataTypeContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 42, ApiParserParserRULE_dataType)
@@ -284,7 +264,6 @@ func (p *ApiParserParser) DataType() (localctx IDataTypeContext) {
 			p.Match(ApiParserParserID)
 		}
 
-
 	case 2:
 		p.EnterOuterAlt(localctx, 2)
 		{
@@ -292,7 +271,6 @@ func (p *ApiParserParser) DataType() (localctx IDataTypeContext) {
 			p.MapType()
 		}
 
-
 	case 3:
 		p.EnterOuterAlt(localctx, 3)
 		{
@@ -300,29 +278,26 @@ func (p *ApiParserParser) DataType() (localctx IDataTypeContext) {
 			p.ArrayType()
 		}
 
-
 	case 4:
 		p.EnterOuterAlt(localctx, 4)
 		{
 			p.SetState(215)
 
-			var _m = p.Match(ApiParserParserINTERFACE)
+			_m := p.Match(ApiParserParserINTERFACE)
 
 			localctx.(*DataTypeContext).inter = _m
 		}
 
-
 	case 5:
 		p.EnterOuterAlt(localctx, 5)
 		{
 			p.SetState(216)
 
-			var _m = p.Match(ApiParserParserT__6)
+			_m := p.Match(ApiParserParserT__6)
 
 			localctx.(*DataTypeContext).time = _m
 		}
 
-
 	case 6:
 		p.EnterOuterAlt(localctx, 6)
 		{
@@ -330,7 +305,6 @@ func (p *ApiParserParser) DataType() (localctx IDataTypeContext) {
 			p.PointerType()
 		}
 
-
 	case 7:
 		p.EnterOuterAlt(localctx, 7)
 		{
@@ -340,11 +314,9 @@ func (p *ApiParserParser) DataType() (localctx IDataTypeContext) {
 
 	}
 
-
 	return localctx
 }
 
-
 // IPointerTypeContext is an interface to support dynamic dispatch.
 type IPointerTypeContext interface {
 	antlr.ParserRuleContext
@@ -353,12 +325,10 @@ type IPointerTypeContext interface {
 	GetParser() antlr.Parser
 
 	// GetStar returns the star token.
-	GetStar() antlr.Token 
-
+	GetStar() antlr.Token
 
 	// SetStar sets the star token.
-	SetStar(antlr.Token) 
-
+	SetStar(antlr.Token)
 
 	// IsPointerTypeContext differentiates from other interfaces.
 	IsPointerTypeContext()
@@ -367,11 +337,11 @@ type IPointerTypeContext interface {
 type PointerTypeContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	star antlr.Token
+	star   antlr.Token
 }
 
 func NewEmptyPointerTypeContext() *PointerTypeContext {
-	var p = new(PointerTypeContext)
+	p := new(PointerTypeContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_pointerType
 	return p
@@ -380,7 +350,7 @@ func NewEmptyPointerTypeContext() *PointerTypeContext {
 func (*PointerTypeContext) IsPointerTypeContext() {}
 
 func NewPointerTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PointerTypeContext {
-	var p = new(PointerTypeContext)
+	p := new(PointerTypeContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -394,10 +364,8 @@ func (s *PointerTypeContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *PointerTypeContext) GetStar() antlr.Token { return s.star }
 
-
 func (s *PointerTypeContext) SetStar(v antlr.Token) { s.star = v }
 
-
 func (s *PointerTypeContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
@@ -410,7 +378,6 @@ func (s *PointerTypeContext) ToStringTree(ruleNames []string, recog antlr.Recogn
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *PointerTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -421,9 +388,6 @@ func (s *PointerTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
 	}
 }
 
-
-
-
 func (p *ApiParserParser) PointerType() (localctx IPointerTypeContext) {
 	localctx = NewPointerTypeContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 44, ApiParserParserRULE_pointerType)
@@ -448,7 +412,7 @@ func (p *ApiParserParser) PointerType() (localctx IPointerTypeContext) {
 	{
 		p.SetState(221)
 
-		var _m = p.Match(ApiParserParserT__5)
+		_m := p.Match(ApiParserParserT__5)
 
 		localctx.(*PointerTypeContext).star = _m
 	}
@@ -458,12 +422,9 @@ func (p *ApiParserParser) PointerType() (localctx IPointerTypeContext) {
 		p.Match(ApiParserParserID)
 	}
 
-
-
 	return localctx
 }
 
-
 // IMapTypeContext is an interface to support dynamic dispatch.
 type IMapTypeContext interface {
 	antlr.ParserRuleContext
@@ -472,55 +433,51 @@ type IMapTypeContext interface {
 	GetParser() antlr.Parser
 
 	// GetMapToken returns the mapToken token.
-	GetMapToken() antlr.Token 
+	GetMapToken() antlr.Token
 
 	// GetLbrack returns the lbrack token.
-	GetLbrack() antlr.Token 
+	GetLbrack() antlr.Token
 
 	// GetKey returns the key token.
-	GetKey() antlr.Token 
+	GetKey() antlr.Token
 
 	// GetRbrack returns the rbrack token.
-	GetRbrack() antlr.Token 
-
+	GetRbrack() antlr.Token
 
 	// SetMapToken sets the mapToken token.
-	SetMapToken(antlr.Token) 
+	SetMapToken(antlr.Token)
 
 	// SetLbrack sets the lbrack token.
-	SetLbrack(antlr.Token) 
+	SetLbrack(antlr.Token)
 
 	// SetKey sets the key token.
-	SetKey(antlr.Token) 
+	SetKey(antlr.Token)
 
 	// SetRbrack sets the rbrack token.
-	SetRbrack(antlr.Token) 
-
+	SetRbrack(antlr.Token)
 
 	// GetValue returns the value rule contexts.
 	GetValue() IDataTypeContext
 
-
 	// SetValue sets the value rule contexts.
 	SetValue(IDataTypeContext)
 
-
 	// IsMapTypeContext differentiates from other interfaces.
 	IsMapTypeContext()
 }
 
 type MapTypeContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser   antlr.Parser
 	mapToken antlr.Token
-	lbrack antlr.Token
-	key antlr.Token
-	rbrack antlr.Token
-	value IDataTypeContext 
+	lbrack   antlr.Token
+	key      antlr.Token
+	rbrack   antlr.Token
+	value    IDataTypeContext
 }
 
 func NewEmptyMapTypeContext() *MapTypeContext {
-	var p = new(MapTypeContext)
+	p := new(MapTypeContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_mapType
 	return p
@@ -529,7 +486,7 @@ func NewEmptyMapTypeContext() *MapTypeContext {
 func (*MapTypeContext) IsMapTypeContext() {}
 
 func NewMapTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MapTypeContext {
-	var p = new(MapTypeContext)
+	p := new(MapTypeContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -549,7 +506,6 @@ func (s *MapTypeContext) GetKey() antlr.Token { return s.key }
 
 func (s *MapTypeContext) GetRbrack() antlr.Token { return s.rbrack }
 
-
 func (s *MapTypeContext) SetMapToken(v antlr.Token) { s.mapToken = v }
 
 func (s *MapTypeContext) SetLbrack(v antlr.Token) { s.lbrack = v }
@@ -558,13 +514,10 @@ func (s *MapTypeContext) SetKey(v antlr.Token) { s.key = v }
 
 func (s *MapTypeContext) SetRbrack(v antlr.Token) { s.rbrack = v }
 
-
 func (s *MapTypeContext) GetValue() IDataTypeContext { return s.value }
 
-
 func (s *MapTypeContext) SetValue(v IDataTypeContext) { s.value = v }
 
-
 func (s *MapTypeContext) AllID() []antlr.TerminalNode {
 	return s.GetTokens(ApiParserParserID)
 }
@@ -574,7 +527,7 @@ func (s *MapTypeContext) ID(i int) antlr.TerminalNode {
 }
 
 func (s *MapTypeContext) DataType() IDataTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -591,7 +544,6 @@ func (s *MapTypeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *MapTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -602,9 +554,6 @@ func (s *MapTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) MapType() (localctx IMapTypeContext) {
 	localctx = NewMapTypeContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 46, ApiParserParserRULE_mapType)
@@ -626,18 +575,18 @@ func (p *ApiParserParser) MapType() (localctx IMapTypeContext) {
 	}()
 
 	p.EnterOuterAlt(localctx, 1)
-	match(p,"map")
+	match(p, "map")
 	{
 		p.SetState(226)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*MapTypeContext).mapToken = _m
 	}
 	{
 		p.SetState(227)
 
-		var _m = p.Match(ApiParserParserT__7)
+		_m := p.Match(ApiParserParserT__7)
 
 		localctx.(*MapTypeContext).lbrack = _m
 	}
@@ -645,27 +594,24 @@ func (p *ApiParserParser) MapType() (localctx IMapTypeContext) {
 	{
 		p.SetState(229)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*MapTypeContext).key = _m
 	}
 	{
 		p.SetState(230)
 
-		var _m = p.Match(ApiParserParserT__8)
+		_m := p.Match(ApiParserParserT__8)
 
 		localctx.(*MapTypeContext).rbrack = _m
 	}
 	{
 		p.SetState(231)
 
-		var _x = p.DataType()
-
+		_x := p.DataType()
 
 		localctx.(*MapTypeContext).value = _x
 	}
 
-
-
 	return localctx
 }

+ 46 - 94
tools/goctl/api/parser/g4/gen/api/apiparser_parser6.go

@@ -10,7 +10,6 @@ import (
 // The apiparser_parser.go file was split into multiple files because it
 // was too large and caused a possible memory overflow during goctl installation.
 
-
 // IArrayTypeContext is an interface to support dynamic dispatch.
 type IArrayTypeContext interface {
 	antlr.ParserRuleContext
@@ -19,18 +18,16 @@ type IArrayTypeContext interface {
 	GetParser() antlr.Parser
 
 	// GetLbrack returns the lbrack token.
-	GetLbrack() antlr.Token 
+	GetLbrack() antlr.Token
 
 	// GetRbrack returns the rbrack token.
-	GetRbrack() antlr.Token 
-
+	GetRbrack() antlr.Token
 
 	// SetLbrack sets the lbrack token.
-	SetLbrack(antlr.Token) 
+	SetLbrack(antlr.Token)
 
 	// SetRbrack sets the rbrack token.
-	SetRbrack(antlr.Token) 
-
+	SetRbrack(antlr.Token)
 
 	// IsArrayTypeContext differentiates from other interfaces.
 	IsArrayTypeContext()
@@ -44,7 +41,7 @@ type ArrayTypeContext struct {
 }
 
 func NewEmptyArrayTypeContext() *ArrayTypeContext {
-	var p = new(ArrayTypeContext)
+	p := new(ArrayTypeContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_arrayType
 	return p
@@ -53,7 +50,7 @@ func NewEmptyArrayTypeContext() *ArrayTypeContext {
 func (*ArrayTypeContext) IsArrayTypeContext() {}
 
 func NewArrayTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrayTypeContext {
-	var p = new(ArrayTypeContext)
+	p := new(ArrayTypeContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -69,14 +66,12 @@ func (s *ArrayTypeContext) GetLbrack() antlr.Token { return s.lbrack }
 
 func (s *ArrayTypeContext) GetRbrack() antlr.Token { return s.rbrack }
 
-
 func (s *ArrayTypeContext) SetLbrack(v antlr.Token) { s.lbrack = v }
 
 func (s *ArrayTypeContext) SetRbrack(v antlr.Token) { s.rbrack = v }
 
-
 func (s *ArrayTypeContext) DataType() IDataTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -93,7 +88,6 @@ func (s *ArrayTypeContext) ToStringTree(ruleNames []string, recog antlr.Recogniz
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ArrayTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -104,9 +98,6 @@ func (s *ArrayTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ArrayType() (localctx IArrayTypeContext) {
 	localctx = NewArrayTypeContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 48, ApiParserParserRULE_arrayType)
@@ -131,14 +122,14 @@ func (p *ApiParserParser) ArrayType() (localctx IArrayTypeContext) {
 	{
 		p.SetState(233)
 
-		var _m = p.Match(ApiParserParserT__7)
+		_m := p.Match(ApiParserParserT__7)
 
 		localctx.(*ArrayTypeContext).lbrack = _m
 	}
 	{
 		p.SetState(234)
 
-		var _m = p.Match(ApiParserParserT__8)
+		_m := p.Match(ApiParserParserT__8)
 
 		localctx.(*ArrayTypeContext).rbrack = _m
 	}
@@ -147,12 +138,9 @@ func (p *ApiParserParser) ArrayType() (localctx IArrayTypeContext) {
 		p.DataType()
 	}
 
-
-
 	return localctx
 }
 
-
 // IServiceSpecContext is an interface to support dynamic dispatch.
 type IServiceSpecContext interface {
 	antlr.ParserRuleContext
@@ -170,7 +158,7 @@ type ServiceSpecContext struct {
 }
 
 func NewEmptyServiceSpecContext() *ServiceSpecContext {
-	var p = new(ServiceSpecContext)
+	p := new(ServiceSpecContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_serviceSpec
 	return p
@@ -179,7 +167,7 @@ func NewEmptyServiceSpecContext() *ServiceSpecContext {
 func (*ServiceSpecContext) IsServiceSpecContext() {}
 
 func NewServiceSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ServiceSpecContext {
-	var p = new(ServiceSpecContext)
+	p := new(ServiceSpecContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -192,7 +180,7 @@ func NewServiceSpecContext(parser antlr.Parser, parent antlr.ParserRuleContext,
 func (s *ServiceSpecContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *ServiceSpecContext) ServiceApi() IServiceApiContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IServiceApiContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IServiceApiContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -202,7 +190,7 @@ func (s *ServiceSpecContext) ServiceApi() IServiceApiContext {
 }
 
 func (s *ServiceSpecContext) AtServer() IAtServerContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IAtServerContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IAtServerContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -219,7 +207,6 @@ func (s *ServiceSpecContext) ToStringTree(ruleNames []string, recog antlr.Recogn
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ServiceSpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -230,15 +217,11 @@ func (s *ServiceSpecContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ServiceSpec() (localctx IServiceSpecContext) {
 	localctx = NewServiceSpecContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 50, ApiParserParserRULE_serviceSpec)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -260,25 +243,20 @@ func (p *ApiParserParser) ServiceSpec() (localctx IServiceSpecContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserATSERVER {
 		{
 			p.SetState(237)
 			p.AtServer()
 		}
-
 	}
 	{
 		p.SetState(240)
 		p.ServiceApi()
 	}
 
-
-
 	return localctx
 }
 
-
 // IAtServerContext is an interface to support dynamic dispatch.
 type IAtServerContext interface {
 	antlr.ParserRuleContext
@@ -287,18 +265,16 @@ type IAtServerContext interface {
 	GetParser() antlr.Parser
 
 	// GetLp returns the lp token.
-	GetLp() antlr.Token 
+	GetLp() antlr.Token
 
 	// GetRp returns the rp token.
-	GetRp() antlr.Token 
-
+	GetRp() antlr.Token
 
 	// SetLp sets the lp token.
-	SetLp(antlr.Token) 
+	SetLp(antlr.Token)
 
 	// SetRp sets the rp token.
-	SetRp(antlr.Token) 
-
+	SetRp(antlr.Token)
 
 	// IsAtServerContext differentiates from other interfaces.
 	IsAtServerContext()
@@ -307,12 +283,12 @@ type IAtServerContext interface {
 type AtServerContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	lp antlr.Token
-	rp antlr.Token
+	lp     antlr.Token
+	rp     antlr.Token
 }
 
 func NewEmptyAtServerContext() *AtServerContext {
-	var p = new(AtServerContext)
+	p := new(AtServerContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_atServer
 	return p
@@ -321,7 +297,7 @@ func NewEmptyAtServerContext() *AtServerContext {
 func (*AtServerContext) IsAtServerContext() {}
 
 func NewAtServerContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AtServerContext {
-	var p = new(AtServerContext)
+	p := new(AtServerContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -337,19 +313,17 @@ func (s *AtServerContext) GetLp() antlr.Token { return s.lp }
 
 func (s *AtServerContext) GetRp() antlr.Token { return s.rp }
 
-
 func (s *AtServerContext) SetLp(v antlr.Token) { s.lp = v }
 
 func (s *AtServerContext) SetRp(v antlr.Token) { s.rp = v }
 
-
 func (s *AtServerContext) ATSERVER() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserATSERVER, 0)
 }
 
 func (s *AtServerContext) AllKvLit() []IKvLitContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IKvLitContext)(nil)).Elem())
-	var tst = make([]IKvLitContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*IKvLitContext)(nil)).Elem())
+	tst := make([]IKvLitContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -361,7 +335,7 @@ func (s *AtServerContext) AllKvLit() []IKvLitContext {
 }
 
 func (s *AtServerContext) KvLit(i int) IKvLitContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IKvLitContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IKvLitContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -378,7 +352,6 @@ func (s *AtServerContext) ToStringTree(ruleNames []string, recog antlr.Recognize
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *AtServerContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -389,15 +362,11 @@ func (s *AtServerContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) AtServer() (localctx IAtServerContext) {
 	localctx = NewAtServerContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 52, ApiParserParserRULE_atServer)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -422,7 +391,7 @@ func (p *ApiParserParser) AtServer() (localctx IAtServerContext) {
 	{
 		p.SetState(243)
 
-		var _m = p.Match(ApiParserParserT__1)
+		_m := p.Match(ApiParserParserT__1)
 
 		localctx.(*AtServerContext).lp = _m
 	}
@@ -435,7 +404,6 @@ func (p *ApiParserParser) AtServer() (localctx IAtServerContext) {
 			p.KvLit()
 		}
 
-
 		p.SetState(247)
 		p.GetErrorHandler().Sync(p)
 		_la = p.GetTokenStream().LA(1)
@@ -443,17 +411,14 @@ func (p *ApiParserParser) AtServer() (localctx IAtServerContext) {
 	{
 		p.SetState(249)
 
-		var _m = p.Match(ApiParserParserT__2)
+		_m := p.Match(ApiParserParserT__2)
 
 		localctx.(*AtServerContext).rp = _m
 	}
 
-
-
 	return localctx
 }
 
-
 // IServiceApiContext is an interface to support dynamic dispatch.
 type IServiceApiContext interface {
 	antlr.ParserRuleContext
@@ -462,24 +427,22 @@ type IServiceApiContext interface {
 	GetParser() antlr.Parser
 
 	// GetServiceToken returns the serviceToken token.
-	GetServiceToken() antlr.Token 
+	GetServiceToken() antlr.Token
 
 	// GetLbrace returns the lbrace token.
-	GetLbrace() antlr.Token 
+	GetLbrace() antlr.Token
 
 	// GetRbrace returns the rbrace token.
-	GetRbrace() antlr.Token 
-
+	GetRbrace() antlr.Token
 
 	// SetServiceToken sets the serviceToken token.
-	SetServiceToken(antlr.Token) 
+	SetServiceToken(antlr.Token)
 
 	// SetLbrace sets the lbrace token.
-	SetLbrace(antlr.Token) 
+	SetLbrace(antlr.Token)
 
 	// SetRbrace sets the rbrace token.
-	SetRbrace(antlr.Token) 
-
+	SetRbrace(antlr.Token)
 
 	// IsServiceApiContext differentiates from other interfaces.
 	IsServiceApiContext()
@@ -487,14 +450,14 @@ type IServiceApiContext interface {
 
 type ServiceApiContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser       antlr.Parser
 	serviceToken antlr.Token
-	lbrace antlr.Token
-	rbrace antlr.Token
+	lbrace       antlr.Token
+	rbrace       antlr.Token
 }
 
 func NewEmptyServiceApiContext() *ServiceApiContext {
-	var p = new(ServiceApiContext)
+	p := new(ServiceApiContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_serviceApi
 	return p
@@ -503,7 +466,7 @@ func NewEmptyServiceApiContext() *ServiceApiContext {
 func (*ServiceApiContext) IsServiceApiContext() {}
 
 func NewServiceApiContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ServiceApiContext {
-	var p = new(ServiceApiContext)
+	p := new(ServiceApiContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -521,16 +484,14 @@ func (s *ServiceApiContext) GetLbrace() antlr.Token { return s.lbrace }
 
 func (s *ServiceApiContext) GetRbrace() antlr.Token { return s.rbrace }
 
-
 func (s *ServiceApiContext) SetServiceToken(v antlr.Token) { s.serviceToken = v }
 
 func (s *ServiceApiContext) SetLbrace(v antlr.Token) { s.lbrace = v }
 
 func (s *ServiceApiContext) SetRbrace(v antlr.Token) { s.rbrace = v }
 
-
 func (s *ServiceApiContext) ServiceName() IServiceNameContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IServiceNameContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IServiceNameContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -544,8 +505,8 @@ func (s *ServiceApiContext) ID() antlr.TerminalNode {
 }
 
 func (s *ServiceApiContext) AllServiceRoute() []IServiceRouteContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IServiceRouteContext)(nil)).Elem())
-	var tst = make([]IServiceRouteContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*IServiceRouteContext)(nil)).Elem())
+	tst := make([]IServiceRouteContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -557,7 +518,7 @@ func (s *ServiceApiContext) AllServiceRoute() []IServiceRouteContext {
 }
 
 func (s *ServiceApiContext) ServiceRoute(i int) IServiceRouteContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IServiceRouteContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IServiceRouteContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -574,7 +535,6 @@ func (s *ServiceApiContext) ToStringTree(ruleNames []string, recog antlr.Recogni
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ServiceApiContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -585,15 +545,11 @@ func (s *ServiceApiContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ServiceApi() (localctx IServiceApiContext) {
 	localctx = NewServiceApiContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 54, ApiParserParserRULE_serviceApi)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -611,11 +567,11 @@ func (p *ApiParserParser) ServiceApi() (localctx IServiceApiContext) {
 	}()
 
 	p.EnterOuterAlt(localctx, 1)
-	match(p,"service")
+	match(p, "service")
 	{
 		p.SetState(252)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*ServiceApiContext).serviceToken = _m
 	}
@@ -626,7 +582,7 @@ func (p *ApiParserParser) ServiceApi() (localctx IServiceApiContext) {
 	{
 		p.SetState(254)
 
-		var _m = p.Match(ApiParserParserT__3)
+		_m := p.Match(ApiParserParserT__3)
 
 		localctx.(*ServiceApiContext).lbrace = _m
 	}
@@ -634,14 +590,12 @@ func (p *ApiParserParser) ServiceApi() (localctx IServiceApiContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
-	for (((_la) & -(0x1f+1)) == 0 && ((1 << uint(_la)) & ((1 << ApiParserParserATDOC) | (1 << ApiParserParserATHANDLER) | (1 << ApiParserParserATSERVER))) != 0) {
+	for ((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<ApiParserParserATDOC)|(1<<ApiParserParserATHANDLER)|(1<<ApiParserParserATSERVER))) != 0 {
 		{
 			p.SetState(255)
 			p.ServiceRoute()
 		}
 
-
 		p.SetState(260)
 		p.GetErrorHandler().Sync(p)
 		_la = p.GetTokenStream().LA(1)
@@ -649,12 +603,10 @@ func (p *ApiParserParser) ServiceApi() (localctx IServiceApiContext) {
 	{
 		p.SetState(261)
 
-		var _m = p.Match(ApiParserParserT__4)
+		_m := p.Match(ApiParserParserT__4)
 
 		localctx.(*ServiceApiContext).rbrace = _m
 	}
 
-
-
 	return localctx
 }

+ 34 - 97
tools/goctl/api/parser/g4/gen/api/apiparser_parser7.go

@@ -10,7 +10,6 @@ import (
 // The apiparser_parser.go file was split into multiple files because it
 // was too large and caused a possible memory overflow during goctl installation.
 
-
 // IServiceRouteContext is an interface to support dynamic dispatch.
 type IServiceRouteContext interface {
 	antlr.ParserRuleContext
@@ -28,7 +27,7 @@ type ServiceRouteContext struct {
 }
 
 func NewEmptyServiceRouteContext() *ServiceRouteContext {
-	var p = new(ServiceRouteContext)
+	p := new(ServiceRouteContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_serviceRoute
 	return p
@@ -37,7 +36,7 @@ func NewEmptyServiceRouteContext() *ServiceRouteContext {
 func (*ServiceRouteContext) IsServiceRouteContext() {}
 
 func NewServiceRouteContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ServiceRouteContext {
-	var p = new(ServiceRouteContext)
+	p := new(ServiceRouteContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -50,7 +49,7 @@ func NewServiceRouteContext(parser antlr.Parser, parent antlr.ParserRuleContext,
 func (s *ServiceRouteContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *ServiceRouteContext) Route() IRouteContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IRouteContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IRouteContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -60,7 +59,7 @@ func (s *ServiceRouteContext) Route() IRouteContext {
 }
 
 func (s *ServiceRouteContext) AtServer() IAtServerContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IAtServerContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IAtServerContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -70,7 +69,7 @@ func (s *ServiceRouteContext) AtServer() IAtServerContext {
 }
 
 func (s *ServiceRouteContext) AtHandler() IAtHandlerContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IAtHandlerContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IAtHandlerContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -80,7 +79,7 @@ func (s *ServiceRouteContext) AtHandler() IAtHandlerContext {
 }
 
 func (s *ServiceRouteContext) AtDoc() IAtDocContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IAtDocContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IAtDocContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -97,7 +96,6 @@ func (s *ServiceRouteContext) ToStringTree(ruleNames []string, recog antlr.Recog
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ServiceRouteContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -108,15 +106,11 @@ func (s *ServiceRouteContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ServiceRoute() (localctx IServiceRouteContext) {
 	localctx = NewServiceRouteContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 56, ApiParserParserRULE_serviceRoute)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -138,13 +132,11 @@ func (p *ApiParserParser) ServiceRoute() (localctx IServiceRouteContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserATDOC {
 		{
 			p.SetState(263)
 			p.AtDoc()
 		}
-
 	}
 	p.SetState(268)
 	p.GetErrorHandler().Sync(p)
@@ -156,15 +148,12 @@ func (p *ApiParserParser) ServiceRoute() (localctx IServiceRouteContext) {
 			p.AtServer()
 		}
 
-
 	case ApiParserParserATHANDLER:
 		{
 			p.SetState(267)
 			p.AtHandler()
 		}
 
-
-
 	default:
 		panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
 	}
@@ -173,12 +162,9 @@ func (p *ApiParserParser) ServiceRoute() (localctx IServiceRouteContext) {
 		p.Route()
 	}
 
-
-
 	return localctx
 }
 
-
 // IAtDocContext is an interface to support dynamic dispatch.
 type IAtDocContext interface {
 	antlr.ParserRuleContext
@@ -187,18 +173,16 @@ type IAtDocContext interface {
 	GetParser() antlr.Parser
 
 	// GetLp returns the lp token.
-	GetLp() antlr.Token 
+	GetLp() antlr.Token
 
 	// GetRp returns the rp token.
-	GetRp() antlr.Token 
-
+	GetRp() antlr.Token
 
 	// SetLp sets the lp token.
-	SetLp(antlr.Token) 
+	SetLp(antlr.Token)
 
 	// SetRp sets the rp token.
-	SetRp(antlr.Token) 
-
+	SetRp(antlr.Token)
 
 	// IsAtDocContext differentiates from other interfaces.
 	IsAtDocContext()
@@ -207,12 +191,12 @@ type IAtDocContext interface {
 type AtDocContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	lp antlr.Token
-	rp antlr.Token
+	lp     antlr.Token
+	rp     antlr.Token
 }
 
 func NewEmptyAtDocContext() *AtDocContext {
-	var p = new(AtDocContext)
+	p := new(AtDocContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_atDoc
 	return p
@@ -221,7 +205,7 @@ func NewEmptyAtDocContext() *AtDocContext {
 func (*AtDocContext) IsAtDocContext() {}
 
 func NewAtDocContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AtDocContext {
-	var p = new(AtDocContext)
+	p := new(AtDocContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -237,12 +221,10 @@ func (s *AtDocContext) GetLp() antlr.Token { return s.lp }
 
 func (s *AtDocContext) GetRp() antlr.Token { return s.rp }
 
-
 func (s *AtDocContext) SetLp(v antlr.Token) { s.lp = v }
 
 func (s *AtDocContext) SetRp(v antlr.Token) { s.rp = v }
 
-
 func (s *AtDocContext) ATDOC() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserATDOC, 0)
 }
@@ -252,8 +234,8 @@ func (s *AtDocContext) STRING() antlr.TerminalNode {
 }
 
 func (s *AtDocContext) AllKvLit() []IKvLitContext {
-	var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IKvLitContext)(nil)).Elem())
-	var tst = make([]IKvLitContext, len(ts))
+	ts := s.GetTypedRuleContexts(reflect.TypeOf((*IKvLitContext)(nil)).Elem())
+	tst := make([]IKvLitContext, len(ts))
 
 	for i, t := range ts {
 		if t != nil {
@@ -265,7 +247,7 @@ func (s *AtDocContext) AllKvLit() []IKvLitContext {
 }
 
 func (s *AtDocContext) KvLit(i int) IKvLitContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IKvLitContext)(nil)).Elem(), i)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IKvLitContext)(nil)).Elem(), i)
 
 	if t == nil {
 		return nil
@@ -282,7 +264,6 @@ func (s *AtDocContext) ToStringTree(ruleNames []string, recog antlr.Recognizer)
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *AtDocContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -293,15 +274,11 @@ func (s *AtDocContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) AtDoc() (localctx IAtDocContext) {
 	localctx = NewAtDocContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 58, ApiParserParserRULE_atDoc)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -327,16 +304,14 @@ func (p *ApiParserParser) AtDoc() (localctx IAtDocContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserT__1 {
 		{
 			p.SetState(273)
 
-			var _m = p.Match(ApiParserParserT__1)
+			_m := p.Match(ApiParserParserT__1)
 
 			localctx.(*AtDocContext).lp = _m
 		}
-
 	}
 	p.SetState(282)
 	p.GetErrorHandler().Sync(p)
@@ -352,22 +327,17 @@ func (p *ApiParserParser) AtDoc() (localctx IAtDocContext) {
 				p.KvLit()
 			}
 
-
 			p.SetState(279)
 			p.GetErrorHandler().Sync(p)
 			_la = p.GetTokenStream().LA(1)
 		}
 
-
-
 	case ApiParserParserSTRING:
 		{
 			p.SetState(281)
 			p.Match(ApiParserParserSTRING)
 		}
 
-
-
 	default:
 		panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
 	}
@@ -375,24 +345,19 @@ func (p *ApiParserParser) AtDoc() (localctx IAtDocContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserT__2 {
 		{
 			p.SetState(284)
 
-			var _m = p.Match(ApiParserParserT__2)
+			_m := p.Match(ApiParserParserT__2)
 
 			localctx.(*AtDocContext).rp = _m
 		}
-
 	}
 
-
-
 	return localctx
 }
 
-
 // IAtHandlerContext is an interface to support dynamic dispatch.
 type IAtHandlerContext interface {
 	antlr.ParserRuleContext
@@ -410,7 +375,7 @@ type AtHandlerContext struct {
 }
 
 func NewEmptyAtHandlerContext() *AtHandlerContext {
-	var p = new(AtHandlerContext)
+	p := new(AtHandlerContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_atHandler
 	return p
@@ -419,7 +384,7 @@ func NewEmptyAtHandlerContext() *AtHandlerContext {
 func (*AtHandlerContext) IsAtHandlerContext() {}
 
 func NewAtHandlerContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AtHandlerContext {
-	var p = new(AtHandlerContext)
+	p := new(AtHandlerContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -447,7 +412,6 @@ func (s *AtHandlerContext) ToStringTree(ruleNames []string, recog antlr.Recogniz
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *AtHandlerContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -458,9 +422,6 @@ func (s *AtHandlerContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) AtHandler() (localctx IAtHandlerContext) {
 	localctx = NewAtHandlerContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 60, ApiParserParserRULE_atHandler)
@@ -491,12 +452,9 @@ func (p *ApiParserParser) AtHandler() (localctx IAtHandlerContext) {
 		p.Match(ApiParserParserID)
 	}
 
-
-
 	return localctx
 }
 
-
 // IRouteContext is an interface to support dynamic dispatch.
 type IRouteContext interface {
 	antlr.ParserRuleContext
@@ -505,12 +463,10 @@ type IRouteContext interface {
 	GetParser() antlr.Parser
 
 	// GetHttpMethod returns the httpMethod token.
-	GetHttpMethod() antlr.Token 
-
+	GetHttpMethod() antlr.Token
 
 	// SetHttpMethod sets the httpMethod token.
-	SetHttpMethod(antlr.Token) 
-
+	SetHttpMethod(antlr.Token)
 
 	// GetRequest returns the request rule contexts.
 	GetRequest() IBodyContext
@@ -518,28 +474,26 @@ type IRouteContext interface {
 	// GetResponse returns the response rule contexts.
 	GetResponse() IReplybodyContext
 
-
 	// SetRequest sets the request rule contexts.
 	SetRequest(IBodyContext)
 
 	// SetResponse sets the response rule contexts.
 	SetResponse(IReplybodyContext)
 
-
 	// IsRouteContext differentiates from other interfaces.
 	IsRouteContext()
 }
 
 type RouteContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser     antlr.Parser
 	httpMethod antlr.Token
-	request IBodyContext 
-	response IReplybodyContext 
+	request    IBodyContext
+	response   IReplybodyContext
 }
 
 func NewEmptyRouteContext() *RouteContext {
-	var p = new(RouteContext)
+	p := new(RouteContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_route
 	return p
@@ -548,7 +502,7 @@ func NewEmptyRouteContext() *RouteContext {
 func (*RouteContext) IsRouteContext() {}
 
 func NewRouteContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RouteContext {
-	var p = new(RouteContext)
+	p := new(RouteContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -562,22 +516,18 @@ func (s *RouteContext) GetParser() antlr.Parser { return s.parser }
 
 func (s *RouteContext) GetHttpMethod() antlr.Token { return s.httpMethod }
 
-
 func (s *RouteContext) SetHttpMethod(v antlr.Token) { s.httpMethod = v }
 
-
 func (s *RouteContext) GetRequest() IBodyContext { return s.request }
 
 func (s *RouteContext) GetResponse() IReplybodyContext { return s.response }
 
-
 func (s *RouteContext) SetRequest(v IBodyContext) { s.request = v }
 
 func (s *RouteContext) SetResponse(v IReplybodyContext) { s.response = v }
 
-
 func (s *RouteContext) Path() IPathContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IPathContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IPathContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -591,7 +541,7 @@ func (s *RouteContext) ID() antlr.TerminalNode {
 }
 
 func (s *RouteContext) Body() IBodyContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IBodyContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IBodyContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -601,7 +551,7 @@ func (s *RouteContext) Body() IBodyContext {
 }
 
 func (s *RouteContext) Replybody() IReplybodyContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IReplybodyContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IReplybodyContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -618,7 +568,6 @@ func (s *RouteContext) ToStringTree(ruleNames []string, recog antlr.Recognizer)
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *RouteContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -629,15 +578,11 @@ func (s *RouteContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) Route() (localctx IRouteContext) {
 	localctx = NewRouteContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 62, ApiParserParserRULE_route)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -659,7 +604,7 @@ func (p *ApiParserParser) Route() (localctx IRouteContext) {
 	{
 		p.SetState(291)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*RouteContext).httpMethod = _m
 	}
@@ -671,36 +616,28 @@ func (p *ApiParserParser) Route() (localctx IRouteContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserT__1 {
 		{
 			p.SetState(293)
 
-			var _x = p.Body()
-
+			_x := p.Body()
 
 			localctx.(*RouteContext).request = _x
 		}
-
 	}
 	p.SetState(297)
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserT__9 {
 		{
 			p.SetState(296)
 
-			var _x = p.Replybody()
-
+			_x := p.Replybody()
 
 			localctx.(*RouteContext).response = _x
 		}
-
 	}
 
-
-
 	return localctx
 }

+ 40 - 108
tools/goctl/api/parser/g4/gen/api/apiparser_parser8.go

@@ -10,7 +10,6 @@ import (
 // The apiparser_parser.go file was split into multiple files because it
 // was too large and caused a possible memory overflow during goctl installation.
 
-
 // IBodyContext is an interface to support dynamic dispatch.
 type IBodyContext interface {
 	antlr.ParserRuleContext
@@ -19,18 +18,16 @@ type IBodyContext interface {
 	GetParser() antlr.Parser
 
 	// GetLp returns the lp token.
-	GetLp() antlr.Token 
+	GetLp() antlr.Token
 
 	// GetRp returns the rp token.
-	GetRp() antlr.Token 
-
+	GetRp() antlr.Token
 
 	// SetLp sets the lp token.
-	SetLp(antlr.Token) 
+	SetLp(antlr.Token)
 
 	// SetRp sets the rp token.
-	SetRp(antlr.Token) 
-
+	SetRp(antlr.Token)
 
 	// IsBodyContext differentiates from other interfaces.
 	IsBodyContext()
@@ -39,12 +36,12 @@ type IBodyContext interface {
 type BodyContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	lp antlr.Token
-	rp antlr.Token
+	lp     antlr.Token
+	rp     antlr.Token
 }
 
 func NewEmptyBodyContext() *BodyContext {
-	var p = new(BodyContext)
+	p := new(BodyContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_body
 	return p
@@ -53,7 +50,7 @@ func NewEmptyBodyContext() *BodyContext {
 func (*BodyContext) IsBodyContext() {}
 
 func NewBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BodyContext {
-	var p = new(BodyContext)
+	p := new(BodyContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -69,12 +66,10 @@ func (s *BodyContext) GetLp() antlr.Token { return s.lp }
 
 func (s *BodyContext) GetRp() antlr.Token { return s.rp }
 
-
 func (s *BodyContext) SetLp(v antlr.Token) { s.lp = v }
 
 func (s *BodyContext) SetRp(v antlr.Token) { s.rp = v }
 
-
 func (s *BodyContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
@@ -87,7 +82,6 @@ func (s *BodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) s
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *BodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -98,15 +92,11 @@ func (s *BodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) Body() (localctx IBodyContext) {
 	localctx = NewBodyContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 64, ApiParserParserRULE_body)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -127,7 +117,7 @@ func (p *ApiParserParser) Body() (localctx IBodyContext) {
 	{
 		p.SetState(299)
 
-		var _m = p.Match(ApiParserParserT__1)
+		_m := p.Match(ApiParserParserT__1)
 
 		localctx.(*BodyContext).lp = _m
 	}
@@ -135,28 +125,23 @@ func (p *ApiParserParser) Body() (localctx IBodyContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
 	if _la == ApiParserParserID {
 		{
 			p.SetState(300)
 			p.Match(ApiParserParserID)
 		}
-
 	}
 	{
 		p.SetState(303)
 
-		var _m = p.Match(ApiParserParserT__2)
+		_m := p.Match(ApiParserParserT__2)
 
 		localctx.(*BodyContext).rp = _m
 	}
 
-
-
 	return localctx
 }
 
-
 // IReplybodyContext is an interface to support dynamic dispatch.
 type IReplybodyContext interface {
 	antlr.ParserRuleContext
@@ -165,24 +150,22 @@ type IReplybodyContext interface {
 	GetParser() antlr.Parser
 
 	// GetReturnToken returns the returnToken token.
-	GetReturnToken() antlr.Token 
+	GetReturnToken() antlr.Token
 
 	// GetLp returns the lp token.
-	GetLp() antlr.Token 
+	GetLp() antlr.Token
 
 	// GetRp returns the rp token.
-	GetRp() antlr.Token 
-
+	GetRp() antlr.Token
 
 	// SetReturnToken sets the returnToken token.
-	SetReturnToken(antlr.Token) 
+	SetReturnToken(antlr.Token)
 
 	// SetLp sets the lp token.
-	SetLp(antlr.Token) 
+	SetLp(antlr.Token)
 
 	// SetRp sets the rp token.
-	SetRp(antlr.Token) 
-
+	SetRp(antlr.Token)
 
 	// IsReplybodyContext differentiates from other interfaces.
 	IsReplybodyContext()
@@ -190,14 +173,14 @@ type IReplybodyContext interface {
 
 type ReplybodyContext struct {
 	*antlr.BaseParserRuleContext
-	parser antlr.Parser
+	parser      antlr.Parser
 	returnToken antlr.Token
-	lp antlr.Token
-	rp antlr.Token
+	lp          antlr.Token
+	rp          antlr.Token
 }
 
 func NewEmptyReplybodyContext() *ReplybodyContext {
-	var p = new(ReplybodyContext)
+	p := new(ReplybodyContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_replybody
 	return p
@@ -206,7 +189,7 @@ func NewEmptyReplybodyContext() *ReplybodyContext {
 func (*ReplybodyContext) IsReplybodyContext() {}
 
 func NewReplybodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ReplybodyContext {
-	var p = new(ReplybodyContext)
+	p := new(ReplybodyContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -224,16 +207,14 @@ func (s *ReplybodyContext) GetLp() antlr.Token { return s.lp }
 
 func (s *ReplybodyContext) GetRp() antlr.Token { return s.rp }
 
-
 func (s *ReplybodyContext) SetReturnToken(v antlr.Token) { s.returnToken = v }
 
 func (s *ReplybodyContext) SetLp(v antlr.Token) { s.lp = v }
 
 func (s *ReplybodyContext) SetRp(v antlr.Token) { s.rp = v }
 
-
 func (s *ReplybodyContext) DataType() IDataTypeContext {
-	var t = s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
+	t := s.GetTypedRuleContext(reflect.TypeOf((*IDataTypeContext)(nil)).Elem(), 0)
 
 	if t == nil {
 		return nil
@@ -250,7 +231,6 @@ func (s *ReplybodyContext) ToStringTree(ruleNames []string, recog antlr.Recogniz
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ReplybodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -261,15 +241,11 @@ func (s *ReplybodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) Replybody() (localctx IReplybodyContext) {
 	localctx = NewReplybodyContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 66, ApiParserParserRULE_replybody)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -290,14 +266,14 @@ func (p *ApiParserParser) Replybody() (localctx IReplybodyContext) {
 	{
 		p.SetState(305)
 
-		var _m = p.Match(ApiParserParserT__9)
+		_m := p.Match(ApiParserParserT__9)
 
 		localctx.(*ReplybodyContext).returnToken = _m
 	}
 	{
 		p.SetState(306)
 
-		var _m = p.Match(ApiParserParserT__1)
+		_m := p.Match(ApiParserParserT__1)
 
 		localctx.(*ReplybodyContext).lp = _m
 	}
@@ -305,28 +281,23 @@ func (p *ApiParserParser) Replybody() (localctx IReplybodyContext) {
 	p.GetErrorHandler().Sync(p)
 	_la = p.GetTokenStream().LA(1)
 
-
-	if (((_la) & -(0x1f+1)) == 0 && ((1 << uint(_la)) & ((1 << ApiParserParserT__5) | (1 << ApiParserParserT__6) | (1 << ApiParserParserT__7) | (1 << ApiParserParserINTERFACE) | (1 << ApiParserParserID))) != 0) {
+	if ((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<ApiParserParserT__5)|(1<<ApiParserParserT__6)|(1<<ApiParserParserT__7)|(1<<ApiParserParserINTERFACE)|(1<<ApiParserParserID))) != 0 {
 		{
 			p.SetState(307)
 			p.DataType()
 		}
-
 	}
 	{
 		p.SetState(310)
 
-		var _m = p.Match(ApiParserParserT__2)
+		_m := p.Match(ApiParserParserT__2)
 
 		localctx.(*ReplybodyContext).rp = _m
 	}
 
-
-
 	return localctx
 }
 
-
 // IKvLitContext is an interface to support dynamic dispatch.
 type IKvLitContext interface {
 	antlr.ParserRuleContext
@@ -335,18 +306,16 @@ type IKvLitContext interface {
 	GetParser() antlr.Parser
 
 	// GetKey returns the key token.
-	GetKey() antlr.Token 
+	GetKey() antlr.Token
 
 	// GetValue returns the value token.
-	GetValue() antlr.Token 
-
+	GetValue() antlr.Token
 
 	// SetKey sets the key token.
-	SetKey(antlr.Token) 
+	SetKey(antlr.Token)
 
 	// SetValue sets the value token.
-	SetValue(antlr.Token) 
-
+	SetValue(antlr.Token)
 
 	// IsKvLitContext differentiates from other interfaces.
 	IsKvLitContext()
@@ -355,12 +324,12 @@ type IKvLitContext interface {
 type KvLitContext struct {
 	*antlr.BaseParserRuleContext
 	parser antlr.Parser
-	key antlr.Token
-	value antlr.Token
+	key    antlr.Token
+	value  antlr.Token
 }
 
 func NewEmptyKvLitContext() *KvLitContext {
-	var p = new(KvLitContext)
+	p := new(KvLitContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_kvLit
 	return p
@@ -369,7 +338,7 @@ func NewEmptyKvLitContext() *KvLitContext {
 func (*KvLitContext) IsKvLitContext() {}
 
 func NewKvLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *KvLitContext {
-	var p = new(KvLitContext)
+	p := new(KvLitContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -385,12 +354,10 @@ func (s *KvLitContext) GetKey() antlr.Token { return s.key }
 
 func (s *KvLitContext) GetValue() antlr.Token { return s.value }
 
-
 func (s *KvLitContext) SetKey(v antlr.Token) { s.key = v }
 
 func (s *KvLitContext) SetValue(v antlr.Token) { s.value = v }
 
-
 func (s *KvLitContext) ID() antlr.TerminalNode {
 	return s.GetToken(ApiParserParserID, 0)
 }
@@ -407,7 +374,6 @@ func (s *KvLitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer)
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *KvLitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -418,9 +384,6 @@ func (s *KvLitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) KvLit() (localctx IKvLitContext) {
 	localctx = NewKvLitContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 68, ApiParserParserRULE_kvLit)
@@ -445,7 +408,7 @@ func (p *ApiParserParser) KvLit() (localctx IKvLitContext) {
 	{
 		p.SetState(312)
 
-		var _m = p.Match(ApiParserParserID)
+		_m := p.Match(ApiParserParserID)
 
 		localctx.(*KvLitContext).key = _m
 	}
@@ -453,17 +416,14 @@ func (p *ApiParserParser) KvLit() (localctx IKvLitContext) {
 	{
 		p.SetState(314)
 
-		var _m = p.Match(ApiParserParserLINE_VALUE)
+		_m := p.Match(ApiParserParserLINE_VALUE)
 
 		localctx.(*KvLitContext).value = _m
 	}
 
-
-
 	return localctx
 }
 
-
 // IServiceNameContext is an interface to support dynamic dispatch.
 type IServiceNameContext interface {
 	antlr.ParserRuleContext
@@ -481,7 +441,7 @@ type ServiceNameContext struct {
 }
 
 func NewEmptyServiceNameContext() *ServiceNameContext {
-	var p = new(ServiceNameContext)
+	p := new(ServiceNameContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_serviceName
 	return p
@@ -490,7 +450,7 @@ func NewEmptyServiceNameContext() *ServiceNameContext {
 func (*ServiceNameContext) IsServiceNameContext() {}
 
 func NewServiceNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ServiceNameContext {
-	var p = new(ServiceNameContext)
+	p := new(ServiceNameContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -518,7 +478,6 @@ func (s *ServiceNameContext) ToStringTree(ruleNames []string, recog antlr.Recogn
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *ServiceNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -529,15 +488,11 @@ func (s *ServiceNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{}
 	}
 }
 
-
-
-
 func (p *ApiParserParser) ServiceName() (localctx IServiceNameContext) {
 	localctx = NewServiceNameContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 70, ApiParserParserRULE_serviceName)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -567,27 +522,21 @@ func (p *ApiParserParser) ServiceName() (localctx IServiceNameContext) {
 		p.GetErrorHandler().Sync(p)
 		_la = p.GetTokenStream().LA(1)
 
-
 		if _la == ApiParserParserT__10 {
 			{
 				p.SetState(317)
 				p.Match(ApiParserParserT__10)
 			}
-
 		}
 
-
 		p.SetState(322)
 		p.GetErrorHandler().Sync(p)
 		_la = p.GetTokenStream().LA(1)
 	}
 
-
-
 	return localctx
 }
 
-
 // IPathContext is an interface to support dynamic dispatch.
 type IPathContext interface {
 	antlr.ParserRuleContext
@@ -605,7 +554,7 @@ type PathContext struct {
 }
 
 func NewEmptyPathContext() *PathContext {
-	var p = new(PathContext)
+	p := new(PathContext)
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
 	p.RuleIndex = ApiParserParserRULE_path
 	return p
@@ -614,7 +563,7 @@ func NewEmptyPathContext() *PathContext {
 func (*PathContext) IsPathContext() {}
 
 func NewPathContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PathContext {
-	var p = new(PathContext)
+	p := new(PathContext)
 
 	p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
 
@@ -642,7 +591,6 @@ func (s *PathContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) s
 	return antlr.TreesStringTree(s, ruleNames, recog)
 }
 
-
 func (s *PathContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	switch t := visitor.(type) {
 	case ApiParserVisitor:
@@ -653,15 +601,11 @@ func (s *PathContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
 	}
 }
 
-
-
-
 func (p *ApiParserParser) Path() (localctx IPathContext) {
 	localctx = NewPathContext(p, p.GetParserRuleContext(), p.GetState())
 	p.EnterRule(localctx, 72, ApiParserParserRULE_path)
 	var _la int
 
-
 	defer func() {
 		p.ExitRule()
 	}()
@@ -705,7 +649,6 @@ func (p *ApiParserParser) Path() (localctx IPathContext) {
 				p.GetErrorHandler().Sync(p)
 				_la = p.GetTokenStream().LA(1)
 
-
 				for _la == ApiParserParserT__10 {
 					{
 						p.SetState(326)
@@ -716,15 +659,11 @@ func (p *ApiParserParser) Path() (localctx IPathContext) {
 						p.Match(ApiParserParserID)
 					}
 
-
 					p.SetState(332)
 					p.GetErrorHandler().Sync(p)
 					_la = p.GetTokenStream().LA(1)
 				}
 
-
-
-
 			case ApiParserParserT__12:
 				{
 					p.SetState(333)
@@ -739,7 +678,6 @@ func (p *ApiParserParser) Path() (localctx IPathContext) {
 				p.GetErrorHandler().Sync(p)
 				_la = p.GetTokenStream().LA(1)
 
-
 				if _la == ApiParserParserT__10 {
 					{
 						p.SetState(335)
@@ -752,10 +690,6 @@ func (p *ApiParserParser) Path() (localctx IPathContext) {
 
 				}
 
-
-
-
-
 			default:
 				panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
 			}
@@ -765,7 +699,6 @@ func (p *ApiParserParser) Path() (localctx IPathContext) {
 			_la = p.GetTokenStream().LA(1)
 		}
 
-
 	case 2:
 		p.EnterOuterAlt(localctx, 2)
 		{
@@ -775,6 +708,5 @@ func (p *ApiParserParser) Path() (localctx IPathContext) {
 
 	}
 
-
 	return localctx
 }

+ 6 - 8
tools/goctl/api/parser/g4/gen/api/apiparser_parser9.go

@@ -10,14 +10,14 @@ import (
 // The apiparser_parser.go file was split into multiple files because it
 // was too large and caused a possible memory overflow during goctl installation.
 
-
 func (p *ApiParserParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
 	switch ruleIndex {
 	case 18:
-			var t *FieldContext = nil
-			if localctx != nil { t = localctx.(*FieldContext) }
-			return p.Field_Sempred(t, predIndex)
-
+		var t *FieldContext = nil
+		if localctx != nil {
+			t = localctx.(*FieldContext)
+		}
+		return p.Field_Sempred(t, predIndex)
 
 	default:
 		panic("No predicate with index: " + fmt.Sprint(ruleIndex))
@@ -27,11 +27,9 @@ func (p *ApiParserParser) Sempred(localctx antlr.RuleContext, ruleIndex, predInd
 func (p *ApiParserParser) Field_Sempred(localctx antlr.RuleContext, predIndex int) bool {
 	switch predIndex {
 	case 0:
-			return isNormal(p)
+		return isNormal(p)
 
 	default:
 		panic("No predicate with index: " + fmt.Sprint(predIndex))
 	}
 }
-
-

+ 41 - 40
tools/goctl/api/parser/g4/gen/api/apiparser_visitor.go

@@ -1,118 +1,119 @@
 package api // ApiParser
+
 import "github.com/zeromicro/antlr"
-// A complete Visitor for a parse tree produced by ApiParserParser.
+
+// ApiParserVisitor is a complete Visitor for a parse tree produced by ApiParserParser.
 type ApiParserVisitor interface {
 	antlr.ParseTreeVisitor
 
-	// Visit a parse tree produced by ApiParserParser#api.
+	// VisitApi is a parse tree produced by ApiParserParser#api.
 	VisitApi(ctx *ApiContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#spec.
+	// VisitSpec is a parse tree produced by ApiParserParser#spec.
 	VisitSpec(ctx *SpecContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#syntaxLit.
+	// VisitSyntaxLit is a parse tree produced by ApiParserParser#syntaxLit.
 	VisitSyntaxLit(ctx *SyntaxLitContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#importSpec.
+	// VisitImportSpec is a parse tree produced by ApiParserParser#importSpec.
 	VisitImportSpec(ctx *ImportSpecContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#importLit.
+	// VisitImportLit is a parse tree produced by ApiParserParser#importLit.
 	VisitImportLit(ctx *ImportLitContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#importBlock.
+	// VisitImportBlock is a parse tree produced by ApiParserParser#importBlock.
 	VisitImportBlock(ctx *ImportBlockContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#importBlockValue.
+	// VisitImportBlockValue is a parse tree produced by ApiParserParser#importBlockValue.
 	VisitImportBlockValue(ctx *ImportBlockValueContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#importValue.
+	// VisitImportValue is a parse tree produced by ApiParserParser#importValue.
 	VisitImportValue(ctx *ImportValueContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#infoSpec.
+	// VisitInfoSpec is a parse tree produced by ApiParserParser#infoSpec.
 	VisitInfoSpec(ctx *InfoSpecContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeSpec.
+	// VisitTypeSpec is a parse tree produced by ApiParserParser#typeSpec.
 	VisitTypeSpec(ctx *TypeSpecContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeLit.
+	// VisitTypeLit is a parse tree produced by ApiParserParser#typeLit.
 	VisitTypeLit(ctx *TypeLitContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeBlock.
+	// VisitTypeBlock is a parse tree produced by ApiParserParser#typeBlock.
 	VisitTypeBlock(ctx *TypeBlockContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeLitBody.
+	// VisitTypeLitBody is a parse tree produced by ApiParserParser#typeLitBody.
 	VisitTypeLitBody(ctx *TypeLitBodyContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeBlockBody.
+	// VisitTypeBlockBody is a parse tree produced by ApiParserParser#typeBlockBody.
 	VisitTypeBlockBody(ctx *TypeBlockBodyContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeStruct.
+	// VisitTypeStruct is a parse tree produced by ApiParserParser#typeStruct.
 	VisitTypeStruct(ctx *TypeStructContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeAlias.
+	// VisitTypeAlias is a parse tree produced by ApiParserParser#typeAlias.
 	VisitTypeAlias(ctx *TypeAliasContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeBlockStruct.
+	// VisitTypeBlockStruct is a parse tree produced by ApiParserParser#typeBlockStruct.
 	VisitTypeBlockStruct(ctx *TypeBlockStructContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#typeBlockAlias.
+	// VisitTypeBlockAlias is a parse tree produced by ApiParserParser#typeBlockAlias.
 	VisitTypeBlockAlias(ctx *TypeBlockAliasContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#field.
+	// VisitField is a parse tree produced by ApiParserParser#field.
 	VisitField(ctx *FieldContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#normalField.
+	// VisitNormalField is a parse tree produced by ApiParserParser#normalField.
 	VisitNormalField(ctx *NormalFieldContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#anonymousFiled.
+	// VisitAnonymousFiled is a parse tree produced by ApiParserParser#anonymousFiled.
 	VisitAnonymousFiled(ctx *AnonymousFiledContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#dataType.
+	// VisitDataType is a parse tree produced by ApiParserParser#dataType.
 	VisitDataType(ctx *DataTypeContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#pointerType.
+	// VisitPointerType is a parse tree produced by ApiParserParser#pointerType.
 	VisitPointerType(ctx *PointerTypeContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#mapType.
+	// VisitMapType is a parse tree produced by ApiParserParser#mapType.
 	VisitMapType(ctx *MapTypeContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#arrayType.
+	// VisitArrayType is a parse tree produced by ApiParserParser#arrayType.
 	VisitArrayType(ctx *ArrayTypeContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#serviceSpec.
+	// VisitServiceSpec is a parse tree produced by ApiParserParser#serviceSpec.
 	VisitServiceSpec(ctx *ServiceSpecContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#atServer.
+	// VisitAtServer is a parse tree produced by ApiParserParser#atServer.
 	VisitAtServer(ctx *AtServerContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#serviceApi.
+	// VisitServiceApi is a parse tree produced by ApiParserParser#serviceApi.
 	VisitServiceApi(ctx *ServiceApiContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#serviceRoute.
+	// VisitServiceRoute is a parse tree produced by ApiParserParser#serviceRoute.
 	VisitServiceRoute(ctx *ServiceRouteContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#atDoc.
+	// VisitAtDoc is a parse tree produced by ApiParserParser#atDoc.
 	VisitAtDoc(ctx *AtDocContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#atHandler.
+	// VisitAtHandler is a parse tree produced by ApiParserParser#atHandler.
 	VisitAtHandler(ctx *AtHandlerContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#route.
+	// VisitRoute is a parse tree produced by ApiParserParser#route.
 	VisitRoute(ctx *RouteContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#body.
+	// VisitBody is a parse tree produced by ApiParserParser#body.
 	VisitBody(ctx *BodyContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#replybody.
+	// VisitReplybody is a parse tree produced by ApiParserParser#replybody.
 	VisitReplybody(ctx *ReplybodyContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#kvLit.
+	// VisitKvLit is a parse tree produced by ApiParserParser#kvLit.
 	VisitKvLit(ctx *KvLitContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#serviceName.
+	// VisitServiceName is a parse tree produced by ApiParserParser#serviceName.
 	VisitServiceName(ctx *ServiceNameContext) interface{}
 
-	// Visit a parse tree produced by ApiParserParser#path.
+	// VisitPath is a parse tree produced by ApiParserParser#path.
 	VisitPath(ctx *PathContext) interface{}
-
-}
+}

+ 1 - 1
tools/goctl/api/parser/g4/gen/api/file_splitor_test.go

@@ -28,7 +28,7 @@ func TestFileSplitor(t *testing.T) {
 	buffer := bytes.NewBuffer(nil)
 
 	for {
-		var fn, part = "apiparser_parser0.go", "main"
+		fn, part := "apiparser_parser0.go", "main"
 		if files > 0 {
 			fn = fmt.Sprintf("apiparser_parser%d.go", files)
 			part = fmt.Sprintf("%d", files)

+ 1 - 1
tools/goctl/upgrade/upgrade.go

@@ -11,7 +11,7 @@ import (
 // Upgrade gets the latest goctl by
 // go get -u github.com/tal-tech/go-zero/tools/goctl
 func Upgrade(_ *cli.Context) error {
-	var cmd = `GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go install github.com/tal-tech/go-zero/tools/goctl@cli`
+	cmd := `GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go install github.com/tal-tech/go-zero/tools/goctl@cli`
 	if runtime.GOOS == "windows" {
 		cmd = `set GOPROXY=https://goproxy.cn,direct && go install github.com/tal-tech/go-zero/tools/goctl@cli`
 	}