full_moon 0.3.0

A lossless Lua 5.1 parser
Documentation
{
  "stmts": [
    {
      "FunctionCall": {
        "prefix": {
          "Name": {
            "start_position": {
              "bytes": 0,
              "character": 1,
              "line": 1
            },
            "end_position": {
              "bytes": 4,
              "character": 5,
              "line": 1
            },
            "token_type": {
              "type": "Identifier",
              "identifier": "call"
            }
          }
        },
        "suffixes": [
          {
            "Call": {
              "AnonymousCall": {
                "TableConstructor": {
                  "fields": [
                    [
                      {
                        "NameKey": {
                          "key": {
                            "start_position": {
                              "bytes": 7,
                              "character": 8,
                              "line": 1
                            },
                            "end_position": {
                              "bytes": 8,
                              "character": 9,
                              "line": 1
                            },
                            "token_type": {
                              "type": "Identifier",
                              "identifier": "x"
                            }
                          },
                          "value": {
                            "value": {
                              "Number": {
                                "start_position": {
                                  "bytes": 11,
                                  "character": 12,
                                  "line": 1
                                },
                                "end_position": {
                                  "bytes": 12,
                                  "character": 13,
                                  "line": 1
                                },
                                "token_type": {
                                  "type": "Number",
                                  "text": "1"
                                }
                              }
                            },
                            "binop": null
                          }
                        }
                      },
                      null
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    },
    {
      "FunctionCall": {
        "prefix": {
          "Name": {
            "start_position": {
              "bytes": 15,
              "character": 15,
              "line": 1
            },
            "end_position": {
              "bytes": 19,
              "character": 5,
              "line": 2
            },
            "token_type": {
              "type": "Identifier",
              "identifier": "call"
            }
          }
        },
        "suffixes": [
          {
            "Call": {
              "AnonymousCall": {
                "String": {
                  "start_position": {
                    "bytes": 20,
                    "character": 6,
                    "line": 2
                  },
                  "end_position": {
                    "bytes": 27,
                    "character": 13,
                    "line": 2
                  },
                  "token_type": {
                    "type": "StringLiteral",
                    "literal": "hello",
                    "quote_type": "Double"
                  }
                }
              }
            }
          }
        ]
      }
    }
  ]
}