full_moon 0.3.0

A lossless Lua 5.1 parser
Documentation
{
  "stmts": [
    {
      "LocalFunction": {
        "name": {
          "start_position": {
            "bytes": 15,
            "character": 16,
            "line": 1
          },
          "end_position": {
            "bytes": 18,
            "character": 19,
            "line": 1
          },
          "token_type": {
            "type": "Identifier",
            "identifier": "foo"
          }
        },
        "func_body": {
          "parameters": [
            {
              "Name": {
                "start_position": {
                  "bytes": 19,
                  "character": 20,
                  "line": 1
                },
                "end_position": {
                  "bytes": 20,
                  "character": 21,
                  "line": 1
                },
                "token_type": {
                  "type": "Identifier",
                  "identifier": "a"
                }
              }
            },
            {
              "Name": {
                "start_position": {
                  "bytes": 22,
                  "character": 23,
                  "line": 1
                },
                "end_position": {
                  "bytes": 23,
                  "character": 24,
                  "line": 1
                },
                "token_type": {
                  "type": "Identifier",
                  "identifier": "b"
                }
              }
            }
          ],
          "block": {
            "stmts": []
          }
        }
      }
    },
    {
      "LocalFunction": {
        "name": {
          "start_position": {
            "bytes": 44,
            "character": 16,
            "line": 2
          },
          "end_position": {
            "bytes": 47,
            "character": 19,
            "line": 2
          },
          "token_type": {
            "type": "Identifier",
            "identifier": "bar"
          }
        },
        "func_body": {
          "parameters": [
            {
              "Ellipse": {
                "start_position": {
                  "bytes": 48,
                  "character": 20,
                  "line": 2
                },
                "end_position": {
                  "bytes": 51,
                  "character": 23,
                  "line": 2
                },
                "token_type": {
                  "type": "Symbol",
                  "symbol": "..."
                }
              }
            }
          ],
          "block": {
            "stmts": []
          }
        }
      }
    },
    {
      "LocalFunction": {
        "name": {
          "start_position": {
            "bytes": 72,
            "character": 16,
            "line": 3
          },
          "end_position": {
            "bytes": 75,
            "character": 19,
            "line": 3
          },
          "token_type": {
            "type": "Identifier",
            "identifier": "baz"
          }
        },
        "func_body": {
          "parameters": [
            {
              "Name": {
                "start_position": {
                  "bytes": 76,
                  "character": 20,
                  "line": 3
                },
                "end_position": {
                  "bytes": 77,
                  "character": 21,
                  "line": 3
                },
                "token_type": {
                  "type": "Identifier",
                  "identifier": "a"
                }
              }
            },
            {
              "Name": {
                "start_position": {
                  "bytes": 79,
                  "character": 23,
                  "line": 3
                },
                "end_position": {
                  "bytes": 80,
                  "character": 24,
                  "line": 3
                },
                "token_type": {
                  "type": "Identifier",
                  "identifier": "b"
                }
              }
            },
            {
              "Ellipse": {
                "start_position": {
                  "bytes": 82,
                  "character": 26,
                  "line": 3
                },
                "end_position": {
                  "bytes": 85,
                  "character": 29,
                  "line": 3
                },
                "token_type": {
                  "type": "Symbol",
                  "symbol": "..."
                }
              }
            }
          ],
          "block": {
            "stmts": []
          }
        }
      }
    }
  ]
}