z_mirror/luapls
git clone https://git.raiguard.me/z_mirror/luapls
d89f2de
main
1package ast 2 3import "github.com/raiguard/luapls/lua/token" 4 5type TableField interface { 6Node 7tableFieldNode () 8} 9 10type TableArrayField struct { 11Expr Expression 12} 13 14func (taf * TableArrayField )tableFieldNode () {} 15func (taf * TableArrayField )Pos () token.Pos { 16return taf .Expr .Pos () 17} 18func (taf * TableArrayField )End () token.Pos { 19return taf .Expr .End () 20} 21 22type TableSimpleKeyField struct { 23Name Identifier 24AssignTok Unit 25Expr Expression 26} 27 28func (tf * TableSimpleKeyField )tableFieldNode () {} 29func (tf * TableSimpleKeyField )Pos () token.Pos { 30return tf .Name .Pos () 31} 32func (tf * TableSimpleKeyField )End () token.Pos { 33return tf .Expr .End () 34} 35 36type TableExpressionKeyField struct { 37LeftBracket Unit 38Name Expression 39RightBracket Unit 40AssignTok Unit 41Expr Expression 42} 43 44func (tf * TableExpressionKeyField )tableFieldNode () {} 45func (tf * TableExpressionKeyField )Pos () token.Pos { 46return tf .LeftBracket .Pos () 47} 48func (tf * TableExpressionKeyField )End () token.Pos { 49return tf .Expr .End () 50}