z_mirror/luapls
git clone https://git.raiguard.me/z_mirror/luapls
5c64afc
main
1package ast 2 3import ( 4"encoding/json" 5 6"github.com/raiguard/luapls/lua/token" 7) 8 9func (node * AssignmentStatement )MarshalJSON () ([]byte ,error ) { 10type Alias AssignmentStatement 11return json .Marshal (& struct { 12Type string 13Range token.Range 14* Alias 15 }{ 16Type :"AssignmentStatement" , 17Range :Range (node ), 18Alias : (* Alias )(node ), 19 }) 20} 21 22func (node * BooleanLiteral )MarshalJSON () ([]byte ,error ) { 23type Alias BooleanLiteral 24return json .Marshal (& struct { 25Type string 26Range token.Range 27* Alias 28 }{ 29Type :"BooleanLiteral" , 30Range :Range (node ), 31Alias : (* Alias )(node ), 32 }) 33} 34 35func (node * BreakStatement )MarshalJSON () ([]byte ,error ) { 36type Alias BreakStatement 37return json .Marshal (& struct { 38Type string 39Range token.Range 40* Alias 41 }{ 42Type :"BreakStatement" , 43Range :Range (node ), 44Alias : (* Alias )(node ), 45 }) 46} 47 48func (node * DoStatement )MarshalJSON () ([]byte ,error ) { 49type Alias DoStatement 50return json .Marshal (& struct { 51Type string 52Range token.Range 53* Alias 54 }{ 55Type :"DoStatement" , 56Range :Range (node ), 57Alias : (* Alias )(node ), 58 }) 59} 60 61func (node * ForInStatement )MarshalJSON () ([]byte ,error ) { 62type Alias ForInStatement 63return json .Marshal (& struct { 64Type string 65Range token.Range 66* Alias 67 }{ 68Type :"ForInStatement" , 69Range :Range (node ), 70Alias : (* Alias )(node ), 71 }) 72} 73 74func (node * ForStatement )MarshalJSON () ([]byte ,error ) { 75type Alias ForStatement 76return json .Marshal (& struct { 77Type string 78Range token.Range 79* Alias 80 }{ 81Type :"ForStatement" , 82Range :Range (node ), 83Alias : (* Alias )(node ), 84 }) 85} 86 87func (node * FunctionCall )MarshalJSON () ([]byte ,error ) { 88type Alias FunctionCall 89return json .Marshal (& struct { 90Type string 91Range token.Range 92* Alias 93 }{ 94Type :"FunctionCall" , 95Range :Range (node ), 96Alias : (* Alias )(node ), 97 }) 98} 99 100func (node * FunctionExpression )MarshalJSON () ([]byte ,error ) { 101type Alias FunctionExpression 102return json .Marshal (& struct { 103Type string 104Range token.Range 105* Alias 106 }{ 107Type :"FunctionExpression" , 108Range :Range (node ), 109Alias : (* Alias )(node ), 110 }) 111} 112 113func (node * FunctionStatement )MarshalJSON () ([]byte ,error ) { 114type Alias FunctionStatement 115return json .Marshal (& struct { 116Type string 117Range token.Range 118* Alias 119 }{ 120Type :"FunctionStatement" , 121Range :Range (node ), 122Alias : (* Alias )(node ), 123 }) 124} 125 126func (node * GotoStatement )MarshalJSON () ([]byte ,error ) { 127type Alias GotoStatement 128return json .Marshal (& struct { 129Type string 130Range token.Range 131* Alias 132 }{ 133Type :"GotoStatement" , 134Range :Range (node ), 135Alias : (* Alias )(node ), 136 }) 137} 138 139func (node * Identifier )MarshalJSON () ([]byte ,error ) { 140type Alias Identifier 141return json .Marshal (& struct { 142Type string 143Range token.Range 144* Alias 145 }{ 146Type :"Identifier" , 147Range :Range (node ), 148Alias : (* Alias )(node ), 149 }) 150} 151 152func (node * IfClause )MarshalJSON () ([]byte ,error ) { 153type Alias IfClause 154return json .Marshal (& struct { 155Type string 156Range token.Range 157* Alias 158 }{ 159Type :"IfClause" , 160Range :Range (node ), 161Alias : (* Alias )(node ), 162 }) 163} 164 165func (node * IfStatement )MarshalJSON () ([]byte ,error ) { 166type Alias IfStatement 167return json .Marshal (& struct { 168Type string 169Range token.Range 170* Alias 171 }{ 172Type :"IfStatement" , 173Range :Range (node ), 174Alias : (* Alias )(node ), 175 }) 176} 177 178func (node * IndexExpression )MarshalJSON () ([]byte ,error ) { 179type Alias IndexExpression 180return json .Marshal (& struct { 181Type string 182Range token.Range 183* Alias 184 }{ 185Type :"IndexExpression" , 186Range :Range (node ), 187Alias : (* Alias )(node ), 188 }) 189} 190 191func (node * InfixExpression )MarshalJSON () ([]byte ,error ) { 192type Alias InfixExpression 193return json .Marshal (& struct { 194Type string 195Range token.Range 196* Alias 197 }{ 198Type :"InfixExpression" , 199Range :Range (node ), 200Alias : (* Alias )(node ), 201 }) 202} 203 204func (node * LabelStatement )MarshalJSON () ([]byte ,error ) { 205type Alias LabelStatement 206return json .Marshal (& struct { 207Type string 208Range token.Range 209* Alias 210 }{ 211Type :"LabelStatement" , 212Range :Range (node ), 213Alias : (* Alias )(node ), 214 }) 215} 216 217func (node * Invalid )MarshalJSON () ([]byte ,error ) { 218type Alias Invalid 219return json .Marshal (& struct { 220Type string 221Range token.Range 222* Alias 223 }{ 224Type :"Invalid" , 225Range :Range (node ), 226Alias : (* Alias )(node ), 227 }) 228} 229 230func (node * LocalStatement )MarshalJSON () ([]byte ,error ) { 231type Alias LocalStatement 232return json .Marshal (& struct { 233Type string 234Range token.Range 235* Alias 236 }{ 237Type :"LocalStatement" , 238Range :Range (node ), 239Alias : (* Alias )(node ), 240 }) 241} 242 243func (node * NilLiteral )MarshalJSON () ([]byte ,error ) { 244type Alias NilLiteral 245return json .Marshal (& struct { 246Type string 247Range token.Range 248* Alias 249 }{ 250Type :"NilLiteral" , 251Range :Range (node ), 252Alias : (* Alias )(node ), 253 }) 254} 255 256func (node * NumberLiteral )MarshalJSON () ([]byte ,error ) { 257type Alias NumberLiteral 258return json .Marshal (& struct { 259Type string 260Range token.Range 261* Alias 262 }{ 263Type :"NumberLiteral" , 264Range :Range (node ), 265Alias : (* Alias )(node ), 266 }) 267} 268 269func (node * Pair [T ])MarshalJSON () ([]byte ,error ) { 270type Alias Pair [T ] 271return json .Marshal (& struct { 272Type string 273Range token.Range 274* Alias 275 }{ 276Type :"Pair" , 277Range :Range (node ), 278Alias : (* Alias )(node ), 279 }) 280} 281 282func (node * Punctuated [T ])MarshalJSON () ([]byte ,error ) { 283type Alias Punctuated [T ] 284return json .Marshal (& struct { 285Type string 286Range token.Range 287* Alias 288 }{ 289Type :"Punctuated" , 290Range :Range (node ), 291Alias : (* Alias )(node ), 292 }) 293} 294 295func (node * PrefixExpression )MarshalJSON () ([]byte ,error ) { 296type Alias PrefixExpression 297return json .Marshal (& struct { 298Type string 299Range token.Range 300* Alias 301 }{ 302Type :"PrefixExpression" , 303Range :Range (node ), 304Alias : (* Alias )(node ), 305 }) 306} 307 308func (node * RepeatStatement )MarshalJSON () ([]byte ,error ) { 309type Alias RepeatStatement 310return json .Marshal (& struct { 311Type string 312Range token.Range 313* Alias 314 }{ 315Type :"RepeatStatement" , 316Range :Range (node ), 317Alias : (* Alias )(node ), 318 }) 319} 320 321func (node * ReturnStatement )MarshalJSON () ([]byte ,error ) { 322type Alias ReturnStatement 323return json .Marshal (& struct { 324Type string 325Range token.Range 326* Alias 327 }{ 328Type :"ReturnStatement" , 329Range :Range (node ), 330Alias : (* Alias )(node ), 331 }) 332} 333 334func (node * SemicolonStatement )MarshalJSON () ([]byte ,error ) { 335type Alias SemicolonStatement 336return json .Marshal (& struct { 337Type string 338Range token.Range 339* Alias 340 }{ 341Type :"SemicolonStatement" , 342Range :Range (node ), 343Alias : (* Alias )(node ), 344 }) 345} 346 347func (node * StringLiteral )MarshalJSON () ([]byte ,error ) { 348type Alias StringLiteral 349return json .Marshal (& struct { 350Type string 351Range token.Range 352* Alias 353 }{ 354Type :"StringLiteral" , 355Range :Range (node ), 356Alias : (* Alias )(node ), 357 }) 358} 359 360func (node * TableArrayField )MarshalJSON () ([]byte ,error ) { 361type Alias TableArrayField 362return json .Marshal (& struct { 363Type string 364Range token.Range 365* Alias 366 }{ 367Type :"TableArrayField" , 368Range :Range (node ), 369Alias : (* Alias )(node ), 370 }) 371} 372 373func (node * TableSimpleKeyField )MarshalJSON () ([]byte ,error ) { 374type Alias TableSimpleKeyField 375return json .Marshal (& struct { 376Type string 377Range token.Range 378* Alias 379 }{ 380Type :"TableSimpleKeyField" , 381Range :Range (node ), 382Alias : (* Alias )(node ), 383 }) 384} 385 386func (node * TableExpressionKeyField )MarshalJSON () ([]byte ,error ) { 387type Alias TableExpressionKeyField 388return json .Marshal (& struct { 389Type string 390Range token.Range 391* Alias 392 }{ 393Type :"TableExpressionKeyField" , 394Range :Range (node ), 395Alias : (* Alias )(node ), 396 }) 397} 398 399func (node * TableLiteral )MarshalJSON () ([]byte ,error ) { 400type Alias TableLiteral 401return json .Marshal (& struct { 402Type string 403Range token.Range 404* Alias 405 }{ 406Type :"TableLiteral" , 407Range :Range (node ), 408Alias : (* Alias )(node ), 409 }) 410} 411 412func (node * Vararg )MarshalJSON () ([]byte ,error ) { 413type Alias Vararg 414return json .Marshal (& struct { 415Type string 416Range token.Range 417* Alias 418 }{ 419Type :"Vararg" , 420Range :Range (node ), 421Alias : (* Alias )(node ), 422 }) 423} 424 425func (node * WhileStatement )MarshalJSON () ([]byte ,error ) { 426type Alias WhileStatement 427return json .Marshal (& struct { 428Type string 429Range token.Range 430* Alias 431 }{ 432Type :"WhileStatement" , 433Range :Range (node ), 434Alias : (* Alias )(node ), 435 }) 436}