Closed apstndb closed 3 weeks ago
fixes #144
This PR fixes the spec of ArrayLiteral.SQL() to preserve lexical tokens.
ArrayLiteral.SQL()
$ go run ./tools/parse --mode expr '[]' --- AST &ast.ArrayLiteral{ Array: -1, Lbrack: 0, Rbrack: 1, Type: nil, Values: []ast.Expr(nil), } --- SQL []
$ go run ./tools/parse --mode expr 'ARRAY[]' --- AST &ast.ArrayLiteral{ Array: 0, Lbrack: 5, Rbrack: 6, Type: nil, Values: []ast.Expr(nil), } --- SQL ARRAY[]
$ go run ./tools/parse --mode expr 'ARRAY<INT64>[]' --- AST &ast.ArrayLiteral{ Array: 0, Lbrack: 12, Rbrack: 13, Type: &ast.SimpleType{ NamePos: 6, Name: "INT64", }, Values: []ast.Expr(nil), } --- SQL ARRAY<INT64>[]
fixes #144
This PR fixes the spec of
ArrayLiteral.SQL()
to preserve lexical tokens.