mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-07 15:10:01 +08:00
goctl features of 1.8.4-alpha (#4849)
This commit is contained in:
@@ -1356,7 +1356,7 @@ func (p *Parser) parseKVExpression() *ast.KVExpr {
|
||||
expr.Colon = p.curTokenNode()
|
||||
|
||||
// token STRING
|
||||
if !p.advanceIfPeekTokenIs(token.STRING, token.RAW_STRING) {
|
||||
if !p.advanceIfPeekTokenIs(token.STRING, token.RAW_STRING, token.IDENT) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -130,6 +130,8 @@ func TestParser_Parse_infoStmt(t *testing.T) {
|
||||
"author": `"type author here"`,
|
||||
"email": `"type email here"`,
|
||||
"version": `"type version here"`,
|
||||
"enable": `true`,
|
||||
"disable": `false`,
|
||||
}
|
||||
p := New("foo.api", infoTestAPI)
|
||||
result := p.Parse()
|
||||
|
||||
@@ -4,4 +4,6 @@ info(
|
||||
author: "type author here"
|
||||
email: "type email here"
|
||||
version: "type version here"
|
||||
enable: true
|
||||
disable: false
|
||||
)
|
||||
@@ -10,6 +10,8 @@ info ( // info stmt
|
||||
author: "type author here"
|
||||
email: "type email here"
|
||||
version: "type version here"
|
||||
enable: true
|
||||
disable: false
|
||||
)
|
||||
|
||||
type AliasInt int
|
||||
|
||||
Reference in New Issue
Block a user