Full Code of Mercerenies/gdlisp for AI

master 04b1395a46ab cached
267 files
1.7 MB
478.1k tokens
2924 symbols
1 requests
Download .txt
Showing preview only (1,827K chars total). Download the full file or copy to clipboard to get everything.
Repository: Mercerenies/gdlisp
Branch: master
Commit: 04b1395a46ab
Files: 267
Total size: 1.7 MB

Directory structure:
gitextract_8xnoo2xc/

├── .github/
│   └── workflows/
│       ├── style-clippy.yml
│       ├── style-docs.yml
│       ├── test-Godotv3.3.3-Ubuntu.yml
│       ├── test-Godotv3.4-Ubuntu.yml
│       ├── test-Godotv3.5-Minimal-Ubuntu.yml
│       ├── test-Godotv3.5-Mono-Ubuntu.yml
│       └── test-Godotv3.5-Ubuntu.yml
├── .gitignore
├── .readthedocs.yaml
├── COPYING
├── Cargo.toml
├── GDLisp.lisp
├── MacroServer/
│   ├── TestLoadedFile.gd
│   ├── main.gd
│   ├── main.tscn
│   └── project.godot
├── README.md
├── Rakefile
├── build.rs
├── doc/
│   ├── README.md
│   ├── internal/
│   │   ├── CompilationStages.md
│   │   └── README.md
│   └── readthedocs/
│       ├── Makefile
│       ├── conf.py
│       ├── index.rst
│       ├── make.bat
│       ├── reference/
│       │   ├── classes.rst
│       │   ├── command-line.rst
│       │   ├── datatypes.rst
│       │   ├── expressions.rst
│       │   ├── imports.rst
│       │   ├── index.rst
│       │   ├── lambda-lists.rst
│       │   ├── macros.rst
│       │   ├── parser.rst
│       │   ├── quoting.rst
│       │   ├── source-file.rst
│       │   └── standard-library/
│       │       ├── functions.rst
│       │       ├── index.rst
│       │       ├── macros.rst
│       │       ├── types.rst
│       │       └── values.rst
│       ├── requirements.txt
│       └── tutorial/
│           ├── classes.rst
│           ├── control-flow.rst
│           ├── index.rst
│           ├── lisping.rst
│           ├── macros.rst
│           ├── modules.rst
│           └── what-now.rst
├── minimal.txt
├── src/
│   ├── command_line.rs
│   ├── compile/
│   │   ├── args.rs
│   │   ├── body/
│   │   │   ├── builder.rs
│   │   │   ├── class_initializer.rs
│   │   │   ├── class_scope.rs
│   │   │   ├── mod.rs
│   │   │   ├── super_proxy.rs
│   │   │   └── synthetic_field.rs
│   │   ├── constant.rs
│   │   ├── error.rs
│   │   ├── factory.rs
│   │   ├── frame.rs
│   │   ├── import.rs
│   │   ├── mod.rs
│   │   ├── names/
│   │   │   ├── contextual.rs
│   │   │   ├── fresh.rs
│   │   │   ├── generator.rs
│   │   │   ├── mod.rs
│   │   │   ├── registered.rs
│   │   │   └── reserved.rs
│   │   ├── preload_resolver.rs
│   │   ├── resource_type.rs
│   │   ├── special_form/
│   │   │   ├── closure.rs
│   │   │   ├── flet.rs
│   │   │   ├── lambda.rs
│   │   │   ├── lambda_class.rs
│   │   │   ├── lambda_vararg/
│   │   │   │   ├── builder.rs
│   │   │   │   └── mod.rs
│   │   │   ├── let_block.rs
│   │   │   └── mod.rs
│   │   ├── stateful.rs
│   │   ├── stmt_wrapper.rs
│   │   └── symbol_table/
│   │       ├── call_magic/
│   │       │   ├── mod.rs
│   │       │   └── table.rs
│   │       ├── function_call.rs
│   │       ├── inner.rs
│   │       ├── local_var.rs
│   │       └── mod.rs
│   ├── gdscript/
│   │   ├── arglist.rs
│   │   ├── class_extends.rs
│   │   ├── decl.rs
│   │   ├── expr.rs
│   │   ├── expr_wrapper.rs
│   │   ├── inner_class.rs
│   │   ├── library/
│   │   │   ├── cell.rs
│   │   │   ├── class_loader.rs
│   │   │   ├── constant_loader.rs
│   │   │   ├── gdnative/
│   │   │   │   ├── api_type.rs
│   │   │   │   ├── argument.rs
│   │   │   │   ├── class.rs
│   │   │   │   ├── gdnative_enum.rs
│   │   │   │   ├── method.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── property.rs
│   │   │   │   └── signal.rs
│   │   │   ├── magic.rs
│   │   │   └── mod.rs
│   │   ├── literal.rs
│   │   ├── metadata.rs
│   │   ├── mod.rs
│   │   ├── op.rs
│   │   ├── pattern.rs
│   │   ├── spacing.rs
│   │   └── stmt.rs
│   ├── graph/
│   │   ├── mod.rs
│   │   ├── tarjan.rs
│   │   └── top_sort.rs
│   ├── ir/
│   │   ├── access_type.rs
│   │   ├── arglist/
│   │   │   ├── constructor.rs
│   │   │   ├── error.rs
│   │   │   ├── general.rs
│   │   │   ├── mod.rs
│   │   │   ├── ordinary.rs
│   │   │   ├── parser.rs
│   │   │   ├── simple.rs
│   │   │   └── vararg.rs
│   │   ├── bootstrapping.rs
│   │   ├── call_name.rs
│   │   ├── classification.rs
│   │   ├── closure_names.rs
│   │   ├── decl.rs
│   │   ├── declaration_table.rs
│   │   ├── depends.rs
│   │   ├── export.rs
│   │   ├── expr.rs
│   │   ├── identifier.rs
│   │   ├── import.rs
│   │   ├── incremental.rs
│   │   ├── literal.rs
│   │   ├── loops/
│   │   │   ├── error.rs
│   │   │   └── mod.rs
│   │   ├── macros.rs
│   │   ├── main_function.rs
│   │   ├── mod.rs
│   │   ├── modifier/
│   │   │   ├── class.rs
│   │   │   ├── constant.rs
│   │   │   ├── declare.rs
│   │   │   ├── enums.rs
│   │   │   ├── file.rs
│   │   │   ├── function.rs
│   │   │   ├── instance_method.rs
│   │   │   ├── macros.rs
│   │   │   ├── magic.rs
│   │   │   ├── mod.rs
│   │   │   ├── var.rs
│   │   │   └── visibility.rs
│   │   ├── quasiquote.rs
│   │   ├── scope/
│   │   │   ├── decl.rs
│   │   │   ├── error.rs
│   │   │   ├── mod.rs
│   │   │   └── name_table/
│   │   │       ├── builder.rs
│   │   │       └── mod.rs
│   │   ├── special_form/
│   │   │   ├── access_slot.rs
│   │   │   ├── assignment.rs
│   │   │   ├── local_binding.rs
│   │   │   └── mod.rs
│   │   └── special_ref.rs
│   ├── lib.rs
│   ├── main.rs
│   ├── optimize/
│   │   ├── gdscript/
│   │   │   ├── assignment.rs
│   │   │   ├── basic_math_ops.rs
│   │   │   ├── constant.rs
│   │   │   ├── constant_conditional_branch.rs
│   │   │   ├── dead_code_elimination.rs
│   │   │   ├── dead_decl_elimination.rs
│   │   │   ├── dead_var_elimination.rs
│   │   │   ├── direct_var_substitute.rs
│   │   │   ├── else_then_if_fold.rs
│   │   │   ├── expr_walker.rs
│   │   │   ├── mod.rs
│   │   │   ├── noop.rs
│   │   │   ├── redundant_assignment_elimination.rs
│   │   │   ├── stmt_walker.rs
│   │   │   ├── ternary_if_fold.rs
│   │   │   └── variables.rs
│   │   ├── ir/
│   │   │   ├── expr_walker.rs
│   │   │   └── mod.rs
│   │   └── mod.rs
│   ├── parser.lalrpop
│   ├── parser_test.rs
│   ├── pipeline/
│   │   ├── can_load.rs
│   │   ├── config.rs
│   │   ├── error.rs
│   │   ├── loader.rs
│   │   ├── mod.rs
│   │   ├── resolver.rs
│   │   ├── source.rs
│   │   ├── stdlib_unit.rs
│   │   └── translation_unit.rs
│   ├── repl.rs
│   ├── runner/
│   │   ├── godot.rs
│   │   ├── into_gd_file.rs
│   │   ├── macro_server/
│   │   │   ├── command.rs
│   │   │   ├── lazy.rs
│   │   │   ├── mod.rs
│   │   │   ├── named_file_server.rs
│   │   │   └── response.rs
│   │   ├── mod.rs
│   │   ├── named_file.rs
│   │   ├── path.rs
│   │   └── version.rs
│   ├── sxp/
│   │   ├── ast.rs
│   │   ├── dotted.rs
│   │   ├── literal.rs
│   │   ├── mod.rs
│   │   ├── reify/
│   │   │   ├── mod.rs
│   │   │   └── pretty.rs
│   │   ├── string.rs
│   │   └── syntax.rs
│   └── util/
│       ├── debug_wrapper.rs
│       ├── group_by.rs
│       ├── lattice.rs
│       ├── lazy.rs
│       ├── mod.rs
│       ├── one.rs
│       ├── prefix_matcher.rs
│       └── recursive.rs
└── tests/
    ├── integration_tests.rs
    └── test/
        ├── builtin_function_test.rs
        ├── class_test.rs
        ├── collection_conversion_test.rs
        ├── common/
        │   ├── import.rs
        │   └── mod.rs
        ├── concurrency_test.rs
        ├── cond_if_test.rs
        ├── const_test.rs
        ├── declaration_test.rs
        ├── dependencies_test.rs
        ├── dictionary_test.rs
        ├── enum_test.rs
        ├── error_test.rs
        ├── even_odd_test.rs
        ├── factorial_test.rs
        ├── flet_test.rs
        ├── floating_test.rs
        ├── for_test.rs
        ├── import_test.rs
        ├── labels_test.rs
        ├── lambda_class_test.rs
        ├── lambda_test.rs
        ├── lazy_val_test.rs
        ├── let_var_test.rs
        ├── list_operator_test.rs
        ├── macro_test.rs
        ├── meta_test.rs
        ├── mod.rs
        ├── name_translation_test.rs
        ├── object_test.rs
        ├── operator_test.rs
        ├── quoting_test.rs
        ├── signal_test.rs
        ├── simple_expr_test.rs
        ├── string_test.rs
        ├── type_checking_test.rs
        ├── typecast_test.rs
        └── while_test.rs

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/style-clippy.yml
================================================
name: Clippy Style Checker

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  style-checker:

    runs-on: "ubuntu-20.04"

    steps:
    - uses: actions/checkout@v2
    - name: Install Clippy
      run: |
        rustup update
        rustup component add clippy
    - name: Build
      run: rake build_rs[--verbose] # Only build Rust, not stdlib
    - name: Run Clippy
      run: rake clippy[--verbose]


================================================
FILE: .github/workflows/style-docs.yml
================================================
name: Rustdoc Generation

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  style-checker:

    runs-on: "ubuntu-20.04"

    steps:
    - uses: actions/checkout@v2
    - name: Generate Documentation
      run: rake doc


================================================
FILE: .github/workflows/test-Godotv3.3.3-Ubuntu.yml
================================================
name: "Ubuntu 20.04 (Godot v3.3.3)"

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test-suite:

    runs-on: "ubuntu-20.04"

    steps:
    - uses: actions/checkout@v2
    - name: Install Godot
      run: |
        mkdir godot-build
        cd godot-build
        wget https://downloads.tuxfamily.org/godotengine/3.3.3/Godot_v3.3.3-stable_linux_headless.64.zip
        unzip Godot_v3.3.3-stable_linux_headless.64.zip
        ln -s Godot_v3.3.3-stable_linux_headless.64 godot
        ls -l
        cd ..
    - name: Build
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake build[--verbose]
    - name: Run Standard Test Suite
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake 'test[--verbose]'


================================================
FILE: .github/workflows/test-Godotv3.4-Ubuntu.yml
================================================
name: "Ubuntu 20.04 (Godot v3.4)"

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test-suite:

    runs-on: "ubuntu-20.04"

    steps:
    - uses: actions/checkout@v2
    - name: Install Godot
      run: |
        mkdir godot-build
        cd godot-build
        wget https://downloads.tuxfamily.org/godotengine/3.4/Godot_v3.4-stable_linux_headless.64.zip
        unzip Godot_v3.4-stable_linux_headless.64.zip
        ln -s Godot_v3.4-stable_linux_headless.64 godot
        ls -l
        cd ..
    - name: Build
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake build[--verbose]
    - name: Run Standard Test Suite
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake 'test[--verbose]'


================================================
FILE: .github/workflows/test-Godotv3.5-Minimal-Ubuntu.yml
================================================
name: "Ubuntu 20.04 (Godot v3.5 Minimal)"

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test-suite:

    runs-on: "ubuntu-20.04"

    steps:
    - uses: actions/checkout@v2
    - name: Install Godot
      run: |
        mkdir godot-build
        cd godot-build
        wget https://www.dropbox.com/s/9zi0ij7cqetaw34/godot_server.x11.opt.tools.64.zip?dl=1 -O godot_server.x11.opt.tools.64.zip
        unzip godot_server.x11.opt.tools.64.zip
        ln -s godot_server.x11.opt.tools.64 godot
        ls -l
        cd ..
    - name: Build
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake build[--verbose]
    - name: Run Standard Test Suite
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake 'test[--verbose]'


================================================
FILE: .github/workflows/test-Godotv3.5-Mono-Ubuntu.yml
================================================
name: "Ubuntu 20.04 (Godot v3.5 Mono)"

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test-suite:

    runs-on: "ubuntu-20.04"

    steps:
    - uses: actions/checkout@v2
    - name: Install Godot
      run: |
        mkdir godot-build
        cd godot-build
        wget https://downloads.tuxfamily.org/godotengine/3.5/mono/Godot_v3.5-stable_mono_linux_headless_64.zip
        unzip Godot_v3.5-stable_mono_linux_headless_64.zip
        ln -s Godot_v3.5-stable_mono_linux_headless_64/Godot_v3.5-stable_mono_linux_headless.64 godot
        ls -l .
        ls -l Godot_v3.5-stable_mono_linux_headless_64/
        cd ..
    - name: Build
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake build[--verbose]
    - name: Run Standard Test Suite
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake 'test[--verbose]'


================================================
FILE: .github/workflows/test-Godotv3.5-Ubuntu.yml
================================================
name: "Ubuntu 20.04 (Godot v3.5)"

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test-suite:

    runs-on: "ubuntu-20.04"

    steps:
    - uses: actions/checkout@v2
    - name: Install Godot
      run: |
        mkdir godot-build
        cd godot-build
        wget https://downloads.tuxfamily.org/godotengine/3.5/Godot_v3.5-stable_linux_headless.64.zip
        unzip Godot_v3.5-stable_linux_headless.64.zip
        ln -s Godot_v3.5-stable_linux_headless.64 godot
        ls -l
        cd ..
    - name: Build
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake build[--verbose]
    - name: Run Standard Test Suite
      run: |
        PATH="$PWD/godot-build/:$PATH"
        echo "$PATH"
        rake 'test[--verbose]'


================================================
FILE: .gitignore
================================================
/target
/bin
*~
GDLisp.gd
GDLisp.msgpack
# Generated file that is always identical to /GDLisp.gd
/MacroServer/GDLisp.gd
/tmp/
/etc/
/doc/readthedocs/_build/

================================================
FILE: .readthedocs.yaml
================================================

version: 2

build:
  os: ubuntu-20.04
  tools:
    python: "3.9"

sphinx:
  configuration: doc/readthedocs/conf.py

python:
  install:
  - requirements: doc/readthedocs/requirements.txt


================================================
FILE: COPYING
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: Cargo.toml
================================================
[package]
name = "gdlisp"
version = "1.0.0"
authors = ["Silvio Mayolo <mercerenies@gmail.com>"]
edition = "2018"
build = "build.rs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
lalrpop-util = "0.19.0"
regex = "1"
phf = { version = "0.8.0", features = ["macros"] }
ordered-float = "2.0.0"
tempfile = "3.0.7"
dyn-clone = "1.0.4"
getopts = "0.2"
walkdir = "2"
json = "0.11.13"
lazy_static = "1.4.0"
serde = { version = "1.0", features = ["derive"] }
rmp-serde = "0.14.4"
serde_json = "1.0.82"

[build-dependencies]
lalrpop = { version = "0.19.0", features = ["lexer"] }

================================================
FILE: GDLisp.lisp
================================================

;;;; Copyright 2023 Silvio Mayolo
;;;;
;;;; This file is part of GDLisp.
;;;;
;;;; GDLisp is free software: you can redistribute it and/or modify it
;;;; under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation, either version 3 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; GDLisp is distributed in the hope that it will be useful, but
;;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;;; General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with GDLisp. If not, see <https://www.gnu.org/licenses/>.
;;;;
;;;; As a special exception to the terms of the GNU General Public
;;;; License, you may use this GDLisp.lisp source file in your own
;;;; projects without restriction.

;;;; Library file for GDLisp. This file must be included as a singleton
;;;; in any project which uses GDLisp compiled files.

(sys/nostdlib)

;;; Global GDLisp constants and enums

(defconst nil ())
(defconst GODOT-VERSION (sys/special-ref godot-version))
(sys/declare superglobal GDLisp public) ; This file :)
(sys/bootstrap constants)
(sys/bootstrap constant-enums)

(sys/declare superglobal (PI PI) public)
(sys/declare superglobal (TAU TAU) public)
(sys/declare superglobal (INF INF) public)

(defenum ConnectFlags
  (DEFERRED 1)
  (PERSIST 2)
  (ONESHOT 4)
  (REFERENCE_COUNTED 8))

(defenum Notification
  (POSTINITIALIZE 0)
  (PREDELETE 1))

;; Note: Godot doesn't consider the below names constant for some
;; reason, since they're apparently defined *on* `Object` in some
;; weird way. So we have to hardcode the numerical values in the
;; enums. We have test cases to make sure these numbers are consistent
;; with the Godot values for the same.

(sys/declare value CONNECT_DEFERRED public)
(sys/declare value CONNECT_PERSIST public)
(sys/declare value CONNECT_ONESHOT public)
(sys/declare value CONNECT_REFERENCE_COUNTED public)
(sys/declare value NOTIFICATION_POSTINITIALIZE public)
(sys/declare value NOTIFICATION_PREDELETE public)

;;; GDScript global types

(sys/bootstrap non-singleton-types)
(sys/bootstrap singleton-types)

;;; GDLisp main class initialization

(defclass _GDLisp (Node) main
  (defvar __gdlisp_Global_name_generator (sys/FreshNameGenerator:new [] 0))

  (defvar __gdlisp_Global_symbol_table {})

  ;; Primitive types
  (defvar Null (PrimitiveType:new TYPE_NIL))
  (defvar Bool (PrimitiveType:new TYPE_BOOL))
  (defvar Int (PrimitiveType:new TYPE_INT))
  (defvar Float (PrimitiveType:new TYPE_REAL))
  (defvar String (PrimitiveType:new TYPE_STRING))
  (defvar Vector2 (Vector2PrimitiveType:new))
  (defvar Rect2 (PrimitiveType:new TYPE_RECT2))
  (defvar Vector3 (Vector3PrimitiveType:new))
  (defvar Transform2D (Transform2DPrimitiveType:new))
  (defvar Plane (PlanePrimitiveType:new))
  (defvar Quat (QuatPrimitiveType:new))
  (defvar AABB (PrimitiveType:new TYPE_AABB))
  (defvar Basis (BasisPrimitiveType:new))
  (defvar Transform (TransformPrimitiveType:new))
  (defvar Color (ColorPrimitiveType:new))
  (defvar NodePath (PrimitiveType:new TYPE_NODE_PATH))
  (defvar RID (PrimitiveType:new TYPE_RID))
  (defvar Object (ObjectPrimitiveType:new))
  (defvar Dictionary (PrimitiveType:new TYPE_DICTIONARY))
  (defvar Array (PrimitiveType:new TYPE_ARRAY))
  (defvar PoolByteArray (PrimitiveType:new TYPE_RAW_ARRAY))
  (defvar PoolIntArray (PrimitiveType:new TYPE_INT_ARRAY))
  (defvar PoolRealArray (PrimitiveType:new TYPE_REAL_ARRAY))
  (defvar PoolStringArray (PrimitiveType:new TYPE_STRING_ARRAY))
  (defvar PoolVector2Array (PrimitiveType:new TYPE_VECTOR2_ARRAY))
  (defvar PoolVector3Array (PrimitiveType:new TYPE_VECTOR3_ARRAY))
  (defvar PoolColorArray (PrimitiveType:new TYPE_COLOR_ARRAY))

  ;; Synthetic types
  (defvar Any (AnyType:new))
  (defvar AnyRef (AnyRefType:new))
  (defvar AnyVal (AnyValType:new))
  (defvar Number (NumberType:new))
  (defvar BaseArray (BaseArrayType:new))
  (defvar Nothing (NothingType:new))

  ;; GDScript native types lookup table
  (defvar __gdlisp_Global_native_types_lookup)
  (defvar __gdlisp_Global_primitive_types_lookup)

  (sys/bootstrap singleton-backing-types)

  (defn _init ()
    (set self:__gdlisp_Global_primitive_types_lookup
         {TYPE_NIL @Null TYPE_BOOL @Bool TYPE_INT @Int TYPE_REAL @Float TYPE_STRING @String TYPE_VECTOR2 @Vector2
          TYPE_RECT2 @Rect2 TYPE_VECTOR3 @Vector3 TYPE_TRANSFORM2D @Transform2D TYPE_PLANE @Plane TYPE_QUAT @Quat
          TYPE_AABB @AABB TYPE_BASIS @Basis TYPE_TRANSFORM @Transform TYPE_COLOR @Color TYPE_NODE_PATH @NodePath
          TYPE_RID @RID TYPE_OBJECT @Object TYPE_DICTIONARY @Dictionary TYPE_ARRAY @Array
          TYPE_RAW_ARRAY @PoolByteArray TYPE_INT_ARRAY @PoolIntArray TYPE_REAL_ARRAY @PoolRealArray
          TYPE_STRING_ARRAY @PoolStringArray TYPE_VECTOR2_ARRAY @PoolVector2Array
          TYPE_VECTOR3_ARRAY @PoolVector3Array TYPE_COLOR_ARRAY @PoolColorArray})

    (sys/bootstrap native-types-table)
    (set (elt self:__gdlisp_Global_native_types_lookup "Object") @Object))

  (defn typeof (value)
    (let ((t ((literally typeof) value)))
      (cond
        ((/= t TYPE_OBJECT) (elt self:__gdlisp_Global_primitive_types_lookup t))
        ((value:get_script))
        (#t (self:__gdlisp_Global_native_types_lookup:get (value:get_class) self:Any))))))

;;; Public support classes

(defclass Cons (Reference)
  (defvar car)
  (defvar cdr)

  (defn _init (@car @cdr)
    (self:set-meta "__gdlisp_Primitive_Cons" 1))

  (defn (get caar) ()
    self:car:car)

  (defn (get cadr) ()
    self:car:cdr)

  (defn (get cdar) ()
    self:cdr:car)

  (defn (get cddr) ()
    self:cdr:cdr)

  (defn (get caaar) ()
    self:car:car:car)

  (defn (get caadr) ()
    self:car:car:cdr)

  (defn (get cadar) ()
    self:car:cdr:car)

  (defn (get caddr) ()
    self:car:cdr:cdr)

  (defn (get cdaar) ()
    self:cdr:car:car)

  (defn (get cdadr) ()
    self:cdr:car:cdr)

  (defn (get cddar) ()
    self:cdr:cdr:car)

  (defn (get cdddr) ()
    self:cdr:cdr:cdr))

(defclass Function (Reference)
  (defvar __gdlisp_is_function #t)
  (defvar __gdlisp_required 0)
  (defvar __gdlisp_optional 0)
  (defvar __gdlisp_rest 1)
  ;; Constants for the different types of "rest" arguments a function
  ;; can take. (i.e. the valid values for __gdlisp_rest)
  (defconst __gdlisp_vararg_no   0)
  (defconst __gdlisp_vararg_rest 1)
  (defconst __gdlisp_vararg_arr  2))

(defclass Cell (Reference)
  (defvar contents)
  (defn _init (@contents)))

(defclass Symbol (Reference)
  ;; Note: This will be obsolete once we have StringName in GDScript,
  ;; which seems to be coming in Godot 4. For now, this manual wrapper
  ;; stores symbols in the least efficient way possible.
  (defvar __gdlisp_contents)
  (defn _init (@__gdlisp_contents)
    (self:set-meta "__gdlisp_Primitive_Symbol" 1)))

(defclass sys/FreshNameGenerator (Reference)
  ;; This is meant to be identical to FreshNameGenerator in the Rust
  ;; source. We want to be able to consistently generate names in the
  ;; same way on both Rust and Godot and to be able to communicate
  ;; FreshNameGenerator state between the two (via to_json /
  ;; from_json)

  (defconst DEFAULT_PREFIX "_G")

  (defvar reserved)
  (defvar index)

  (defn _init (@reserved @index))

  (defn generate ()
    (self:generate_with sys/FreshNameGenerator:DEFAULT_PREFIX))

  (defn generate_with (prefix)
    (let ((name ("{}_{}":format [prefix self:index] "{}")))
      (set self:index (+ self:index 1))
      (cond
        ((member? name self:reserved) (self:generate_with prefix))
        (#t name))))

  (defn to_json ()
    {"reserved" self:reserved "index" self:index})

  (defn from_json (json) static
    (sys/FreshNameGenerator:new
     (elt json "reserved")
     (elt json "index"))))

;;; GDLisp type constants and support types

(defclass GDLispSpecialType (Reference) private)

(defclass PrimitiveType (GDLispSpecialType) private
  (defvar primitive-value)

  (defn _init (@primitive-value))

  (defn satisfies? (value)
    (= ((literally typeof) value) self:primitive-value)))

(defclass ObjectPrimitiveType (PrimitiveType) private

  (defn _init ()
    (super TYPE_OBJECT)))

;; NOTE: Due to current Godot bugs, we can't actually define this,
;; since GDScript fails to parse constructor calls on Object directly.
;; See https://github.com/godotengine/godot/issues/41462. Has been
;; fixed in 4.0 and it doesn't look like they're planning to backport.
;;
;;  (defn new ()
;;    ((literally Object):new)))

(defclass Vector2PrimitiveType (PrimitiveType) private
  (defconst AXIS_X 0)
  (defconst AXIS_Y 1)
  (defconst ZERO V{0 0})
  (defconst ONE V{1 1})
  (defconst INF V{INF INF})
  (defconst LEFT V{-1 0})
  (defconst RIGHT V{1 0})
  (defconst UP V{0 -1})
  (defconst DOWN V{0 1})

  (defn _init ()
    (super TYPE_VECTOR2)))

(defclass Vector3PrimitiveType (PrimitiveType) private
  (defconst AXIS_X 0)
  (defconst AXIS_Y 1)
  (defconst AXIS_Z 2)
  (defconst ZERO V{0 0 0})
  (defconst ONE V{1 1 1})
  (defconst INF V{INF INF INF})
  (defconst LEFT V{-1 0 0})
  (defconst RIGHT V{1 0 0})
  (defconst UP V{0 1 0})
  (defconst DOWN V{0 -1 0})
  (defconst FORWARD V{0 0 -1})
  (defconst BACK V{0 0 1})

  (defn _init ()
    (super TYPE_VECTOR3)))

(defclass Transform2DPrimitiveType (PrimitiveType) private
  (defconst IDENTITY (Transform2D V{1 0} V{0 1} V{0 0}))
  (defconst FLIP_X (Transform2D V{-1 0} V{0 1} V{0 0}))
  (defconst FLIP_Y (Transform2D V{1 0} V{0 -1} V{0 0}))

  (defn _init ()
    (super TYPE_TRANSFORM2D)))

(defclass PlanePrimitiveType (PrimitiveType) private
  (defconst PLANE_YZ (Plane 1 0 0 0))
  (defconst PLANE_XZ (Plane 0 1 0 0))
  (defconst PLANE_XY (Plane 0 0 1 0))

  (defn _init ()
    (super TYPE_PLANE)))

(defclass QuatPrimitiveType (PrimitiveType) private
  (defconst IDENTITY (Quat 0 0 0 1))

  (defn _init ()
    (super TYPE_QUAT)))

(defclass BasisPrimitiveType (PrimitiveType) private
  (defconst IDENTITY (Basis V{1 0 0} V{0 1 0} V{0 0 1}))
  (defconst FLIP_X (Basis V{-1 0 0} V{0 1 0} V{0 0 1}))
  (defconst FLIP_Y (Basis V{1 0 0} V{0 -1 0} V{0 0 -1}))
  (defconst FLIP_Z (Basis V{1 0 0} V{0 -1 0} V{0 0 -1}))

  (defn _init ()
    (super TYPE_BASIS)))

(defclass TransformPrimitiveType (PrimitiveType) private
  (defconst IDENTITY (Transform V{1 0 0} V{0 1 0} V{0 0 1} V{0 0 0}))
  (defconst FLIP_X (Transform V{-1 0 0} V{0 1 0} V{0 0 1} V{0 0 0}))
  (defconst FLIP_Y (Transform V{1 0 0} V{0 -1 0} V{0 0 -1} V{0 0 0}))
  (defconst FLIP_Z (Transform V{1 0 0} V{0 -1 0} V{0 0 -1} V{0 0 0}))

  (defn _init ()
    (super TYPE_TRANSFORM)))

(defclass ColorPrimitiveType (PrimitiveType) private
    (defconst aliceblue (Color 0.941176 0.972549 1 1))
    (defconst antiquewhite (Color 0.980392 0.921569 0.843137 1))
    (defconst aqua (Color 0 1 1 1))
    (defconst aquamarine (Color 0.498039 1 0.831373 1))
    (defconst azure (Color 0.941176 1 1 1))
    (defconst beige (Color 0.960784 0.960784 0.862745 1))
    (defconst bisque (Color 1 0.894118 0.768627 1))
    (defconst black (Color 0 0 0 1))
    (defconst blanchedalmond (Color 1 0.921569 0.803922 1))
    (defconst blue (Color 0 0 1 1))
    (defconst blueviolet (Color 0.541176 0.168627 0.886275 1))
    (defconst brown (Color 0.647059 0.164706 0.164706 1))
    (defconst burlywood (Color 0.870588 0.721569 0.529412 1))
    (defconst cadetblue (Color 0.372549 0.619608 0.627451 1))
    (defconst chartreuse (Color 0.498039 1 0 1))
    (defconst chocolate (Color 0.823529 0.411765 0.117647 1))
    (defconst coral (Color 1 0.498039 0.313726 1))
    (defconst cornflower (Color 0.392157 0.584314 0.929412 1))
    (defconst cornsilk (Color 1 0.972549 0.862745 1))
    (defconst crimson (Color 0.862745 0.0784314 0.235294 1))
    (defconst cyan (Color 0 1 1 1))
    (defconst darkblue (Color 0 0 0.545098 1))
    (defconst darkcyan (Color 0 0.545098 0.545098 1))
    (defconst darkgoldenrod (Color 0.721569 0.52549 0.0431373 1))
    (defconst darkgray (Color 0.662745 0.662745 0.662745 1))
    (defconst darkgreen (Color 0 0.392157 0 1))
    (defconst darkkhaki (Color 0.741176 0.717647 0.419608 1))
    (defconst darkmagenta (Color 0.545098 0 0.545098 1))
    (defconst darkolivegreen (Color 0.333333 0.419608 0.184314 1))
    (defconst darkorange (Color 1 0.54902 0 1))
    (defconst darkorchid (Color 0.6 0.196078 0.8 1))
    (defconst darkred (Color 0.545098 0 0 1))
    (defconst darksalmon (Color 0.913725 0.588235 0.478431 1))
    (defconst darkseagreen (Color 0.560784 0.737255 0.560784 1))
    (defconst darkslateblue (Color 0.282353 0.239216 0.545098 1))
    (defconst darkslategray (Color 0.184314 0.309804 0.309804 1))
    (defconst darkturquoise (Color 0 0.807843 0.819608 1))
    (defconst darkviolet (Color 0.580392 0 0.827451 1))
    (defconst deeppink (Color 1 0.0784314 0.576471 1))
    (defconst deepskyblue (Color 0 0.74902 1 1))
    (defconst dimgray (Color 0.411765 0.411765 0.411765 1))
    (defconst dodgerblue (Color 0.117647 0.564706 1 1))
    (defconst firebrick (Color 0.698039 0.133333 0.133333 1))
    (defconst floralwhite (Color 1 0.980392 0.941176 1))
    (defconst forestgreen (Color 0.133333 0.545098 0.133333 1))
    (defconst fuchsia (Color 1 0 1 1))
    (defconst gainsboro (Color 0.862745 0.862745 0.862745 1))
    (defconst ghostwhite (Color 0.972549 0.972549 1 1))
    (defconst gold (Color 1 0.843137 0 1))
    (defconst goldenrod (Color 0.854902 0.647059 0.12549 1))
    (defconst gray (Color 0.745098 0.745098 0.745098 1))
    (defconst green (Color 0 1 0 1))
    (defconst greenyellow (Color 0.678431 1 0.184314 1))
    (defconst honeydew (Color 0.941176 1 0.941176 1))
    (defconst hotpink (Color 1 0.411765 0.705882 1))
    (defconst indianred (Color 0.803922 0.360784 0.360784 1))
    (defconst indigo (Color 0.294118 0 0.509804 1))
    (defconst ivory (Color 1 1 0.941176 1))
    (defconst khaki (Color 0.941176 0.901961 0.54902 1))
    (defconst lavender (Color 0.901961 0.901961 0.980392 1))
    (defconst lavenderblush (Color 1 0.941176 0.960784 1))
    (defconst lawngreen (Color 0.486275 0.988235 0 1))
    (defconst lemonchiffon (Color 1 0.980392 0.803922 1))
    (defconst lightblue (Color 0.678431 0.847059 0.901961 1))
    (defconst lightcoral (Color 0.941176 0.501961 0.501961 1))
    (defconst lightcyan (Color 0.878431 1 1 1))
    (defconst lightgoldenrod (Color 0.980392 0.980392 0.823529 1))
    (defconst lightgray (Color 0.827451 0.827451 0.827451 1))
    (defconst lightgreen (Color 0.564706 0.933333 0.564706 1))
    (defconst lightpink (Color 1 0.713726 0.756863 1))
    (defconst lightsalmon (Color 1 0.627451 0.478431 1))
    (defconst lightseagreen (Color 0.12549 0.698039 0.666667 1))
    (defconst lightskyblue (Color 0.529412 0.807843 0.980392 1))
    (defconst lightslategray (Color 0.466667 0.533333 0.6 1))
    (defconst lightsteelblue (Color 0.690196 0.768627 0.870588 1))
    (defconst lightyellow (Color 1 1 0.878431 1))
    (defconst lime (Color 0 1 0 1))
    (defconst limegreen (Color 0.196078 0.803922 0.196078 1))
    (defconst linen (Color 0.980392 0.941176 0.901961 1))
    (defconst magenta (Color 1 0 1 1))
    (defconst maroon (Color 0.690196 0.188235 0.376471 1))
    (defconst mediumaquamarine (Color 0.4 0.803922 0.666667 1))
    (defconst mediumblue (Color 0 0 0.803922 1))
    (defconst mediumorchid (Color 0.729412 0.333333 0.827451 1))
    (defconst mediumpurple (Color 0.576471 0.439216 0.858824 1))
    (defconst mediumseagreen (Color 0.235294 0.701961 0.443137 1))
    (defconst mediumslateblue (Color 0.482353 0.407843 0.933333 1))
    (defconst mediumspringgreen (Color 0 0.980392 0.603922 1))
    (defconst mediumturquoise (Color 0.282353 0.819608 0.8 1))
    (defconst mediumvioletred (Color 0.780392 0.0823529 0.521569 1))
    (defconst midnightblue (Color 0.0980392 0.0980392 0.439216 1))
    (defconst mintcream (Color 0.960784 1 0.980392 1))
    (defconst mistyrose (Color 1 0.894118 0.882353 1))
    (defconst moccasin (Color 1 0.894118 0.709804 1))
    (defconst navajowhite (Color 1 0.870588 0.678431 1))
    (defconst navyblue (Color 0 0 0.501961 1))
    (defconst oldlace (Color 0.992157 0.960784 0.901961 1))
    (defconst olive (Color 0.501961 0.501961 0 1))
    (defconst olivedrab (Color 0.419608 0.556863 0.137255 1))
    (defconst orange (Color 1 0.647059 0 1))
    (defconst orangered (Color 1 0.270588 0 1))
    (defconst orchid (Color 0.854902 0.439216 0.839216 1))
    (defconst palegoldenrod (Color 0.933333 0.909804 0.666667 1))
    (defconst palegreen (Color 0.596078 0.984314 0.596078 1))
    (defconst paleturquoise (Color 0.686275 0.933333 0.933333 1))
    (defconst palevioletred (Color 0.858824 0.439216 0.576471 1))
    (defconst papayawhip (Color 1 0.937255 0.835294 1))
    (defconst peachpuff (Color 1 0.854902 0.72549 1))
    (defconst peru (Color 0.803922 0.521569 0.247059 1))
    (defconst pink (Color 1 0.752941 0.796078 1))
    (defconst plum (Color 0.866667 0.627451 0.866667 1))
    (defconst powderblue (Color 0.690196 0.878431 0.901961 1))
    (defconst purple (Color 0.627451 0.12549 0.941176 1))
    (defconst rebeccapurple (Color 0.4 0.2 0.6 1))
    (defconst red (Color 1 0 0 1))
    (defconst rosybrown (Color 0.737255 0.560784 0.560784 1))
    (defconst royalblue (Color 0.254902 0.411765 0.882353 1))
    (defconst saddlebrown (Color 0.545098 0.270588 0.0745098 1))
    (defconst salmon (Color 0.980392 0.501961 0.447059 1))
    (defconst sandybrown (Color 0.956863 0.643137 0.376471 1))
    (defconst seagreen (Color 0.180392 0.545098 0.341176 1))
    (defconst seashell (Color 1 0.960784 0.933333 1))
    (defconst sienna (Color 0.627451 0.321569 0.176471 1))
    (defconst silver (Color 0.752941 0.752941 0.752941 1))
    (defconst skyblue (Color 0.529412 0.807843 0.921569 1))
    (defconst slateblue (Color 0.415686 0.352941 0.803922 1))
    (defconst slategray (Color 0.439216 0.501961 0.564706 1))
    (defconst snow (Color 1 0.980392 0.980392 1))
    (defconst springgreen (Color 0 1 0.498039 1))
    (defconst steelblue (Color 0.27451 0.509804 0.705882 1))
    (defconst tan (Color 0.823529 0.705882 0.54902 1))
    (defconst teal (Color 0 0.501961 0.501961 1))
    (defconst thistle (Color 0.847059 0.74902 0.847059 1))
    (defconst tomato (Color 1 0.388235 0.278431 1))
    (defconst transparent (Color 1 1 1 0))
    (defconst turquoise (Color 0.25098 0.878431 0.815686 1))
    (defconst violet (Color 0.933333 0.509804 0.933333 1))
    (defconst webgray (Color 0.501961 0.501961 0.501961 1))
    (defconst webgreen (Color 0 0.501961 0 1))
    (defconst webmaroon (Color 0.501961 0 0 1))
    (defconst webpurple (Color 0.501961 0 0.501961 1))
    (defconst wheat (Color 0.960784 0.870588 0.701961 1))
    (defconst white (Color 1 1 1 1))
    (defconst whitesmoke (Color 0.960784 0.960784 0.960784 1))
    (defconst yellow (Color 1 1 0 1))
    (defconst yellowgreen (Color 0.603922 0.803922 0.196078 1))

  (defn _init ()
    (super TYPE_COLOR)))

;; Named types like _Engine whose name can be returned from get_class
;; but which do not exist in the runtime namespace exposed to
;; GDScript.
(defclass NamedSyntheticType (GDLispSpecialType) private
  (defvar name)

  (defn _init (@name))

  (defn satisfies? (value)
    (= (value:get-class) self:name)))

;; Note: All of these synthetic types would theoretically be defobject
;; if we weren't writing them in the standard library. But for
;; complicated reasons, we can't use macro expansion at all in stdlib,
;; and defobject is behind three layers of macro (defobject and
;; deflazy, and the expansion includes define-symbol-macro), so it's
;; off-limits.

(defclass AnyType (GDLispSpecialType) private
  (defn satisfies? (_value)
    #t))

(defclass AnyRefType (GDLispSpecialType) private
  (defn satisfies? (value)
    (= ((literally typeof) value) TYPE_OBJECT)))

(defclass AnyValType (GDLispSpecialType) private
  (defn satisfies? (value)
    (/= ((literally typeof) value) TYPE_OBJECT)))

(defclass NumberType (GDLispSpecialType) private
  (defn satisfies? (value)
    (let ((t ((literally typeof) value)))
      (cond
        ((= t TYPE_INT) #t)
        ((= t TYPE_REAL) #t)
        (#t #f)))))

(defclass BaseArrayType (GDLispSpecialType) private
  (defn satisfies? (value)
    (<= TYPE_ARRAY ((literally typeof) value) TYPE_COLOR_ARRAY)))

(defclass NothingType (GDLispSpecialType) private
  (defn satisfies? (_value)
    #f))

(sys/declare value Any public)
(sys/declare value AnyRef public)
(sys/declare value AnyVal public)
(sys/declare value Number public)
(sys/declare value BaseArray public)
(sys/declare value Nothing public)

(sys/declare value Null public)
(sys/declare value Bool public)
(sys/declare value Int public)
(sys/declare value Float public)
(sys/declare value String public)
(sys/declare value Vector2 public)
(sys/declare value Rect2 public)
(sys/declare value Vector3 public)
(sys/declare value Transform2D public)
(sys/declare value Plane public)
(sys/declare value Quat public)
(sys/declare value AABB public)
(sys/declare value Basis public)
(sys/declare value Transform public)
(sys/declare value Color public)
(sys/declare value NodePath public)
(sys/declare value RID public)
(sys/declare value Object public)
(sys/declare value Dictionary public)
(sys/declare value Array public)
(sys/declare value PoolByteArray public)
(sys/declare value PoolIntArray public)
(sys/declare value PoolRealArray public)
(sys/declare value PoolStringArray public)
(sys/declare value PoolVector2Array public)
(sys/declare value PoolVector3Array public)
(sys/declare value PoolColorArray public)

;;; Polymorphic functions

(defn len (x)
  (cond
    ((= x nil) 0)
    ((sys/instance-direct? x Cons)
     (let ((result 0))
       (while (sys/instance-direct? x Cons)
         (set result (+ result 1))
         (set x x:cdr))
       result))
    (#t ((literally len) x))))

;;; List functions

(defn list (&rest args)
  (sys/call-magic LIST)
  ;; The argument list may be shared with some other code, but `list`
  ;; should always allocate a new list, so defensively copy the
  ;; argument list.
  (list/copy args))

(defn list/copy (xs)
  (list/map (lambda (x) x) xs))

(defn cons (a b)
  (Cons:new a b))

(defn snoc (a b)
  (append a (list b)))

(defn init (a)
  (cond
    ((sys/instance-direct? a:cdr Cons) (cons a:car (init a:cdr)))
    (#t nil)))

(defn last (a)
  (cond
    ((sys/instance-direct? a:cdr Cons) (last a:cdr))
    (#t a:car)))

(defn list->array (list)
  (let ((arr []))
    (while (sys/instance-direct? list Cons)
      (arr:push_back list:car)
      (set list list:cdr))
    arr))

(defn array->list (arr)
  (let ((outer (cons () ())))
    (let ((curr outer))
      (for elem arr
        (set curr:cdr (cons elem ()))
        (set curr curr:cdr))
      outer:cdr)))

(defn list/elt (list n)
  (list/tail list n):car)

(defn list/fold (f xs &opt x)
  (cond
    ((= x nil)
     (set x xs:car)
     (set xs xs:cdr)))
  (while (/= xs nil)
    (set x (funcall f x xs:car))
    (set xs xs:cdr))
  x)

(defn list/map (f xs)
  (let ((outer (cons nil nil)))
    (let ((curr outer))
      (while (/= xs nil)
        (set curr:cdr (cons (funcall f xs:car) nil))
        (set curr curr:cdr)
        (set xs xs:cdr))
      outer:cdr)))

(defn list/filter (p xs)
  (let ((outer (cons nil nil)))
    (let ((curr outer))
      (while (/= xs nil)
        (cond
          ((funcall p xs:car)
           (set curr:cdr (cons xs:car nil))
           (set curr curr:cdr)))
        (set xs xs:cdr))
      outer:cdr)))

(defn list/find (f xs &opt default)
  (while (/= xs nil)
    (cond
      ((funcall f xs:car) (return xs:car)))
    (set xs xs:cdr))
  default)

(defn list/reverse (arg)
  (let ((rev nil))
    (while (/= arg nil)
      (set rev `(,arg:car . ,rev))
      (set arg arg:cdr))
    rev))

(defn append (&rest args)
  (cond
    ((= args nil) nil)
    (#t
     (let ((outer (cons nil nil)))
       (let ((curr outer))
         (while (/= args:cdr nil)
           (let ((inner-value args:car))
             (while (/= inner-value nil)
               (set curr:cdr (cons inner-value:car nil))
               (set curr curr:cdr)
               (set inner-value inner-value:cdr)))
           (set args args:cdr))
         (set curr:cdr args:car)
         outer:cdr)))))

(defn list/tail (list k)
  (for _i (range k)
    (set list list:cdr))
  list)

(defn sys/qq-smart-list (a)
  (cond
    ((instance? a GDLisp:BaseArray) (array->list a))
    (#t a)))

;;; Array functions

(defn elt (arr n)
  (sys/call-magic ARRAY-SUBSCRIPT)
  (elt arr n))

(defn set-elt (x arr n)
  (sys/call-magic ARRAY-SUBSCRIPT-ASSIGNMENT)
  (set-elt x arr n))

(defn member? (value arr)
  (sys/call-magic ARRAY-MEMBER-CHECK)
  (member? value arr))

(defn array/fold (f xs &opt x)
  (let ((starting-index 0))
    (cond
      ((= x nil)
       (set x (elt xs 0))
       (set starting-index 1)))
    (for i (range starting-index (len xs))
      (set x (funcall f x (elt xs i))))
    x))

(defn array/map (f xs)
  (let ((result []))
    (for i (len xs)
      (result:push_back (funcall f (elt xs i))))
    result))

(defn array/filter (p xs)
  (let ((result []))
    (for i (len xs)
      (cond
        ((funcall p (elt xs i))
         (result:push_back (elt xs i)))))
    result))

(defn array/reverse (arr)
  (let ((len (len arr))
        (result (arr:duplicate)))
    (for i (range len)
      (set (elt result i) (elt arr (- len i 1))))
    result))

(defn array/find (f arr &opt default)
  (for elem arr
    (cond
      ((funcall f elem) (return elem))))
  default)

;;; Higher-order functions

(defn funcall (f &rest args)
  (apply f args))

;; funcall alias used in IIFEs. The user can shadow funcall (though
;; it's a bad idea), but shadowing names in sys/ is undefined behavior.
(defn sys/funcall (f &rest args)
  (apply f args))

(defn apply (f &rest args)
  (let ((args1 (init args))
        (args2 (last args)))
    (cond
      ((sys/instance-direct? f Function) (f:call_funcv (append args1 args2)))
      (#t (push-error "Attempt to call non-function")))))

;;; Array functions

(defn array/concat (&rest arrays)
  (cond
    ((= (len arrays) 0) [])
    (#t (apply #'+ arrays))))

;;; Vector functions

(defn vector/map (f arg &rest args)
  (flet ((-x (v) v:x)
         (-y (v) v:y)
         (-z (v) v:z))
    (let ((args (cons arg args)))
      (cond
        ((instance? arg GDLisp:Vector2) (Vector2 (apply f (list/map #'-x args))
                                                 (apply f (list/map #'-y args))))
        ((instance? arg GDLisp:Vector3) (Vector3 (apply f (list/map #'-x args))
                                                 (apply f (list/map #'-y args))
                                                 (apply f (list/map #'-z args))))
        (#t (push-error "Attempted vector/map on non-vector"))))))

;;; Node functions

(defclass SignalAdaptor (Reference) private
  (defvar function)

  (defn _init (@function))

  (defn invoke (a b c d e f) sys/nullargs
    ;; Identify the first non-null argument.
    (let ((arglist (cond
                     ((/= f ()) (list a b c d e f))
                     ((/= e ()) (list a b c d e))
                     ((/= d ()) (list a b c d))
                     ((/= c ()) (list a b c))
                     ((/= b ()) (list a b))
                     ((/= a ()) (list a))
                     (#t (list)))))
      (apply @function arglist))))

(defn get-signals-meta (obj) private
  (cond
    ((obj:has-meta "__gdlisp_signals") (obj:get-meta "__gdlisp_signals"))
    (#t (let ((new-meta {"__key" 0})) (obj:set-meta "__gdlisp_signals" new-meta) new-meta))))

(defn connect>> (obj signal-name function)
  (let ((function (SignalAdaptor:new function)))
    (obj:connect signal-name function "invoke")
    (let ((meta (get-signals-meta obj)))
      (let ((key (dict/elt meta "__key")))
        (set (dict/elt meta key) function)
        (set (dict/elt meta "__key") (+ (dict/elt meta "__key") 1))
        key))))

(defn connect1>> (obj signal-name function)
  (let ((key nil)
        (weakref (weakref obj)))
    (flet ((oneshot-function (&rest args)
             (apply function args)
             (let ((obj (weakref:get-ref)))
               (cond
                 (obj (disconnect>> obj signal-name key))))))
      (set key (connect>> obj signal-name #'oneshot-function)))))

(defn disconnect>> (obj signal-name index)
  (let ((meta (get-signals-meta obj)))
    (meta:erase index)))

;;; Miscellaneous simple functions

(defn bool (x)
  ;; Like the GDScript primitive but works for all types, not just
  ;; strings and numbers.
  (cond
    (x #t)
    (#t #f)))

(defn vector (x y &opt z)
  (sys/call-magic VECTOR)
  (cond
    ((= z ()) V{x y})
    (#t V{x y z})))

(defn array (&arr xs)
  (sys/call-magic ARRAY)
  xs)

(defn dict (&arr xs)
  (sys/call-magic DICT)
  (let ((resulting-dict {}))
    (for i (range 0 (len xs) 2)
      (let ((k (elt xs i))
            (v (elt xs (+ i 1))))
        (set (elt resulting-dict k) v)))
    resulting-dict))

(defn NodePath (s)
  (sys/call-magic NODEPATH-SYNTAX)
  ((literally NodePath) s))

(defn not (x)
  (sys/call-magic BOOLEAN-NOT)
  (not x))

(defn intern (a)
  (cond
    ((member? a GDLisp:__gdlisp_Global_symbol_table) (elt GDLisp:__gdlisp_Global_symbol_table a))
    (#t (set (elt GDLisp:__gdlisp_Global_symbol_table a) (Symbol:new a)))))

(defn gensym (&opt prefix)
  (cond
    ((= prefix ()) (Symbol:new (GDLisp:__gdlisp_Global_name_generator:generate)))
    (#t (Symbol:new (GDLisp:__gdlisp_Global_name_generator:generate_with prefix)))))

(defn sys/get-node (obj path)
  (sys/call-magic GET-NODE-SYNTAX)
  (obj:get-node path))

(defn instance? (value type)
  (cond
    ((sys/instance-direct? type GDLispSpecialType) (type:satisfies? value))
    (#t (sys/instance-direct? value type))))

(defn sys/instance-direct? (value type)
  (sys/call-magic DIRECT-INSTANCE-CHECK)
  (sys/instance-direct? value type))

(sys/declare function typeof (value) public)

(defn convert (what type)
  (cond
    ((sys/instance-direct? type PrimitiveType) ((literally convert) what type:primitive-value))
    (#t ((literally convert) what type))))

(defn dict/elt (dict n)
  (sys/call-magic DICT-SUBSCRIPT)
  (dict/elt dict n))

(defn set-dict/elt (x dict n)
  (sys/call-magic DICT-SUBSCRIPT-ASSIGNMENT)
  (set-dict/elt x dict n))

(defn dict/find (f dict &opt default)
  (for key dict
    (cond
      ((funcall f key (dict/elt dict key)) (return key))))
  default)

;;; Math operators

(defn + (&rest args)
  (sys/call-magic ADDITION)
  (cond
    ((sys/instance-direct? args Cons)
     (let ((result args:car))
       (set args args:cdr)
       (while (sys/instance-direct? args Cons)
         (set result (+ result args:car))
         (set args args:cdr))
       result))
    (#t 0)))

(defn * (&rest args)
  (sys/call-magic MULTIPLICATION)
  (let ((result 1))
    (while (sys/instance-direct? args Cons)
      (set result (* result args:car))
      (set args args:cdr))
    result))

(defn - (x &rest args)
  (sys/call-magic SUBTRACTION)
  (cond
    ((sys/instance-direct? args Cons)
     (let ((result x))
       (while (sys/instance-direct? args Cons)
         (set result (- result args:car))
         (set args args:cdr))
       result))
    (#t (- x))))

(defn / (x &rest args)
  (sys/call-magic DIVISION)
  (cond
    ((sys/instance-direct? args Cons)
     (let ((result x))
       (while (sys/instance-direct? args Cons)
         (set result (/ result args:car))
         (set args args:cdr))
       result))
    (#t (/ x))))

(defn mod (x y)
  (sys/call-magic MODULO)
  (mod x y))

(defn min (&rest args)
  (sys/call-magic MIN-FUNCTION)
  (cond
    ((sys/instance-direct? args Cons)
     (let ((result args:car))
       (set args args:cdr)
       (while (sys/instance-direct? args Cons)
         (set result (min result args:car))
         (set args args:cdr))
       result))
    (#t (literally INF))))

(defn max (&rest args)
  (sys/call-magic MAX-FUNCTION)
  (cond
    ((sys/instance-direct? args Cons)
     (let ((result args:car))
       (set args args:cdr)
       (while (sys/instance-direct? args Cons)
         (set result (max result args:car))
         (set args args:cdr))
       result))
    (#t (- (literally INF)))))

(defn gcd (&rest args)
  (list/fold #'binary-gcd args 0))

(defn lcm (&rest args)
  (list/fold #'binary-lcm args 1))

(defn binary-gcd (a b) private
  (while (/= b 0)
    (let ((tmp a))
      (set a b)
      (set b (mod tmp b))))
  a)

(defn binary-lcm (a b) private
  (/ (* a b) (binary-gcd a b)))

;;; Comparison operators

(defn = (x &rest args)
  (sys/call-magic EQUAL)
  (while (sys/instance-direct? args Cons)
    (cond
      ((= x args:car) ())
      (#t (return #f)))
    (set x args:car)
    (set args args:cdr))
  #t)

(defn < (x &rest args)
  (sys/call-magic LESS-THAN)
  (while (sys/instance-direct? args Cons)
    (cond
      ((< x args:car) ())
      (#t (return #f)))
    (set x args:car)
    (set args args:cdr))
  #t)

(defn > (x &rest args)
  (sys/call-magic GREATER-THAN)
  (while (sys/instance-direct? args Cons)
    (cond
      ((> x args:car) ())
      (#t (return #f)))
    (set x args:car)
    (set args args:cdr))
  #t)

(defn <= (x &rest args)
  (sys/call-magic LESS-THAN-OR-EQUAL)
  (while (sys/instance-direct? args Cons)
    (cond
      ((<= x args:car) ())
      (#t (return #f)))
    (set x args:car)
    (set args args:cdr))
  #t)

(defn >= (x &rest args)
  (sys/call-magic GREATER-THAN-OR-EQUAL)
  (while (sys/instance-direct? args Cons)
    (cond
      ((>= x args:car) ())
      (#t (return #f)))
    (set x args:car)
    (set args args:cdr))
  #t)

(defn /= (x &rest args)
  (sys/call-magic NOT-EQUAL)
  (let ((outer (cons x args)))
    (while (sys/instance-direct? outer Cons)
      (let ((inner outer:cdr))
        (while (sys/instance-direct? inner Cons)
          (cond
            ((/= outer:car inner:car) ())
            (#t (return #f)))
          (set inner inner:cdr)))
      (set outer outer:cdr)))
  #t)

(defn equal? (x &rest args)
  (while (sys/instance-direct? args Cons)
    (cond
      ((bin-equal x args:car) ())
      (#t (return #f)))
    (set x args:car)
    (set args args:cdr))
  #t)

(defn bin-equal (a b) private
  (cond
    ((cond ((instance? a GDLisp:BaseArray) (instance? b GDLisp:BaseArray)) (#t #f))
     (array-equal a b))
    ((cond ((instance? a GDLisp:Dictionary) (instance? b GDLisp:Dictionary)) (#t #f))
     (dict-equal a b))
    ((cond ((instance? a Cons) (instance? b Cons)) (#t #f))
     (cons-equal a b))
    ((cond ((instance? a GDLisp:Number) (instance? b GDLisp:Number)) (#t #f))
     (= a b))
    ((= (GDLisp:typeof a) (GDLisp:typeof b))
     (= a b))
    (#t #f)))

(defn array-equal (a b) private
  (cond
    ((/= (len a) (len b)) #f)
    (#t (let ((i 0)
              (upper (len a)))
          (while (< i upper)
            (cond ((not (bin-equal (elt a i) (elt b i))) (return #f)))
            (set i (+ i 1)))
          #t))))

(defn dict-equal (a b) private
  (cond
    ((/= (len a) (len b)) #f)
    (#t (for key (a:keys)
          (cond ((not (bin-equal (elt a key) (elt b key))) (return #f))))
        #t)))

(defn cons-equal (a b) private
  (cond
    ((bin-equal a:car b:car) (bin-equal a:cdr b:cdr))
    (#t #f)))

;;; GDScript built-ins that we use unmodified

;; Note: These all repeat the name of the function. By default,
;; `sys/declare` will refuse to declare a name that conflicts with a
;; GDScript language keyword (adding an `_` to the name
;; automatically). But in our case, we want these names to represent
;; the GDScript keywords for real, so we override this using the
;; explicit `sys/declare` naming syntax and force it to use the name
;; anyway.

(sys/declare superfunction (int int) (a) public)
(sys/declare superfunction (randomize randomize) () public)
(sys/declare superfunction (randi randi) () public)
(sys/declare superfunction (randf randf) () public)
(sys/declare superfunction (rand-range rand-range) (a b) public)
(sys/declare superfunction (clamp clamp) (a b c) public)
(sys/declare superfunction (abs abs) (a) public)
(sys/declare superfunction (get-global-mouse-position get-global-mouse-position) () public) ; TODO Definitely want to wrap this (and all of the mouse functions) in a nice namespace or module or something
(sys/declare superfunction (push-error push-error) (a) public)
(sys/declare superfunction (push-warning push-warning) (a) public)
(sys/declare superfunction (load load) (a) public)
(sys/declare superfunction (acos acos) (a) public)
(sys/declare superfunction (asin asin) (a) public)
(sys/declare superfunction (atan atan) (a) public)
(sys/declare superfunction (atan2 atan2) (a b) public)
(sys/declare superfunction (cos cos) (a) public)
(sys/declare superfunction (cosh cosh) (a) public)
(sys/declare superfunction (sin sin) (a) public)
(sys/declare superfunction (sinh sinh) (a) public)
(sys/declare superfunction (tan tan) (a) public)
(sys/declare superfunction (tanh tanh) (a) public)
(sys/declare superfunction (ceil ceil) (a) public)
(sys/declare superfunction (char char) (a) public)
(sys/declare superfunction (exp exp) (a) public)
(sys/declare superfunction (floor floor) (a) public)
(sys/declare superfunction (sqrt sqrt) (a) public)
(sys/declare superfunction (fmod fmod) (a b) public)
(sys/declare superfunction (fposmod fposmod) (a b) public)
(sys/declare superfunction (posmod posmod) (a b) public)
(sys/declare superfunction (sign sign) (a) public)
(sys/declare superfunction (ord ord) (a) public)
(sys/declare superfunction (hash hash) (a) public)
(sys/declare superfunction (get-stack get-stack) () public)
(sys/declare superfunction (is-nan is-nan) (a) public)
(sys/declare superfunction (is-inf is-inf) (a) public)
(sys/declare superfunction (is-equal-approx is-equal-approx) (a b) public)
(sys/declare superfunction (is-zero-approx is-zero-approx) (a) public)
(sys/declare superfunction (inverse-lerp inverse-lerp) (a b c) public)
(sys/declare superfunction (lerp lerp) (a b c) public)
(sys/declare superfunction (lerp-angle lerp-angle) (a b c) public)
(sys/declare superfunction (pow pow) (a b) public)
(sys/declare superfunction (stepify stepify) (a b) public)
(sys/declare superfunction (step-decimals step-decimals) (a) public)
(sys/declare superfunction (seed seed) (a) public)
(sys/declare superfunction (rand-seed rand-seed) (a) public)
(sys/declare superfunction (deg2rad deg2rad) (a) public)
(sys/declare superfunction (rad2deg rad2deg) (a) public)
(sys/declare superfunction (db2linear db2linear) (a) public)
(sys/declare superfunction (linear2db linear2db) (a) public)
(sys/declare superfunction (is-instance-valid is-instance-valid) (a) public)
(sys/declare superfunction (log log) (a) public)
(sys/declare superfunction (wrapf wrapf) (a b c) public)
(sys/declare superfunction (wrapi wrapi) (a b c) public)
(sys/declare superfunction (print-stack print-stack) () public)
(sys/declare superfunction (round round) (a) public)
(sys/declare superfunction (cartesian2polar cartesian2polar) (a b) public)
(sys/declare superfunction (polar2cartesian polar2cartesian) (a b) public)
(sys/declare superfunction (range-lerp range-lerp) (a b c d e) public)
(sys/declare superfunction (move-toward move-toward) (a b c) public)
(sys/declare superfunction (nearest-po2 nearest-po2) (a) public)
(sys/declare superfunction (instance-from-id instance-from-id) (a) public)
(sys/declare superfunction (parse-json parse-json) (a) public)
(sys/declare superfunction (to-json to-json) (a) public)
(sys/declare superfunction (validate-json validate-json) (a) public)
(sys/declare superfunction (dict2inst dict2inst) (a) public)
(sys/declare superfunction (inst2dict inst2dict) (a) public)
(sys/declare superfunction (str2var str2var) (a) public)
(sys/declare superfunction (var2str var2str) (a) public)
(sys/declare superfunction (weakref weakref) (a) public)
(sys/declare superfunction (ease ease) (a b) public)
(sys/declare superfunction (funcref funcref) (a b) public)
(sys/declare superfunction (type-exists type-exists) (a) public)
(sys/declare superfunction (smoothstep smoothstep) (a b c) public)

;; Note that, in the spirit of internal consistency with the type
;; names, we do name some of these functions differently. For
;; instance, the GDScript function `bool` is mapped to the GDLisp
;; function `Bool`, for consistency with the `Bool` type.

(sys/declare superfunction (Bool bool) (a) public)
(sys/declare superfunction (Int int) (a) public)
(sys/declare superfunction (Float float) (a) public)
(sys/declare superfunction (String String) (a) public)
(sys/declare superfunction (AABB AABB) (a b) public)
(sys/declare superfunction (RID RID) (a) public)
(sys/declare superfunction (Dictionary Dictionary) (a) public)
(sys/declare superfunction (Array Array) (a) public)
(sys/declare superfunction (PoolColorArray PoolColorArray) (a) public)
(sys/declare superfunction (PoolByteArray PoolByteArray) (a) public)
(sys/declare superfunction (PoolIntArray PoolIntArray) (a) public)
(sys/declare superfunction (PoolRealArray PoolRealArray) (a) public)
(sys/declare superfunction (PoolVector2Array PoolVector2Array) (a) public)
(sys/declare superfunction (PoolVector3Array PoolVector3Array) (a) public)

(sys/declare superfunction (Vector2 Vector2) (a b) public)
(sys/declare superfunction (Vector3 Vector3) (a b c) public)

(sys/min-godot-version 3050000
  (sys/declare superfunction (deep-equal deep-equal) (a b) public))

;;; Varargs functions

;; (See https://github.com/Mercerenies/gdlisp/issues/79 for details on
;; why we have to wrap these ourselves)

(defn str (x &arr args)
  (sys/call-magic VARARG-STR)
  (let ((result (str x)))
    (for arg args
       (set result (+ result (str arg))))
    result))

(defn printerr (&arr args)
  (sys/call-magic VARARG-PRINTERR)
  (let ((result ""))
    (for arg args
       (set result (+ result (str arg))))
    (printerr result)))

(defn printraw (&arr args)
  (sys/call-magic VARARG-PRINTRAW)
  (let ((result ""))
    (for arg args
       (set result (+ result (str arg))))
    (printraw result)))

(defn print-debug (&arr args)
  (sys/call-magic VARARG-PRINTDEBUG)
  (let ((result ""))
    (for arg args
       (set result (+ result (str arg))))
    (print-debug result)))

(defn print (&arr args)
  (sys/call-magic VARARG-PRINT)
  (let ((result ""))
    (for arg args
       (set result (+ result (str arg))))
    (print result)))

(defn prints (&arr args)
  (sys/call-magic VARARG-PRINTS)
  (let ((result "")
        (first #t))
    (for arg args
       (set result (+ result (cond (first "") (#t " ")) (str arg)))
       (set first #f))
    (print result)))

(defn printt (&arr args)
  (sys/call-magic VARARG-PRINTT)
  (let ((result "")
        (first #t))
    (for arg args
       (set result (+ result (cond (first "") (#t "\t")) (str arg)))
       (set first #f))
    (print result)))

(defn range (a &opt b c)
  (sys/call-magic VARARG-RANGE)
  (cond
    ((= b nil) (range a))
    ((= c nil) (range a b))
    (#t (range a b c))))

(defn Color8 (a b c &opt d)
  (sys/call-magic VARARG-COLOR8)
  (cond
    ((= d nil) (Color8 a b c))
    (#t (Color8 a b c d))))

(defn ColorN (a &opt b)
  (sys/call-magic VARARG-COLORN)
  (cond
    ((= b nil) (ColorN a))
    (#t (ColorN a b))))

(defn Rect2 (a b &opt c d) ; TODO Not a perfect translation of the pair of overloads provided
  (sys/call-magic VARARG-RECT2)
  (cond
    ((= c nil) (Rect2 a b))
    (#t (Rect2 a b c d))))

(defn Transform2D (a &opt b c)
  (sys/call-magic VARARG-TRANSFORM2D)
  (cond
    ((= b nil) (Transform2D a))
    ((= c nil) (Transform2D a b))
    (#t (Transform2D a b c))))

(defn Plane (a b &opt c d)
  (sys/call-magic VARARG-PLANE)
  (cond
    ((= c nil) (Plane a b))
    ((= d nil) (Plane a b c))
    (#t (Plane a b c d))))

(defn Quat (a &opt b c d) ; TODO Not a perfect translation of the overloads provided
  (sys/call-magic VARARG-QUAT)
  (cond
    ((= b nil) (Quat a))
    ((= c nil) (Quat a b))
    (#t (Quat a b c d))))

(defn Basis (a &opt b c)
  (sys/call-magic VARARG-BASIS)
  (cond
    ((= b nil) (Basis a))
    ((= c nil) (Basis a b))
    (#t (Basis a b c))))

(defn Transform (a &opt b c d) ; TODO Not a perfect translation of the overloads provided
  (sys/call-magic VARARG-TRANSFORM)
  (cond
    ((= b nil) (Transform a))
    ((= c nil) (Transform a b))
    (#t (Transform a b c d))))

(defn Color (a &opt b c d) ; TODO Not a perfect translation of the overloads provided
  (sys/call-magic VARARG-COLOR)
  (cond
    ((= b nil) (Color a))
    ((= d nil) (Color a b c))
    (#t (Color a b c d))))

(defn bytes2var (a &opt b)
  (sys/call-magic VARARG-BYTES2VAR)
  (cond
    ((= b nil) (bytes2var a))
    (#t (bytes2var a b))))

(defn var2bytes (a &opt b)
  (sys/call-magic VARARG-VAR2BYTES)
  (cond
    ((= b nil) (var2bytes a))
    (#t (var2bytes a b))))

;; TYPE_* Constants

;;; Built-In Macros

(defmacro or (&rest args)
  (let ((args (list/reverse args)))
    (cond
      (args
       (let ((result `((#t ,args:car))))
         (set args args:cdr)
         (while (/= args nil)
           (set result `((,args:car) . ,result))
           (set args args:cdr))
         `(cond . ,result)))
      (#t #f))))

(defmacro and (&rest args)
  (let ((args (list/reverse args)))
    (cond
      (args
       (let ((result `((#t ,args:car))))
         (set args args:cdr)
         (while (/= args nil)
           (set result `(((not ,args:car) #f) . ,result))
           (set args args:cdr))
         `(cond . ,result)))
       (#t #t))))

(defmacro let* (vars &rest body)
  (cond
    ((= vars nil) `(progn ,.body))
    (#t `(let (,vars:car)
           (let* ,vars:cdr ,.body)))))

(defmacro defvars (&rest args)
  (let ((arr []))
    (while (/= args nil)
      (arr:push_back (list 'defvar args:car))
      (set args args:cdr))
    `(progn ,.arr)))

(defmacro when (cnd &rest args)
  `(cond
     (,cnd (progn ,.args))))

(defmacro unless (cnd &rest args)
  `(cond
     (,cnd ())
     (#t (progn ,.args))))

(defmacro if (cnd t &opt f)
  `(cond
     (,cnd ,t)
     (#t ,f)))

(defmacro update (field updater)
  (cond
    ((not (instance? updater Cons)) (set updater (list updater))))
  (set updater:cdr (cons field updater:cdr))
  `(set ,field ,updater))

(defmacro yield* (arg)
  (let ((symbol (gensym "_yield")))
    `(let ((,symbol ,arg))
       (while (and (instance? ,symbol GDScriptFunctionState) ((unquote symbol):is-valid))
         (yield)
         (set ,symbol ((unquote symbol):resume)))
       ,symbol)))

(defmacro quit ()
  ;; Just a small helper macro to make it easier to exit the game.
  ;; Mainly useful in the REPL.
  '((GDLisp:get-tree):quit))

(defmacro this-file ()
  '(sys/special-ref this-file))

(defmacro this-filename ()
  '(sys/special-ref this-filename))

(defmacro this-true-filename ()
  '(sys/special-ref this-true-filename))

;; TODO Document the semantics of this macro and what preconditions
;; are necessary for it to be safe to use.
(defmacro contextual-load (arg)
  `(load (sys/context-filename ,arg)))

(defmacro deflazy (name value &rest modifiers)
  (let ((fn-name (gensym "_lazy"))
        (this-file (gensym "_this_file"))
        (value-var (gensym "_value"))
        (meta-name ("__gdlisp_Lazy_{}":format [(gensym):__gdlisp_contents] "{}"))) ; TODO Find a better way to convert symbol to string than accessing a, theoretically, private field
    `(progn
       (defn ,fn-name ()
         (let ((,this-file (this-file)))
           (if ((unquote this-file):has-meta ,meta-name)
               ((unquote this-file):get-meta ,meta-name)
               (let ((,value-var ,value))
                 ((unquote this-file):set-meta ,meta-name ,value-var)
                 ,value-var))))
       (define-symbol-macro ,name (list (list 'access-slot (list 'contextual-load (this-true-filename)) ',fn-name)) ,.modifiers))))

(defmacro defobject (name parent &opt visibility &rest body)
  (cond
    ((= visibility nil)
     (set visibility 'public))
    ((not (instance? visibility Symbol))
     (set body (cons visibility body)) ; It's not a modifier, so it's part of the body
     (set visibility 'public))
    ((= visibility 'public)
     nil)
    ((= visibility 'private)
     nil)
    (#t
     (set body (cons visibility body)) ; It's not a modifier, so it's part of the body
     (set visibility 'public)))
  `(deflazy ,name (new ,parent ,.body) ,visibility))

(defmacro list/for (var list &rest body)
  (let ((iter (gensym)))
    `(let ((,iter ,list)
           (,var ()))
       (while (/= ,iter ())
         (set ,var (access-slot ,iter car))
         (set ,iter (access-slot ,iter cdr))
         ,.body))))

(defmacro -> (arg &rest forms)
  (cond
    ((= forms nil) arg)
    (#t (let ((first (cond ((instance? forms:car Cons) forms:car) (#t (list forms:car))))
              (rest forms:cdr))
          (let ((new-arg (cons first:car (cons arg first:cdr))))
            `(-> ,new-arg ,.rest))))))

(defmacro ->> (arg &rest forms)
  (cond
    ((= forms nil) arg)
    (#t (let ((first (cond ((instance? forms:car Cons) forms:car) (#t (list forms:car))))
              (rest forms:cdr))
          (let ((new-arg (snoc first arg)))
            `(->> ,new-arg ,.rest))))))

(defmacro as-> (arg var &rest forms)
  (cond
    ((= forms nil) arg)
    (#t (let ((first forms:car)
              (rest forms:cdr))
          `(as-> (let ((,var ,arg)) ,first) ,var ,.rest)))))


================================================
FILE: MacroServer/TestLoadedFile.gd
================================================
# Copyright 2023 Silvio Mayolo
#
# This file is part of GDLisp.
#
# GDLisp is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GDLisp is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GDLisp. If not, see <https://www.gnu.org/licenses/>.

# This file is used exclusively for testing purposes and is not used
# in compilation of actual GDScript code.

static func example():
    return "Test succeeded"


================================================
FILE: MacroServer/main.gd
================================================
# Copyright 2023 Silvio Mayolo
#
# This file is part of GDLisp.
#
# GDLisp is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GDLisp is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GDLisp. If not, see <https://www.gnu.org/licenses/>.

extends Node

var peer = null
var loaded_files = null


func _ready():
    loaded_files = []

    var port_number = int(OS.get_environment("GDLISP_PORT_NUMBER"))

    peer = StreamPeerTCP.new()
    peer.big_endian = true
    peer.connect_to_host("127.0.0.1", port_number)


func _process(_delta):
    if peer.get_available_bytes() > 0:
        var json_result = JSON.parse(peer.get_string())
        if json_result.error == OK:
            var payload = json_result.result
            run_command(payload)
        else:
            push_error("Invalid JSON " + json_result.error_string)
            peer.put_string(failed_response(ERR_INVALID_DATA, "Invalid JSON " + json_result.error_string))


func failed_response(error_code, error_string = ""):
    var response = {
        "error_code": error_code,
        "error_string": error_string,
        "response_string": ""
    }
    return JSON.print(response)


func successful_response(response_string):
    var response = {
        "error_code": OK,
        "error_string": "",
        "response_string": response_string
    }
    return JSON.print(response)


func run_command(payload):
    var cmd = payload['command']
    var args = payload['args']
    match cmd:
        "quit":
            peer.put_string(successful_response("Acknowledged\nQuitting..."))
            get_tree().quit()
        "ping":
            peer.put_string(successful_response("pong"))
        "eval":
            var input = args[0]
            var result = eval(input)
            peer.put_string(successful_response(pretty(result)))
        "exec":
            var input = args[0]
            var result = exec(input)
            peer.put_string(successful_response(pretty(result)))
        "load":
            var input = args[0]
            var idx = len(loaded_files)
            loaded_files.push_back(load(input))
            peer.put_string(successful_response(pretty(idx)))

func eval(input):
    return exec("    return " + input)

# Funny hack, thanks Godot Q&A! :)
#
# https://godotengine.org/qa/339/does-gdscript-have-method-to-execute-string-code-exec-python?show=362#a362
func exec(input):
    var script = GDScript.new()
    script.set_source_code("func exec(MAIN):\n" + input)
    script.reload()

    var obj = Reference.new()
    obj.set_script(script)

    return obj.exec(self)


# I'll probably end up migrating this to GDLisp.gd proper at some
# point, but for now, here it is.
func pretty(value):
    if value == null:
        return "()"
    elif value is bool and value:
        return "#t"
    elif value is bool and not value:
        return "#f"
    elif value is int or value is float:
        return str(value)
    elif value is Vector2:
        return "V{{} {}}".format([pretty(value.x), pretty(value.y)], "{}")
    elif value is Vector3:
        return "V{{} {} {}}".format([pretty(value.x), pretty(value.y), pretty(value.z)], "{}")
    elif value is Array:
        var s = "["
        var first = true
        for x in value:
            if not first:
                s += " "
            s += pretty(x)
            first = false
        return s + "]"
    elif value is Dictionary:
        var s = "{"
        var first = true
        for k in value:
            if not first:
                s += " "
            s += pretty(k) + " " + pretty(value[k])
            first = false
        return s + "}"
    elif value is String:
        var s = "\""
        for x in value:
            match x:
                "\n":
                    s += "\\n"
                "\t":
                    s += "\\t"
                "\r":
                    s += "\\r"
                "\a":
                    s += "\\a"
                "\b":
                    s += "\\b"
                "\f":
                    s += "\\f"
                "\v":
                    s += "\\v"
                "\"":
                    s += "\\\""
                "\\":
                    s += "\\\\"
                _:
                    s += x
        return s + "\""
    elif value.has_meta("__gdlisp_Primitive_Cons"):
        return "(" + _pretty_list(value) + ")"
    elif value.has_meta("__gdlisp_Primitive_Symbol"):
        return value.__gdlisp_contents
    else:
        return str(value)


func _pretty_list(value):
    # The same logic as `crate::sxp::ast::fmt_list` to make list
    # output pretty.
    if value.cdr == null:
        return pretty(value.car)
    elif typeof(value.cdr) == TYPE_OBJECT and value.cdr.has_meta("__gdlisp_Primitive_Cons"):
        return pretty(value.car) + " " + _pretty_list(value.cdr)
    else:
        return pretty(value.car) + " . " + pretty(value.cdr)


================================================
FILE: MacroServer/main.tscn
================================================
[gd_scene load_steps=2 format=2]

[ext_resource path="res://main.gd" type="Script" id=1]

[node name="main" type="Node"]
script = ExtResource( 1 )


================================================
FILE: MacroServer/project.godot
================================================

config_version=4

[application]

run/main_scene="res://main.tscn"

[autoload]

GDLisp="*res://GDLisp.gd"


================================================
FILE: README.md
================================================
[![GitHub Actions: Ubuntu](https://github.com/mercerenies/gdlisp/actions/workflows/test-Godotv3.5-Ubuntu.yml/badge.svg)](https://github.com/Mercerenies/gdlisp/actions/workflows/test-Godotv3.5-Ubuntu.yml)
[![GitHub Actions: Ubuntu](https://github.com/mercerenies/gdlisp/actions/workflows/test-Godotv3.5-Mono-Ubuntu.yml/badge.svg)](https://github.com/Mercerenies/gdlisp/actions/workflows/test-Godotv3.5-Mono-Ubuntu.yml)
[![GitHub Actions: Ubuntu](https://github.com/mercerenies/gdlisp/actions/workflows/test-Godotv3.4-Ubuntu.yml/badge.svg)](https://github.com/Mercerenies/gdlisp/actions/workflows/test-Godotv3.4-Ubuntu.yml)
[![GitHub Actions: Ubuntu](https://github.com/mercerenies/gdlisp/actions/workflows/test-Godotv3.3.3-Ubuntu.yml/badge.svg)](https://github.com/Mercerenies/gdlisp/actions/workflows/test-Godotv3.3.3-Ubuntu.yml)

# GDLisp

Lisp for the [Godot](https://godotengine.org/) platform! This language
aims to be a Lisp dialect which compiles to GDScript.

This project is built using [Cargo](https://doc.rust-lang.org/cargo/)
with [Rake](https://ruby.github.io/rake/) as a wrapper for custom
build scripts. Use `rake test` to run the test suite, and use `rake
run` to compile stdin input to GDScript.

The current version of GDLisp is tested against Godot 3.5 and expects
a command called `godot` to be on your system's path which points to
the Godot executable.

Check out the [official
documentation](https://gdlisp.readthedocs.io/en/stable/) for a
"Getting Started" guide!

GDLisp is not affiliated with or endorsed by the Godot project in any
official capacity. This is an independent project.

## Features

* Support for standard GDScript functionality, including function
  declarations, class declarations, signals, etc.
* The expression-based semantics we all love from Lisp
* Lambdas / anonymous functions as well as anonymous classes
* Support for compile-time macros that run in the GDLisp compiler
  itself

## FAQs

### Can I use GDLisp today?

Absolutely! GDLisp is production-ready, and I encourage everyone to
try it out and provide any feedback on the issue tracker.

### What Godot versions is GDLisp compatible with?

GDLisp works with Godot 3.x. The next major release of GDLisp will be
fully compatible with Godot 4, though there's no definite timeline on
that as yet.

### Can I use GDLisp and GDScript in the same project?

You certainly can! GDLisp constructs compile in a straightforward way
to existing Godot concepts. Classes and functions written in GDLisp
can be used from GDScript, and vice versa.

## License

GDLisp is distributed under the terms of the GNU General Public
License version 3 or later. For more details, see `COPYING`.

As a special exception to the GNU General Public License, the GDLisp
support file `GDLisp.lisp` can be used and redistributed without any
restrictions.


================================================
FILE: Rakefile
================================================

require 'logger'
require 'fileutils'

if Gem.win_platform?
  # Needed to be able to create symlinks on Windows.
  require 'win32/file'
end

$logger = Logger.new($stdout)

release_flag =
  if ENV['GDLISP_RELEASE']
    ['--release']
  else
    []
  end

task default: %w[run]

task :clippy do |t, args|
  sh 'cargo', 'clippy', *args
end

task :doc do |t, args|
  ENV['RUSTDOCFLAGS'] ||= ''
  ENV['RUSTDOCFLAGS'] += ' -D warnings'
  sh 'cargo', 'doc', *args
end

task :build_rs do |t, args|
  sh 'cargo', 'build', *release_flag
end

task build: :build_rs do |t, args|
  sh 'cargo', 'run', *release_flag, '--', '--compile-stdlib'
  cp 'GDLisp.gd', 'MacroServer/GDLisp.gd'
  cp_r 'MacroServer', 'target/debug'
  cp 'GDLisp.msgpack', 'target/debug'
  cp_r 'MacroServer', 'target/debug/deps'
  cp 'GDLisp.msgpack', 'target/debug/deps'
  cp_r 'MacroServer', 'target/release'
  cp 'GDLisp.msgpack', 'target/release'
  cp_r 'MacroServer', 'target/release/deps'
  cp 'GDLisp.msgpack', 'target/release/deps'
  if release_flag.include? '--release'
    mkdir_p 'bin/'
    File.delete('bin/gdlisp') if File.exist?('bin/gdlisp')
    File.symlink('../target/release/gdlisp', 'bin/gdlisp')
  end
end

task run: :build do |t, args|
  sh 'cargo', 'run', *release_flag, *args
end

task test: :build do |t, args|
  sh 'cargo', 'test', *release_flag, *args
end

task :clean do |t, args|
  sh 'cargo', 'clean', *args
end


================================================
FILE: build.rs
================================================
// Copyright 2023 Silvio Mayolo
//
// This file is part of GDLisp.
//
// GDLisp is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// GDLisp is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with GDLisp. If not, see <https://www.gnu.org/licenses/>.

extern crate lalrpop;

fn main() {
    lalrpop::process_root().unwrap();
}


================================================
FILE: doc/README.md
================================================

# GDLisp Official Documentation

This is the official documentation for the GDLisp language.

 * [`internal/`](internal/) - Information useful for contributors to
   this repository. Developers *using* GDLisp should not need the
   information here.


================================================
FILE: doc/internal/CompilationStages.md
================================================

# Compilation Stages

```mermaid
flowchart LR
    subgraph AST
      direction TB
      Parse[Parse .lisp file into AST]
    end
    subgraph IR
      direction TB
      LoadIR[Load AST into IR data structures]
      Scopes[Check for Scope Conflicts]
      Loops["Validate Looping Constructs (Break/Continue)"]
      LoadIR-->Scopes-->Loops
    end
    subgraph GDScript
      direction TB
      Bind[Bind all top-level declarations in a global symbol table]
      Const[Check that any expressions in constant position are actually constant]
      Compile[Compile IR into GDScript syntax representation]
      Optimize[Run GDScript-Level Optimizations]
      Output[Output GDScript to .gd file]
      Bind-->Const-->Compile-->Optimize-->Output
    end
    AST-->IR-->GDScript
```

This document details the stages of the GDLisp Compiler.

GDLisp source code begins in a `.lisp` source file. The parser loads
that into an abstract syntax tree (AST). At this point, the code is
*only* being viewed as a sequence of S-expressions that has no further
semantic meaning.

Next, the AST is loaded into a specially-designed intermediate
representation (IR). During loading into IR, any macros that are
encountered are evaluated and interpolated. Crucially, after the code
is loaded into its IR representation, no more macro expansion will
ever need to happen. The IR understands basic notions, such as the
difference between an expression and a declaration, as well as control
flow constructs like `cond` statements and assignment statements. It
does *not* understand more detailed scoping rules regarding local
variables.

Once the IR is loaded, some validation is performed on the code in its
IR form.
* All scopes are checked for name conflicts. While name shadowing is
  allowed (i.e. declaring a local function with the same name as a
  global one, or a local function with the same name as a local
  function in a strictly outer scope), declaring the same variable or
  function twice in the same scope is forbidden. Additionally, the
  top-level scope can declare at most one `main` class.
* Any loop control constructs are checked. That is, all uses of
  `break` and `continue` are audited to ensure that they make sense.
  `break` and `continue` can only be used inside of loops, and they
  cannot be used if there is a closure (such as a lambda) between the
  control construct and the loop declaration.

Next, the IR is analyzed, and a global symbol table is created. Any
top-level declarations have their names bound in the global symbol
table. This ensures that, during compilation, functions can access
functions declared anywhere in the file.

With the symbol table, any expressions in constant position are
checked to make sure they are actually constant. This includes `const`
declarations, the right-hand-side of `enum` values, and the inside of
`export` clauses.

Then the IR is compiled into an internal representation of GDScript.
This is basically GDScript source code, but represented as an abstract
syntax tree manipulable within the GDLisp engine. This compilation
takes into consideration the global symbol table and checks that any
referenced names (local or global) make sense in that context.

Once the GDScript source is built, some optimizations are performed on
it to eliminate dead code, simplify convoluted constructs, and
generally make the code better and faster. This step is specifically
disabled during unit and integration testing, except for those
specifically designed to test optimizations.

Finally, the resulting GDScript source is stringified and written out
to a `.gd` file.


================================================
FILE: doc/internal/README.md
================================================

# Internal GDLisp Documentation

 * [Compilation Stages](CompilationStages.md)


================================================
FILE: doc/readthedocs/Makefile
================================================
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS    ?=
SPHINXBUILD   ?= sphinx-build
SOURCEDIR     = .
BUILDDIR      = _build

# Put it first so that "make" without argument is like "make help".
help:
	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)


================================================
FILE: doc/readthedocs/conf.py
================================================
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'GDLisp'
copyright = '2022-2023, Mercerenies'
author = 'Mercerenies'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinxcontrib.mermaid']

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
highlight_language = 'scheme'

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

#html_theme = 'alabaster'
html_theme = "sphinx_rtd_theme"
html_static_path = ['_static']


================================================
FILE: doc/readthedocs/index.rst
================================================
.. GDLisp documentation master file, created by
   sphinx-quickstart on Thu Dec  1 12:29:12 2022.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to GDLisp's documentation!
==================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:

   tutorial/index.rst
   reference/index.rst


================================================
FILE: doc/readthedocs/make.bat
================================================
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.https://www.sphinx-doc.org/
	exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd


================================================
FILE: doc/readthedocs/reference/classes.rst
================================================

.. _classes:

Classes and Objected-Oriented Programming
=========================================

GDLisp, like GDScript, is an object-oriented programming language.
GDLisp implements a similar object inheritance mechanism to GDScript,
allowing you to define classes which inherit from exactly one
superclass and to create instances of those classes.

Classes are declared at the top-level of a module as follows. Classes
may *not* be nested within one another.

::

  (defclass ClassName (ParentClassName)
    body ...)
  (defclass ClassName (ParentClassName) public-or-private
    body ...)

The class name is a symbol literal. By convention, class names in
Godot are written in ``CamelCase``, though this is not a requirement.
The parent class is a symbol literal whose value is a class known at
compile-time. The parent class name may optionally be followed by a
:ref:`visibility modifier <visibility-modifiers>`. Class names are
placed in the value namespace, similar to constants and enums.

The parent class name may be omitted by simply replacing it with the
empty list ``()``. In this case, the parent class is assumed to be the
built-in type ``Reference``. For example, the following class
implicitly has parent class ``Reference``.

::

  (defclass MyNewReferenceType ()
    body ...)

After the class name, the class body consists of zero or more class
declarations. These are somewhat similar to normal module-level
declarations, but there are some forms that only make sense inside of
classes, and there are some subtle differences between the two, so
it's best to treat the two scopes as distinct.

Macro expansion takes place inside of class declaration scopes, just
like it does at the top level of a module.

Inside of classes, there are four valid types of declarations:
``defsignal``, ``defconst``, ``defvar``, and ``defn``. Additionally,
:ref:`progn <progn>` forms can appear in class bodies and behave
identically to the same forms at the top-level.

Class Constants
---------------

``defconst`` inside of classes works identically to the ``defconst``
top-level form. It defines a constant inside the class scope, whose
value is known at compile-time. See :ref:`constants` for more details
on how this declaration type works.

Class constants are considered "static". That is, it is not necessary
to construct an instance in order to access a class constant. Class
constants can be accessed on the class directly *or* on an instance,
and the syntax to do so uses ``access-slot`` (or, more conveniently,
the ``:`` colon syntax sugar). Given the following class, both
``Foo:A`` and ``(Foo:new):A`` will evaluate to ``42``.

::

  (defclass Foo ()
    (defconst A 42))

Class Signals
-------------

::

  (defsignal signal-name)
  (defsignal signal-name (args ...))

Signals are the only values defined in the signal namespace. A signal
is defined by ``defsignal``, followed by the name of the signal, and
then followed by a :ref:`simple lambda list <simple-lambda-lists>`. If
the argument list is omitted, then it defaults to ``()``.

Instance Variables
------------------

::

  (defvar var-name)
  (defvar var-name initial-value)

Instance variables are defined using ``defvar``. An instance variable
is a name that exists on *instances* of the class, not on the class
itself. GDLisp has no concept of "static" instance variables.

Instance variables can be accessed on instances of a class via the
``access-slot`` syntax (more conveniently written using the infix
``:`` operator). Given an instance ``my-player`` of type ``Player``,
the ``health`` field on this instance can be accessed via
``my-player:health`` (equivalently, ``(access-slot my-player
health)``).

An instance variable may optionally be followed by its initial value.
If provided, the initial value will be set at the very beginning of
the class' constructor, immediately after calling the superclass
constructor. If not provided, the initial value of the variable shall
be the null ``()`` object.

.. Note:: GDLisp, like GDScript, has no notion of static instance
          variables. All instance variables are scoped to a particular
          instance.

Initialization Time
^^^^^^^^^^^^^^^^^^^

By default, instance variables for which an initial value is given are
initialized at object construction time, after the parent ``_init`` is
called but before the current class' ``_init`` is executed. It is
often useful to initialize instance variables when a node is first
added to the scene tree. To this end, a ``defvar`` for which an
initial value is provided can optionally be succeeded by the
``onready`` symbol.

::

  (defvar var-name initial-value onready)

A variable indicated in this way will have its value set immediately
before the ``_ready`` method of the class is invoked, when the node is
added to the scene tree.

Class and Instance Functions
----------------------------

::

  (defn function-name (args ...)
    body ...)

Class-level functions are declared similarly to module-level
functions, using the ``defn`` keyword, followed by the function name,
then a list of formal arguments, and finally the function body.
Class-level functions take formal arguments as a :ref:`simple lambda
list <simple-lambda-lists>`, which means functions inside of a class
do *not* support optional or variable arguments.

A function defined inside of a class is called on instances of the
class, using an ``access-slot`` form as the head of an S-expression in
an expression context. That is, given an object ``foo``, the
expression ``(foo:bar 1 2 3)`` (or, written out in full,
``((access-slot foo bar) 1 2 3)``) will invoke the instance function
called ``bar`` on the object ``foo``, calling it with three arguments:
``1``, ``2``, and ``3``.

Inside the body of an instance function, the argument names are bound
within a local scope, similar to a module function. Additionally, the
special variable name ``self`` is bound to the instance on which the
function was invoked. The body expressions of the function are
evaluated in order, and the final expression is returned. If the
function has no body, then the null ``()`` object is returned. Like
with module functions, instance functions can be exited early with the
``return`` special form.

Static Functions
^^^^^^^^^^^^^^^^

::

  (defn function-name (args ...) static
    body ...)

A function may be marked as static by placing the keyword ``static``
keyword after the function's formal argument list. A static function
can be invoked on *either* an instance or the class itself using the
``:`` (equivalently, ``access-slot``) forms to call the function. In
either case, a static function behaves like an instance function
except that ``self`` is never bound inside the function.

.. _constructor-functions:

Constructor Functions
^^^^^^^^^^^^^^^^^^^^^

::

  (defn _init (args ...)
    body ...)

The function called ``_init`` is special. This is the function which
will be invoked when a new instance of the class should be constructed
via ``new``. Any arguments passed to the class' ``new`` function will
be forwarded onto ``_init``.

``_init`` takes a *constructor lambda list*, which permits a special
form of syntax unique to constructors, rather than a simple lambda
list. See :ref:`constructor-lambda-lists` for details. ``_init`` can
never be static. Finally, ``_init`` never returns a value. The
``return`` special form may still be used to exit the constructor
early, but its argument will be ignored.

The first expression in the body of a constructor function can be of
the form ``(super args ...)``, i.e. a proper list whose first element
is the literal name ``super``. This will cause the constructor
function to invoke the parent class' constructor with the arguments
given. This must be the first expression in a constructor function. If
an explicit ``super`` call is not supplied, then the parent class'
constructor will be called implicitly with no arguments.

.. _getter-and-setter:

Getter and Setter Functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

  (defn (get field-name) ()
    body ...)
  (defn (set field-name) (arg)
    body ...)

Rather than a literal symbol, the function name of a ``defn`` can be
one of the special forms ``(get field-name)`` or ``(set field-name)``
where ``field-name`` is an arbitrary literal symbol. These define,
respectively, a getter and a setter function. Getters and setters can
never be static.

A getter function, defined with the name ``(get field-name)``, must
take zero arguments. It will be invoked when the corresponding field
(in the value namespace) is accessed on an instance of the class. That
is, a getter method ``(get health)`` will be invoked on a class
``Player`` if we have an instance of the class ``my-player`` and
attempt to access the field ``my-player:health``.

A setter function, defined with the name ``(set field-name)``, must
take exactly one argument. It will be invoked when the corresponding
field is *assigned to* with the ``set`` special form. That is, a
function ``(set health)`` will be invoked on a class ``Player`` if we
have an instance of the class ``my-player`` and write ``(set
my-player:health some-value)``. The sole argument to a setter function
is the right-hand side of the ``set`` special form. A setter function
never returns a value. Setters can be exited early with the ``return``
special form, but the value returned will be ignored.

Setters and getters for the same field may be defined on the same
class. It is an error to define an instance variable (via ``defvar``)
and a setter or a getter for the same field name on the same class.

Setters and getters are compatible with GDScript, in the sense that
attempts to access or set the field from GDScript will also trigger
the getter or setter, respectively.

Superclass Calls
^^^^^^^^^^^^^^^^

Within a non-static instance function, a special form of syntax is
available.

::

  (super:method-name args ...)

Attempting to call a method on the literal symbol ``super`` will
invoke the method of the given name on the current instance, but
considering only functions defined in the parent class or above.

This syntax only makes sense inside of instance functions in a class.
The behavior is undefined if this ``super`` call syntax is used in a
setter, getter, or constructor. ``super`` is *not* a value in the
value namespace, and it is not permitted to assign ``super`` (on its
own) to a variable or use it in some way other than the syntax shown.

Main Classes
------------

In GDScript, a single source file maps to a defined class. Functions
on a source file are, unless marked static, functions on *instances*
of that class. GDLisp works differently. A GDLisp source file is a
module, and it may *contain* one or more classes, but it is not itself
a class. These classes contained in a GDLisp source file will compile
to *inner classes* in the resulting GDScript source file.

However, there are good reasons to have control over this "top-level"
class in Godot. Packed scenes will always refer to a file's top-level
class, not to inner classes. So GDLisp provides a mechanism to define
a particular class that should be treated as the "main" class.

::

  (defclass ClassName (ParentClassName) main
    body ...)


After the class' parent name and before the class' body, the symbol
``main`` can be written to indicate that this class is the module's
"main" class. If your class has a visibility modifier, then the
``main`` modifier can be written before or after the visibility
modifier (though a private ``main`` class makes very little sense).

Designating a class as the "main" class does not change how you refer
to this class in GDLisp. It is still a class name defined on the
module in the value namespace, just like any other class, and it will
still be instantiated, imported, and used in the exact same way. The
``main`` designator does affect how the class is compiled, though.
Rather than compiling to an inner class, the main class compiles to
the top-level class of the GDScript file.

There are several limitations.

* There can be at most one ``main`` class in a file.

* There must be no conflicts between names defined inside the ``main``
  class and names defined at the module level. That is, if a constant
  is defined at the module level, then there must be no constants or
  instance variables inside the class with the same name (up to
  normalization). Likewise, if a function or macro is defined at the
  top-level, then there must be no instance functions (static or
  otherwise) with the same name (again, up to normalization).

Visibility Inside a Class
-------------------------

A class name can, like most module declarations, be declared
``public`` or ``private``. However, the elements *inside* of a class
have no visibility modifiers. There is no way to define private fields
or instance functions in GDLisp. Everything defined inside of a class
is presumed public.

Name Normalization Within Classes
---------------------------------

Name normalization works slightly differently inside of classes. The
rules for *how* names are normalized within classes are the same as at
the module level (see :ref:`name-normalization`). However, the
difference is in how names are resolved.

At the module level, a name must be referred to in the exact same way
as it was defined. That is, if you define a function called
``foo-bar``, then you must call it as ``(foo-bar ...)``. Even though,
at runtime, the resulting GDScript function will be called ``foo_bar``
(with an underscore in place of the dash), GDLisp will not allow you
to call the function as ``(foo_bar ...)``.

Inside of classes, the rules are much more lenient, owing to Godot's
dynamic nature. You may access fields or call functions on classes and
instances using *any* name that normalizes to the same name that was
used to define the function or field.

As a consequence, you can call built-in GDScript instance functions
using the conventions of GDLisp, so you can get a child node from a
node by writing ``(parent-node:get-node "ChildNodeName")``. This will
normalize to a function call to ``get_node``, which is defined by
Godot.


================================================
FILE: doc/readthedocs/reference/command-line.rst
================================================

The GDLisp Command Line Tool
============================

The core interface to the GDLisp compiler and programming language is
the command line tool ``gdlisp``. This tool is written mostly in Rust,
with a small portion written in GDScript for bootstrapping purposes.

.. _building:

Building
--------

``gdlisp`` is built using Rake, the Ruby task management tool. The
following dependencies must be explicitly installed before building
``gdlisp``.

* The ``rake`` command line tool must be installed, as it is necessary
  to run rakefiles.

* The target version of Godot must be available on the target system
  and must be available on the system path under the name ``godot``
  (case sensitive).

* If building on Windows, you will also need the `win32-file gem
  <https://www.rubydoc.info/gems/win32-file>`_.

Once the dependencies are installed, to build the release version of
GDLisp, it should suffice to run

.. code-block:: bash

   $ GDLISP_RELEASE=1 rake build

.. Note:: If you're building in a non-POSIX shell, you may have to
          initialize the environment variable ``GDLISP_RELEASE`` in
          some other way.

After a successful build for release purposes, an executable will be
placed at ``./bin/gdlisp``. At this point, if you plan to use GDLisp
long-term, then you may wish to place that file on your system path.

The Rakefile
^^^^^^^^^^^^

The Rakefile for this tool provides the following tasks.

``rake build``
    Builds the entire project, including all dependencies.

``rake clean``
    Cleans up any build artifacts.

``rake run``
    Builds and then runs the ``gdlisp`` program.

``rake build_rs``
    Builds only the Rust dependencies, not the Godot dependencies.

``rake test``
    Runs the full GDLisp test suite.

``rake clippy``
    Runs the Rust linter Clippy against the codebase.

``rake doc``
    Generates the internal documentation of the codebase. That is
    *not* the page you're reading right now but consists of Rustdoc
    pages detailing the inner workings of the source code.

When building the software, the build suite defaults to compiling in
*debug mode*, which disables certain optimizations and produces better
internal stack traces in GDLisp. To make a build for release purposes,
define the ``GDLISP_RELEASE`` environment variable to any value.

Running
-------

Once you have the ``gdlisp`` command line tool, you may run it with
``--help`` to see the available options. Generally speaking, users of
GDLisp will invoke the program in the following ways.

* Invoking ``gdlisp`` with no arguments will open a REPL instance.

* Invoking ``gdlisp`` with the name of one or more ``.lisp`` filenames
  will compile all of those files from GDLisp into GDScript.

* Invoking ``gdlisp`` with the name of a directory will recursively
  search that directory, compiling all ``.lisp`` files into GDScript
  files. This is most useful if given the root directory of a Godot
  project (i.e. the folder containing your ``project.godot`` file).

The REPL
--------

Invoking ``gdlisp`` with no arguments drops you into a read-eval-print
loop (or REPL, for short), where you can run arbitrary GDLisp
declarations or expressions and see the output.

.. _support-file:

The GDLisp Support File
-----------------------

GDLisp has a single-file support library that **must** be included in
any project that uses GDLisp source code. This file defines all of the
built-in functions and values available to GDLisp programmers, as well
as providing some scaffolding necessary for the generated code as
well.

In a project that needs to utilize GDLisp source code, you must
include the ``GDLisp.gd`` file. This file is bootstrapped from
``GDLisp.lisp`` and is produced into the root project directory as
part of the build process above.

1. Copy and paste the ``GDLisp.gd`` file into the root of your project
   directory.

2. Create a Godot autoload (sometimes called a singleton) for this
   file in your project. The autoload must be called ``GDLisp`` (with
   that exact capitalization). All GDLisp source files will assume
   that this global variable exists.

.. Warning:: Some versions of Godot try to choose the capitalization
             for your autoloads in a different way. Specifically,
             Godot may suggest the name ``GdLisp`` (with a lowercase
             ``d``) as a default name. The name of the autoload must
             be ``GDLisp``, with that *exact* capitalization, or
             GDLisp generated source files will not load.


================================================
FILE: doc/readthedocs/reference/datatypes.rst
================================================

Basic Datatypes
===============

GDLisp compiles to GDScript and runs on the Godot engine, so the core
datatypes for GDLisp are the same as those of GDScript. That is,
GDLisp defines the following core types, identical to their
representations in Godot.

For more details about these basic types, see the `GDScript
documentation
<https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html>`_.
They are listed here for completeness.

* A ``Null`` type with a single value. The single value of this type
  is written as ``()``, or ``nil``. (Note that ``()`` is the literal
  representation of the null value, whereas ``nil`` is merely a global
  constant which is *defined* to be ``()``)

* A ``Bool`` type with two values, written as ``#f`` for false and
  ``#t`` for true.

* An ``Int`` type for 64-bit signed integers.

* A ``Float`` type representing double-precision floating point
  values.

* A ``String`` type consisting of UTF-8 strings.

* The ``Vector2`` and ``Vector3`` types, with literals written
  enclosed in ``V{`` and ``}``. Both types of vectors are written in
  this way; they are distinguished by the number of arguments to the
  syntactic form.

* ``Rect2``, ``Transform2D``, ``Plane``, ``Quat``, ``AABB``,
  ``Basis``, ``Transform``, ``Color``, ``NodePath``, and ``RID`` all
  behave identically to GDScript. There is no literal syntax for any
  of these types.

.. _cons-cell:

Cons Cells
----------

GDLisp defines a ``Cons`` datatype. ``Cons`` values are constructed
using the built-in function ``cons`` and store two fields: a ``car``
and a ``cdr``, both accessible by public field access on the cell.

Cons cells are used to build up singly-linked lists to represent the
abstract syntax tree of your code during macro expansion.

Arrays
------

GDLisp supports all of the built-in Godot array types, including the
base ``Array`` and all of its strongly-typed companions. Array
literals are written in square brackets ``[`` and ``]``, or
equivalently are constructed with the ``array`` function.

Dictionaries
------------

GDLisp supports the built-in Godot ``Dictionary`` type, which maps
keys to values. Dictionaries are constructed using the ``dict``
function, or equivalently enclosed in curly braces ``{`` and ``}``.
The elements of a dictionary are *not* delimited by colons or commas;
they are merely written side by side. For example, ``{key1 value1 key2
value2}``.

Functions
---------

``Function`` is the type of first class functions in GDLisp. Functions
are defined using top-level declaration forms such as ``defn`` or by
the ``lambda`` or ``function`` special forms. Calling functions is
done with the built-in ``funcall`` or its fully general companion
``apply``.

.. _cell-type:

Cells
-----

A ``Cell`` is a simple type that has a single public field:
``contents``. A cell is constructed directly by the ``Cell``
constructor (``(Cell:new value)``). Cells are seldom used directly in
GDLisp code but are frequently used behind the scenes to implement
closures.

Symbols
-------

The ``Symbol`` data type represents atomic symbols in GDLisp. There is
no equivalent to this in base Godot (though it is similar in principle
to the Godot 4 type ``StringName``). A ``Symbol`` has a textual
representation, similar to a string. Symbols are most commonly
constructed by simply quoting a symbol literal, though they can also
be constructed from strings using ``intern``, and unique, unused
symbols can be constructed with ``gensym``.

The Object Hierarchy
--------------------

Like GDScript, GDLisp supports an object-oriented style of
programming. GDLisp expands upon Godot's built-in inheritance
hierarchy, introducing a partial ordering on all types.

.. mermaid::

   graph BT
       Nothing-->Symbol-->Reference-->Object-->AnyRef-->Any
       Nothing-->Node-->Object
       Nothing-->String-->AnyVal-->Any
       Nothing-->Int-->Number-->AnyVal
       Nothing-->Float-->Number
       Nothing-->Array-->BaseArray-->AnyVal
       Nothing-->Pool...Array-->BaseArray
   Nothing-->Prim["Primitive types"]-->AnyVal

At the top of the hierarchy is the ``Any`` type, which contains all
GDLisp objects, whether they inherit from the ``Object`` class or are
primitives.

Below that, the two types ``AnyRef`` and ``AnyVal`` partition the
space of objects into two. ``AnyRef`` contains all of the object types
and ``AnyVal`` contains all of the Godot primitives.

On the ``AnyVal`` side, all of the primitive Godot types are provided
as-is as subtypes of ``AnyVal``. Additionally, two new types are
provided. ``Number`` is the lowest common supertype of ``Int`` and
``Float``, and ``BaseArray`` is a supertype of all of the array types
in Godot (the generic ``Array`` as well as all of the strongly-typed
"Pool" array types).

Below ``AnyRef`` is ``Object``, the root of the Godot object
hierarchy. In the current implementation of GDLisp, ``AnyRef`` and
``Object`` are equivalent as types, but this may change in the future
if an alternative object hierarchy is added.

Below ``Object``, all of the class types available in Godot fit into
the hierarchy in the same way they do in GDScript. In particular,
user-defined classes can subclass ``Object``, ``Node``, ``Reference``,
or any of the other types freely.

Finally, ``Nothing`` is the unique bottom type of the hierarchy.
``Nothing`` is a subtype of *every* type, and there is no value which
is a member of the ``Nothing`` type. Note carefully: Not even the
special null value ``()`` is a member of the ``Nothing`` type;
``Nothing`` is uninhabited *by design*.


================================================
FILE: doc/readthedocs/reference/expressions.rst
================================================

Expressions
===========

Expressions are the forms that make up the body of functions and the
initial value of variables and constants. Expressions are the basic
unit of "work" in a GDLisp program.

Note that GDLisp is an expression-oriented language, which means that
there is no distinction between statements and expressions in GDLisp.
Even though we may colloquially refer to the ``if`` special form as an
"if statement", it is an expression like any other. This commitment to
expressions allows for better composability, as any expression can be
nested inside of any other.

There are several different types of expressions, all of which are
detailed below.

Atoms
-----

There are several S-expressions which compile natively to themselves.
These include the null object ``()``, integer literals, floating-point
literals, string literals, and the Boolean constants ``#t`` and
``#f``. Note that this explicitly does *not* include symbol literals,
which are evaluated differently. See :ref:`expr-variable-names` below.

.. _expr-variable-names:

Variable Names
--------------

A bare symbol appearing in expression context is treated as a variable
name. All variables in GDLisp are lexically-scoped. That is, any
variable is declared to be either scoped to the current module or to a
narrower scope, such as a ``let`` block or a function body. It is an
error to refer to a variable name that does not exist.

A bare symbol in expression context always refers to a name in the
value namespace. Variable names can be *shadowed*, which means that a
bare symbol always refers to the name in the *narrowest scope* for
which it is defined.

Note that bare symbols appearing in the code are subject to macro
expansion for :ref:`symbol macros <symbol-macros>`.

Function Calls
--------------

A proper, nonempty list will be interpreted in one of several ways,
depending on the value of the first term (or head) of the list. The
head of a function call can be one of three things. It can be a symbol
literal, a ``literally`` form, or an ``access-slot`` form.

Ordinary Calls
^^^^^^^^^^^^^^

An ordinary call is one whose head is a symbol literal. Ordinary calls
can resolve to one of several forms, depending on the value of the
head.

First, if the value of the head is the start of one of GDLisp's
:ref:`special forms <expr-special-forms>`, then the call is treated as
a special form, even if there is a function name in the current scope
which would shadow that special form. These special forms are baked
into the GDLisp compiler and are the primary bootstrapping tool on
which we build up syntax. There is no way to define new special forms
in GDLisp.

If the head is not the start of one of the special forms, then it must
be a valid name in the function namespace of the current lexical
scope. Like values, names in the function namespace are always
accessed starting from the innermost scope and falling back to outer
scopes, which makes names in the function namespace subject to
shadowing as well.

If the name refers to a macro, then :ref:`macro expansion <macros>`
occurs. If the name refers to an ordinary function, then the call
compiles to a runtime call to the function with the given name.

Literal Calls
^^^^^^^^^^^^^

A literal call is a call whose head is the form ``(literally name)``,
where ``name`` is an arbitrary symbol. ``literally`` calls are like
:ref:`literal forms <expr-literal-forms>`, except that they are
function calls rather than values. That is, a literal call always
expands to a call to the function with the given name in the current
scope in GDScript, without regard to whether or not that call is valid
or makes sense. ``literally`` calls never undergo macro expansion and
are never considered special forms.

.. Warning:: All of the same caveats that apply to literal forms apply
             to literal calls, and they should be used with caution.

Method Calls
^^^^^^^^^^^^

A method call is a call whose head is of the form ``(access-slot expr
name)``, where ``expr`` is an arbitrary expression and ``name`` is a
literal symbol. In cases where the operator precedence is not
ambiguous, these ``access-slot`` forms are usually written using the
``:`` notation as ``expr:name``. That is, to call the method named
``bar`` on an object called ``foo``, with three arguments, we would
write ``(foo:bar 1 2 3)``, which is syntax sugar for ``((access-slot
foo bar) 1 2 3)``.

The first argument to ``access-slot`` is an arbitrary expression, on
which the method will be called, and ``name`` will be :ref:`normalized
<name-normalization>` to the name of the method to call on the object.

GDLisp does *not* validate the name of the method or that it exists on
the object referred to by the expression.

If the first argument to ``access-slot`` is the literal name
``super``, then the method call is a :ref:`super call
<expr-super-calls>`.

.. _expr-super-calls:

Super Calls
"""""""""""

::

   (super:method-name args ...)

A method call where the left-hand side of the ``access-slot`` call is
the literal symbol ``super`` is a super call. A super call can only
occur in a context where the ``self`` name exists (i.e. inside of a
class body) and will call the method with the given name, using
``self`` as the target of the call, but only considering methods
defined in the superclass of the current class body.

Note that calls to a superclass' *constructor* are handled specially.
Specifically, they are *not* written as ``super:_init``, and in fact
they are not even expressions in the strictest sense of the word. A
call to a superclass' constructor is a special part of the ``_init``
definition syntax. For more details, see :ref:`constructor-functions`.

.. _expr-special-forms:

Special Forms
-------------

Special forms are elements of the GDLisp syntax that have special
meanings baked into the compiler. Special forms can be thought of as
similar to macros but more primitive, the building blocks on which
GDLisp syntax is constructed. There are 25 special forms in GDLisp.

``access-slot`` Forms
^^^^^^^^^^^^^^^^^^^^^

::

   expr:field
   (access-slot expr field)

The ``access-slot`` form, usually written using the infix ``:``
notation, accesses a field on an object. That is, ``expr`` is
evaluated, and then the slot with the name ``field`` (which must be a
symbol literal) is returned from the object referenced by the
expression.

The field name is not validated. That is, GDLisp makes no effort to
ensure that the name ``field`` is a field that exists on the type of
``expr``. There is one exception to this rule. If ``expr`` is the
literal name of an enumeration (a la ``defenum``) whose definition is
statically known, GDLisp will validate that the name ``field`` is
actually a defined enumeration constant on that type.

.. _expr-assert:

``assert`` Forms
^^^^^^^^^^^^^^^^

::

   (assert condition)
   (assert condition message)

The ``assert`` special form evaluates the condition and message as
expressions. If ``condition`` is true, then the code proceeds as
planned. If ``condition`` is false, then an error is generated, using
``message`` in the error message if provided.

``assert`` special forms are only used when the resulting Godot
runtime is in debug mode. In release mode, these forms will be
ignored, and their arguments will not even be evaluated. As such,
arguments which have side effects should generally not be given to
``assert``.

``break`` Forms
^^^^^^^^^^^^^^^

::

   (break)

``break`` is a special form that can only be used inside of loop
contexts. ``break`` exits the current loop and continues immediately
after the loop body.

``cond`` Forms
^^^^^^^^^^^^^^

::

    (cond clauses ...)

A ``cond`` form is the most basic form of conditional in GDLisp.
``cond`` takes zero or more clauses. Each clause's conditional portion
is evaluated in turn. If the conditional is true, then the clause's
body portion is evaluated and returned. Otherwise, the next clause
is tried. If all clauses are exhausted, then the null object ``()`` is
returned.

Each clause must be a proper list containing one or more elements. If
the list contains at least two elements, then the first element is the
conditional term and the rest form the body of the clause. The body is
treated as though it is inside a ``progn``, so the last expression
will be returned. If the list contains only one element, then that
element is *both* the condition and the body of the clause, and it
will only be evaluated once.

For example,

::

   (cond
     ((foo1) (bar1) (baz1))
     ((foo2) (bar2)))

This is a ``cond`` form consisting of two clauses. When this form is
evaluated, first, we will call the function ``foo1`` with no
arguments. If that function returns a truthy value, then we call
``bar1`` and then ``baz1``, using the latter as the result of the
whole ``cond`` form. If ``foo1`` returns a falsy value, then we try
``foo2``. If ``foo2`` evaluates to a truthy value, then ``bar2`` is
evaluated and its result is returned. Otherwise, ``()`` is returned as
a default value.

As an example of the one-argument clause form, consider

::

   (cond
     ((my-dict:get "x"))
     ((my-dict:get "y"))
     ((my-dict:get "z")))

Assuming ``my-dict`` is a dictionary object, this expression will
attempt to get the keys ``x``, ``y``, and then ``z`` from the
dictionary in order, returning the first one which exists and is
truthy. If none satisfy the condition, then ``()`` is returned as a
default value.

Note that if all you want is a simple if statement with a "true" and a
"false" case, then the :ref:`if macro <macro-if>` may be more
convenient for your use case.

.. Tip:: A common idiom is to make the condition of the last clause be
         the literal ``#t`` true object. This acts as a sort of "else"
         clause, triggering unconditionally if all of the other
         branches fail.

``continue`` Forms
^^^^^^^^^^^^^^^^^^

::

   (continue)

``continue`` is a special form that can only be used inside of loop
contexts. ``continue`` exits the current loop iteration and continues
the next iteration of the loop.

.. _expr-flet:

``flet`` Forms
^^^^^^^^^^^^^^

::

   (flet (clauses ...) body ...)

An ``flet`` form is similar to a ``let`` form except that it binds
functions in the function namespace, rather than arbitrary values in
the value namespace. Specifically, an ``flet`` form creates a new
local scope and defines zero or more functions in that local scope.
Then the body is executed in that scope and its final value returned.

Each function clause takes the following form.

::

   (name (args ...) body ...)

``name`` is a symbol literal indicating the name of the local
function, ``args`` is an :ref:`ordinary lambda list
<ordinary-lambda-lists>`, and ``body`` is the body of the function.
When the function called ``name`` is invoked inside of the ``flet``
form's body, the given arguments will be bound and the body will be
executed in a new lexical scope, cloned from the scope in which
``flet`` itself was defined.

Note that the bodies of the local functions are evaluated in a scope
cloned from the one in which the ``flet`` form was defined, not the
inner scope created by ``flet``. That is, the local function bodies
defined by an ``flet`` do not have access to each other's names or to
their own. For a version of ``flet`` that does have such access, see
:ref:`expr-labels`.

The bodies of ``flet`` local functions can create :ref:`closures
<expr-capture>`. ``flet`` creates a loop barrier between the enclosing
scope and the clauses of the ``flet`` form. This means that a
``break`` or ``continue`` expression inside of a clause of the
``flet`` cannot be used to control a loop that began outside of the
clauses. This constraint does not exist for the body of the ``flet``,
only the clauses.

``for`` Forms
^^^^^^^^^^^^^

::

   (for var iterable body ...)

A ``for`` form is the second of the two most basic looping constructs
in GDLisp. The first argument to ``for`` must be a literal symbol,
then the other arguments are arbitrary expressions. First,
``iterable`` is evaluated once, and it must evaluate to an array
(including pool arrays), string, or dictionary object. Then a new
lexical scope is created. Then ``body`` is run in that lexical scope,
once for each element of the iterable object. At each loop iteration,
the variable ``var`` is bound to the current value. ``for`` forms
always return the null object ``()``.

For arrays, a ``for`` form iterates over each element of the array.
For dictionaries, a ``for`` form iterates over each *key* of the
dictionary, consistent with Python's semantics for the same. For
strings, a ``for`` form iterates over each character (as a
single-character string) of the string.

A ``for`` loop defines a loop context for its body. This means that
``break`` and ``continue`` can be used in the body of a ``for`` loop.

.. Warning:: Note that the behavior is undefined if the result of
             ``iterable`` is not an array, dictionary, or string.
             Currently, ``for`` loops in GDLisp compile to ``for``
             loops in GDScript, which means some legacy GDScript
             behavior (such as iterating over numerical literals) may
             work, but this behavior may change in the future, so it
             is always recommended to explicitly call ``range`` if the
             intent is to iterate up to a number.

.. _expr-function:

``function`` Forms
^^^^^^^^^^^^^^^^^^

::

   #'name
   (function name)

The ``function`` special form is used to take a function that exists
in the function namespace and convert it into a first-class value. The
``function`` form is often abbreviated using the (equivalent) syntax
``#'name``.

The ``name`` argument must be a symbol, and it must be a valid name in
the function namespace of the current lexical scope. A function object
is created (as a value) which, when called, invoked the function with
the given name, forwarding all arguments.

The name can refer to a function defined at module scope or to a local
function defined in the current scope. In the latter case, the local
function will be kept alive (by reference semantics) until the
function object constructed by this ``function`` form is discarded.
That is, it is permitted to have a reference to a local function which
outlives the scope of that local function's binding.

``function`` *cannot* be used to create references to instance
methods. Explicit ``lambda`` expressions must be used to do so.

.. Warning:: The target name of a ``function`` form must be the name
             of a valid function. If the name refers to a macro, then
             the behavior is undefined.

.. _expr-labels:

``labels`` Forms
^^^^^^^^^^^^^^^^

::

   (labels (clauses ...) body ...)

``labels`` works nearly identically to ``flet`` and carries the exact
same syntax. However, whereas an ``flet`` form evaluates its local
function bodies in the enclosing scope of the ``flet`` block, a
``labels`` form evaluates its function bodies in the inner scope of
the ``labels`` block itself. This means that the functions defined in
a ``labels`` block have access to each other and to their own name,
allowing them to be recursive or mutually recursive.

The bodies of ``labels`` local functions can create :ref:`closures
<expr-capture>`. ``labels`` creates a loop barrier between the
enclosing scope and the clauses of the ``labels`` form. This means
that a ``break`` or ``continue`` expression inside of a clause of the
``labels`` cannot be used to control a loop that began outside of the
clauses. This constraint does not exist for the body of the
``labels``, only the clauses.

.. _expr-lambda:

``lambda`` Forms
^^^^^^^^^^^^^^^^

::

   (lambda (args ...) body ...)

A ``lambda`` form defines a local function without giving it a name.
The argument list ``args`` is an :ref:`ordinary lambda list
<ordinary-lambda-lists>`. A new function object is created, which
exists as a value (hence, can be assigned to variables in the value
namespace or passed as an argument to a function).

When the function created by this form is invoked, a new lexical scope
is created, which is cloned from the lexical scope in which the
``lambda`` was first defined. Then the arguments are bound and the
body is run, just like any other function.

The ``lambda`` body can create :ref:`closures <expr-capture>`.
``lambda`` creates a loop barrier between the enclosing scope and the
body of the ``lambda`` form. This means that a ``break`` or
``continue`` expression inside of the body of the ``lambda`` cannot be
used to control a loop that began outside of the body.

``let`` Forms
^^^^^^^^^^^^^

::

   (let (clauses ...) body ...)

``let`` is the most basic form of local variable binding in GDLisp. A
``let`` form creates a new lexical scope in which zero or more local
variables are bound, and then runs ``body`` in that local scope. The
value of the final expression of ``body`` is returned, or ``()`` if
``body`` is empty.

Each variable clause takes one of the following forms.

::

   var-name
   (var-name initial-value ...)

In the second (and most general) form, a variable clause takes the
form of a proper list whose first element is a literal symbol
indicating the name of the variable to declare. The remaining elements
are evaluated to determine the variable's initial value. Note
carefully: the ``initial-value`` expressions are evaluated in the
*outer* scope, not in the newly-created scope that the variable is
being declared in. This means that, in a ``let`` statement which
declares multiple variables, none of the variables have access to each
other during initialization, even those declared later in the same
block. The ``initial-value`` block is treated as a ``progn`` block, so
if the block is empty then ``()`` is used as the variable's initial
value.

A variable name ``var-name`` that appears on its own (that is, a
symbol literal *not* contained in a sublist) is treated as
``(var-name)`` and will initialize the variable to ``()``.

``let`` always binds in the value namespace. To bind in the function
in the function namespace, see :ref:`expr-flet` and
:ref:`expr-labels`.

.. _expr-literal-forms:

``literally`` Forms
^^^^^^^^^^^^^^^^^^^

::

   (literally variable-name)

A ``literally`` form is a backdoor through the GDLisp scoping system.
The sole argument to ``literally`` must be a symbol literal.
``(literally x)`` will be translated into the variable name ``x`` in
the resulting GDScript code. This will be done **without any
consideration** to whether or not ``x`` is a valid variable name.
GDLisp will not check that the name is defined, or what scope it is
defined in. GDLisp will merely assume that you know what you're doing
and pass the name through.

The name ``variable-name`` given to this form will undergo a partial
form of :ref:`name normalization <name-normalization>`. Specifically,
``variable-name`` will be escaped in the same way as an ordinary
variable name, with the exception that GDScript reserved words will
not be prefixed with an underscore.

Care must be taken when using ``literally``. Since GDLisp does not
perform any semantic analysis on the given name, it cannot guarantee
that the name is valid, or even syntactically makes sense in GDScript
in the case of keywords. Additionally, names referenced inside of
``literally`` will not have closures created for them if they occur
inside of a ``lambda`` or other closure-producing construct. This can
result in difficult-to-debug situations that GDLisp cannot handle.

The primary intended use case for ``literally`` is to port future
GDScript functions to GDLisp without having to wait on official
support from the GDLisp compiler. If a future iteration of Godot adds
a function called ``frobnicate`` to the global namespace, then you can
call that function by using the name ``(literally frobnicate)``, even
if the version of the GDLisp compiler you're using is not aware that
such a function exists.

``macrolet`` Forms
^^^^^^^^^^^^^^^^^^

::

   (macrolet (clauses ...) body ...)

A ``macrolet`` form is syntactically identical to an ``flet``.
However, whereas ``flet`` binds functions in the function namespace of
the current scope, ``macrolet`` binds *macros* in the same namespace.
The macros defined by a ``macrolet`` are only defined inside of the
``body`` scope. During that scope, those names are subject to macro
expansion.

``macrolet`` creates a loop barrier between the enclosing scope and
the clauses of the ``macrolet`` form. This means that a ``break`` or
``continue`` expression inside of a clause of the ``macrolet`` cannot
be used to control a loop that began outside of the clause. This
constraint does not exist for the body of the ``macrolet``.

.. Warning:: The clauses of a ``macrolet`` form **cannot** create
             closures. If a locally-defined macro depends on a local
             variable or function defined in an enclosing scope, then
             the behavior is undefined.

``new`` Forms
^^^^^^^^^^^^^

::

   (new Superclass body ...)
   (new (Superclass args ...) body ...)

The ``new`` form constructs a new local *anonymous* class. That is,
``new`` is to ``defclass`` as ``lambda`` is to ``defn``. The
newly-defined class is not given a name, and the only instances of
that class are those created by this particular ``new`` form.

When this form is evaluated, an instance of a subclass of
``Superclass`` is constructed. The body of this subclass shall be
``body``, which can consist of zero or more :ref:`class declarations
<classes>`, with the exception that it is illegal to define static
methods in an anonymous class. The constructor of this class shall be
invoked with ``args``, or with zero arguments if the non-parameterized
version of ``new`` is used.

The body of a ``new`` statement is capable of creating :ref:`closures
<expr-capture>`.

``new`` creates a loop barrier between the enclosing scope and the
body of the ``new`` form. This means that a ``break`` or ``continue``
expression inside of the body of the ``new`` cannot be used to control
a loop that began outside of the body.

.. Attention:: ``new`` is *not* a general-purpose constructor.
               Programmers used to Java or C# may be used to prefixing
               type names with ``new`` to construct ordinary instances
               of the type. That is not how object construction works
               in GDLisp. To construct ordinary instances of some
               class, call the method ``new`` on that class, such as
               ``(ClassName:new 1 2 3)``. The ``new`` special form is
               only intended to be used when behavior (such as
               instance variables or methods) is being added
               anonymously to the class for this instance alone.

.. _expr-preload:

``preload`` Forms
^^^^^^^^^^^^^^^^^

::

   (preload name)

``preload`` is a special form which takes a single string literal as
argument. The string literal must be the name of a file which can be
imported, using the Godot ``res://`` notation. ``preload`` works like
the built-in function ``load`` but performs the act of loading at
compile-time. It is an error if the pathname does not point to a file.

.. Tip:: In GDLisp, most ``preload`` calls should be replaced with
         ``use`` directives. See :ref:`imports` for details.
         ``preload`` can be used in situations (such as macro
         expansion) where the name being loaded may not be known at
         definition time but will be known before compilation is
         complete.

.. _expr-progn:

``progn`` Forms
^^^^^^^^^^^^^^^

::

   (progn args ...)

A ``progn`` form evaluates each of its arguments in order and returns
the final argument. ``progn`` is a useful way to insert multiple
expressions which have side effects in a context, such as the
right-hand side of a ``defvar``, that only accepts one expression.

An empty ``progn`` silently returns ``()``, the null object.

.. Note:: ``progn`` can also be used in declaration (or class
          declaration) context. See :ref:`progn` for details.

``quasiquote`` Forms
^^^^^^^^^^^^^^^^^^^^

::

   `s-expression
   (quasiquote s-expression)

A ``quasiquote`` form refuses to evaluate its argument and returns the
S-expression representing it, similar to ``quote``. However,
``unquote`` and ``unquote-spliced`` have special meaning inside of
``quasiquote`` forms. See :ref:`quoting` for more details.

``quote`` Forms
^^^^^^^^^^^^^^^

::

   's-expression
   (quote s-expression)

A ``quote`` form refuses to evaluate its argument and returns the
S-expression representing it verbatim. See :ref:`quoting` for more
details. Note that a ``quote`` form is usually written abbreviated as
``'s-expression``.

``return`` Forms
^^^^^^^^^^^^^^^^

::

   (return expr)

Evaluates the expression and then returns that expression immediately
from the enclosing function or instance method.

.. _expr-set:

``set`` Forms
^^^^^^^^^^^^^

::

   (set variable value)

``set`` is the basic form of variable and name assignment in GDLisp.
It can do several different things, depending on the nature of the
``variable`` portion of the form.

Variable Assignment
"""""""""""""""""""

If ``variable`` is a literal symbol, then it is interpreted as a
variable name in the value namespace. The variable pointed to by that
name is assigned a new value, namely the result of evaluating
``value``. The variable must be mutable, or a compile error will be
issued.

The value that was assigned is returned from the ``set`` form.

Field Assignment
""""""""""""""""

If ``variable`` is of the form ``(access-slot object target)``, where
``object`` is an arbitrary expression and ``target`` is a literal
symbol, then the assignment will modify an instance field on the
instance to which ``object`` evaluates. The field's name shall be
``target``, after :ref:`name normalization <name-normalization>`. This
can trigger :ref:`setter functions <getter-and-setter>`.

The value that was assigned is returned from the ``set`` form. It is
unspecified whether this will invoke a getter function on the class,
if one exists.

Delegated Assignment
""""""""""""""""""""

If ``variable`` is a proper list of the form ``(head args ...)`` where
``head`` is a literal symbol that is *not* ``access-slot``, then the
assignment is a delegated assignment. The form

::

   (set (some-function args ...) value)

will compile into the function call

::

   (set-some-function value args ...)

That is, a ``set`` on a function call will compile to a call to the
function whose name is the former function with ``set-`` prepended to
it. The right-hand side of the assignment will be the first argument
passed to the delegated function. The return value of the function is
returned from the ``set`` form, so by convention a function intended
to be used in this way should return the assigned value.

``symbol-macrolet`` Forms
^^^^^^^^^^^^^^^^^^^^^^^^^

::

   (symbol-macrolet (clauses ...) body ...)

A ``symbol-macrolet`` clause binds local macros, just like
``macrolet``, but the former binds *symbol* macros, which are subject
to macro expansion when a literal symbol is used.

Each clause is of the form

::

   (name value)

Both parts are mandatory. ``name`` is the name of the symbol macro
(which will be bound in the value namespace). ``value`` is the
expression which should be run to evaluate the macro.

``symbol-macrolet`` creates a loop barrier between the enclosing scope
and the clauses of the ``symbol-macrolet`` form. This means that a
``break`` or ``continue`` expression inside of a clause of the
``symbol-macrolet`` cannot be used to control a loop that began
outside of the clause. This constraint does not exist for the body of
the ``symbol-macrolet``.

.. Warning:: Like ``macrolet``, the clauses of a ``symbol-macrolet``
             **cannot** create closures. It is undefined behavior to
             write a local symbol macro that depends on a local
             variable or function defined in an enclosing scope.

``unquote`` Forms
^^^^^^^^^^^^^^^^^

::

   ,expr
   (unquote expr)

An ``unquote`` form can only be used inside of a ``quasiquote`` form.
It is an error for this special form to appear in an expression
context.

``unquote-spliced`` Forms
^^^^^^^^^^^^^^^^^^^^^^^^^

::

   ,.expr
   (unquote-spliced expr)

An ``unquote-spliced`` form can only be used inside of a
``quasiquote`` form. It is an error for this special form to appear in
an expression context.

``while`` Forms
^^^^^^^^^^^^^^^

::

   (while condition body ...)
   (while condition)

A ``while`` form is one of the two most basic forms of looping in
GDLisp. A ``while`` form takes a condition and then zero or more
expressions forming a body as arguments. The ``while`` loop iterates
zero or more times. At each iteration, the loop runs the condition
first. If the condition is falsy, then the loop exits immediately.
Otherwise, the body runs, and then the loop starts over.

A ``while`` loop always returns the null object ``()``. It is possible
to have a ``while`` loop where the body is empty, in which case, the
condition is evaluated multiple times until it returns a falsy value.
This can be used to emulate the "do ... while" construct seen in some
programming languages, where the condition is evaluated at the end of
the body, rather than the beginning. That is, to emulate such a
construct in GDLisp, consider

::

   (while (progn
     body ...
     condition))

A ``while`` loop defines a loop context, for both its condition and
its body. This means that ``break`` and ``continue`` can be used in
either the condition or the body.

.. _expr-yield:

``yield`` Forms
^^^^^^^^^^^^^^^

::

   (yield)
   (yield object signal)

The ``yield`` special form behaves similarly to the GDScript function
of the same name. Called with zero arguments, ``yield`` halts the
current function and returns a function state object from the
function. That function state object has a ``:resume`` method which
will return to the halted function at the same point it was yielded
from.

If ``yield`` is called with two arguments, then both arguments are
evaluated. The first is treated as an object and the second shall
evaluate to a string which is the name of a signal on the given
object. The function still halts and returns a state object, just as
if ``yield`` was called with no arguments. However, if the given
object ``object`` ever fires the signal called ``signal``, then the
function resumes automatically, without an explicit call to
``:resume``.

It is an error to call ``yield`` with exactly one argument.

Note that ``yield`` is a special form, not a function, despite it
evaluating its arguments in applicative order. Functions in GDLisp
must satisfy `η-reduction
<https://en.wikipedia.org/wiki/Lambda_calculus#%CE%B7-reduction>`_.
That is, in order for ``yield`` to be a function, it would have to be
the case that ``yield`` and ``(lambda (&rest args) (apply #'yield
args))`` are equivalent functions. This is not true for ``yield``,
since the former, when called, will halt the current function, whereas
the latter will halt an inner function and return a (somewhat useless)
function state object that resumes at the end of the inner function.

.. _expr-capture:

Closures and Name Capture
-------------------------

Several special forms create *closures*. A closure is a nested scope
that can outlive its containing scope. We call the variables which are
placed inside a closure for such forms *captures*. This is perfectly
acceptable. If a variable is defined in a local scope and then
captured by a ``lambda`` or other special form, then that variable
will remain in existence for as long as the ``lambda`` object exists.

Function objects always have ``Reference`` semantics, which means that
a function object (created with ``lambda`` or ``function``) will be
freed when the last reference to it is freed. This ensures that
closures created in this way are freed promptly. Custom objects
created with ``new`` will follow the semantics of their superclass
eventual (``Reference`` subclasses will have reference semantics,
while ``Object`` and ``Node`` subclasses will have to be freed
explicitly), so some care must be taken in those situations to prevent
a memory leak.

A closure is a read-write binding to a variable name. That means that
the values in a closure are captured by *reference*, not by value. If
the inside of a closure (such as a ``lambda``) modifies a captured
variable, then the enclosing scope (and, by extension, any other
closure that captured the same variable) will be able to see that
change.

For example, this lambda will return one number higher each time it's
called.

::

   (let ((accum 0)) (lambda () (set accum (+ 1 accum))))

We can call this function, for example, as follows.

::

   (defn create-counter ()
     (let ((accum 0))
       (lambda () (set accum (+ 1 accum)))))

   (defn _ready ()
     (let ((counter (create-counter)))
       (print (funcall counter))   ; Prints 1
       (print (funcall counter))   ; Prints 2
       (print (funcall counter)))) ; Prints 3

The variable ``accum`` is captured by the ``lambda`` *by reference*,
so when we modify the variable, that modification is reflected in
future calls to the ``lambda``, since there is truly only one copy of
that variable.

Forms that define local macros can never capture local variables or
functions from an enclosing scope.


================================================
FILE: doc/readthedocs/reference/imports.rst
================================================

.. _imports:

Import Directives
=================

GDLisp uses the special ``use`` directive to import names and
resources from other files. Although it is technically possible to
import resources in the GDScript way (by defining constants whose
values are ``preload`` calls), it is not recommended.

There are three different forms to the ``use`` directive, all of which
begin with the symbol ``use``, followed by the path name as a literal
string.

::

  ;; Qualified import
  (use "res://filename.lisp" as alias-name)

  ;; Open import
  (use "res://filename.lisp" open)

  ;; Explicit import
  (use "res://filename.lisp" (...))

The path name is always a string and follows the same rules as Godot
paths. See `File system
<https://docs.godotengine.org/en/stable/tutorials/scripting/filesystem.html>`_
for details.

Importing names involves adding names (in either of the value or
function namespaces) to the module's lexical scope. Names added by a
``use`` directive are always imported as ``private``, and hence cannot
be transitively imported into other modules through the current one.

Qualified Imports
-----------------

::

  (use "res://filename.lisp")
  (use "res://filename.lisp" as alias-name)

A qualified import takes the form of either the ``use`` symbol
followed by the path name and nothing else, or the ``use`` symbol
followed by ``as`` and then followed by the desired alias name. If the
alias name is not provided, then the default alias shall be the name
of the file, without the path or the file extension. So the import
``"res://foo/bar/baz.lisp`` would have a default alias name of
``foo/bar/baz``. Remember that forward slashes are valid in
identifiers in GDLisp.

Every public identifier in the target module will be imported into the
current scope, in the appropriate namespace. The name in the current
scope shall be the import's alias name, followed by a forward slash,
followed by the identifier's name in the source module. As an example,
suppose the module ``MyModule.lisp`` defines a public function called
``get-name``. Then the directive ``(use "res://MyModule.lisp" as
MySpecialModule)`` would import that function into the current scope
as ``MySpecialModule/get-name``.

Non-GDLisp Imports
^^^^^^^^^^^^^^^^^^

The ``use`` directive is used for both importing other GDLisp files,
as well as for importing GDScript files, scenes, textures, and
essentially anything you would use ``preload`` for in GDScript.
However, the GDLisp compiler can only parse other GDLisp files, so any
non-GDLisp file must be imported using the qualified import, not an
explicit or open import. This restriction may be loosened in the
future.

In the case of a non-GDLisp file, the alias name itself is introduced
into the module's lexical scope in the value namespace. In the case of
a GDScript file, the name refers to the top-level class defined in
that file. In the case of other resources, the name refers to the
resource itself.

Open Imports
------------

::

   (use "res://filename.lisp" open)

An open import is similar to a qualified import except without the
qualifier. An open import introduces all of the public names from the
target module into the current scope, keeping their names identical to
the original names from the source module.

Explicit Imports
----------------

::

  (use "res://filename.lisp" (...))

An explicit import does *not* import all of the public names into the
current scope. Instead, it imports only the names specified. Each
element of the list that follows the pathname identifies a single name
to be imported. The most general form for these elements is

::

   (source-name namespace as destination-name)

where ``source-name`` and ``destination-name`` are arbitrary
identifiers, and ``namespace`` is one of ``value`` or ``function``.
This imports the name ``source-name`` from the given namespace into
the current module scope (in the same namespace), giving it the name
``destination-name``.

The ``as destination-name`` portion may be omitted and, if left out,
will be assumed to be the same as the ``source-name``. The
``namespace`` may also be omitted if unambiguous. If the namespace is
omitted, then it will be inferred from the available names in the
source module. If there is *both* a function and a value with that
name in the source module, then an error will be issued. Finally, if
both the alias name and the namespace are omitted, then the symbol for
the name must be passed on its own, not inside of a sublist. In
summary, the four possible forms of a named import are

::

   (source-name namespace as destination-name)
   (source-name namespace) ;; destination-name implied to be source-name
   (source-name as destination-name) ;; namespace is inferred from context
   source-name ;; namespace is inferred, and destination-name is implied to be source-name


================================================
FILE: doc/readthedocs/reference/index.rst
================================================

.. _comprehensive:

Reference Documentation
=======================

.. toctree::
   :maxdepth: 2
   :caption: Contents:

   parser.rst
   datatypes.rst
   source-file.rst
   lambda-lists.rst
   macros.rst
   classes.rst
   imports.rst
   expressions.rst
   quoting.rst
   command-line.rst
   standard-library/index.rst


================================================
FILE: doc/readthedocs/reference/lambda-lists.rst
================================================

Lambda Lists
============

Functions, macros, and constructors in GDLisp take arguments. As part
of their declaration syntax, any of these declarations must declare
the collection of *formal arguments* that they take. These formal
arguments take the form of a *lambda list*, which is a special
sub-language that communicates what arguments are permitted to the
GDLisp compiler.

Broadly speaking, a lambda list is a list of symbols indicating
variable names to bind arguments to. As part of this list of symbols,
special directives beginning with an ampersand ``&`` can change the
behavior of the following arguments, such as making required arguments
optional.

Note that a name beginning with an ampersand in a lambda list is
*always* treated as a special directive. It is an error to use a
special directive that does not exist, or to use a directive in a
context that disallows it. As a consequence, it is not possible to
declare arguments in a lambda list whose names begin with an
ampersand. It is generally not recommended to declare variable names
beginning with an ampersand at all for this reason.

It is an error to list the same name twice in a lambda list. Likewise,
it is an error to list the same special directive twice, unless
otherwise stated.

A special directive generally only lasts until the next special
directive. Unless otherwise stated, directives do not "stack".

There are different types of lambda lists, depending on the context in
which it appears.

.. _simple-lambda-lists:

Simple Lambda Lists
-------------------

The simplest kind of lambda list is called, fittingly, a *simple
lambda list*. A simple lambda list is a collection of zero or more
required arguments, with no special directives or alternative forms
allowed. That is, a simple lambda list is always a simple list of
literal symbols.

Simple lambda lists are used in the declaration of class functions and
signals, which do not support more advanced argument parsing.

Examples::

  ()
  (arg1 arg2)
  (foo bar baz)

.. _ordinary-lambda-lists:

Ordinary Lambda Lists
---------------------

Ordinary lambda lists are the most common kind of lambda list in
GDLisp, used for module-level functions and macros, as well as lambda
expressions.

An ordinary lambda list is a list of symbol names of arguments. An
ordinary lambda list accepts several special directives. All special
directives are optional. If multiple directives are provided, then
``&opt`` must be the first of them, and only one of ``&rest`` or
``&arr`` can be provided.

* Any arguments that appear before any directives are treated as
  *required parameters*. It is an error to call a function or macro
  with fewer arguments than the number of required parameters in its
  lambda list.

* Any arguments that appear after the ``&opt`` directive are optional
  parameters. If too few arguments are provided and the rest of the
  parameters are optional, then any optional parameters that have not
  been bound receive a default value of ``()``, the null object.

* If the ``&rest`` directive is used, it must be followed by a single
  name, which indicates the name of the function's "rest" argument.
  After binding any required and optional arguments, all remaining
  arguments to the function are collected into a list and passed as
  the function's "rest" argument. If there are no extra arguments,
  then the empty list ``()`` is passed. Note that it is impossible to
  call a function which declares a ``&rest`` argument with "too many"
  arguments, as all extras will be collected into one variable.

* The ``&arr`` directive works similarly to ``&rest``. It must be
  followed by a single name. All remaining arguments, after binding
  required and optional arguments, will be collected and passed at the
  "arr" argument, but in this case they will be collected into an
  array rather than a list.

Examples::

  ()
  (arg1 arg2)
  (required-arg1 required-arg2 &opt optional-arg1 optional-arg2)
  (&rest all-args)
  (&arr all-args-as-array)
  (required-arg &opt optional-arg &rest all-remaining-args)

.. _constructor-lambda-lists:

Constructor Lambda Lists
------------------------

A constructor lambda list is a lambda list used to indicate the
arguments to a class' ``_init`` constructor. A constructor lambda list
is similar to a simple lambda list but allows for one additional
feature.

A constructor lambda list consists of a list of arguments. Each
argument can be a symbol, similar to a simple lambda list. However,
arguments can also take the special form ``@name`` (or, written
literally, ``(access-slot self name)``), where ``name`` is any valid
symbol identifier. An argument of this form will *not* be bound to a
local variable when the constructor is called. Instead, the value
passed for that argument will be bound to the instance variable with
the given name on ``self``. If no such instance variable exists, then
an error will be issued at runtime.

This allows a very compact representation of classes whose
constructors merely initialize fields.

.. code-block::

   (defclass Enemy (Node)
     (defvars name attack-points defense-points)
     (defn _init (@name @attack-points @defense-points)))

Examples::

  (foo bar)
  (x y z)
  (@x @y @z)
  (some-ordinary-arg @some-instance-var)


================================================
FILE: doc/readthedocs/reference/macros.rst
================================================

.. _macros:

Macros
======

Macros are the key feature that separates a Lisp dialect from many
conventional programming languages. A macro is a mechanism to
dynamically generate code during compilation.

Macros are subdivided into two categories in GDLisp: functional macros
and symbol macros. Functional macros are far more common, so this
documentation will often refer to them simply as "macros" with the
"functional" part understood.

A (functional) macro declaration looks similar to a function
declaration, except that the former uses ``defmacro`` rather than
``defn``.

.. code-block::

   (defmacro macro-name (args ...)
      body ...)
   (defmacro macro-name (args ...) public-or-private
      body ...)

A macro's argument list takes the form of a :ref:`ordinary lambda list
<ordinary-lambda-lists>`, which means that macros can take optional
and variable arguments.

When a macro declaration is encountered, all names that it references,
either directly or indirectly, must always be fully defined. That is,
while two functions can mutually depend on each other, regardless of
the order in which they're defined in a file, a macro cannot depend on
a function or constant defined *later* in the current file.

Macros are defined immediately, and are available to the compiler. The
name of the macro is bound, in the function namespace, to the given
macro object for the current module. A macro is a function-like object
that is invoked during compilation.

Specifically, whenever the compiler is expecting a declaration or an
expression and encounters a proper, nonempty list ``(foo args ...)``,
it will first check whether it is aware of a macro defined in the
current scope with the name ``foo``. This process is referred to as
*macro expansion*.

If there is a macro with that name, then rather than interpreting the
code as an expression or declaration, the macro will be invoked with
the given arguments. Note carefully that the macro's arguments are
passed in *unevaluated*. That is, if there is a macro called
``example`` and it is called as ``(example arg)``, then the literal
symbol ``arg`` will be passed in, *not* the value of a variable called
``arg``. Likewise, if it is called as ``(example (+ 1 1))``, then the
literal three-element list ``(+ 1 1)`` will be passed in, not the
number ``2``.

A macro must return an S-expression, which will replace the macro call
in the current position of the code. If a macro is called in
declaration context, then the result of the macro call will be treated
as a declaration. If a macro is called in expression context, then the
result of the macro call will be treated as an expression.

The result of a macro call is itself subject to macro expansion. A
macro call can return an S-expression which itself calls another
macro, or even the same macro recursively. The behavior is undefined
if a macro exhibits infinitely recursive behavior. That is, the
following macro will exhibit undefined behavior if it is ever invoked.

::

  (defmacro recursive ()
    '(recursive))

.. _symbol-macros:

Symbol Macros
-------------

.. code-block::

   (define-symbol-macro macro-name value)
   (define-symbol-macro macro-name value public-or-private)

The second kind of macro is a symbol macro. Symbol macros work like
functional macros except that they occupy the value namespace, not the
function namespace.

When a symbol macro is declared, it binds a name in the value
namespace of the current module. Note that symbol macros cannot take
arguments. The same caveats with regards to definedness apply for
symbol macros: all names referenced (directly or indirectly) by a
symbol macro must be fully available at compile-time, when the symbol
macro is first defined.

Macro expansion for symbol macros occurs when a symbol literal ``foo``
is evaluated in declaration or expression context. In this case,
before compiling the symbol literally, GDLisp checks whether a symbol
macro with the given name exists in the current scope. If it does,
then that symbol macro's body is evaluated in a new lexical scope, and
the return value of the symbol macro is used in place of the symbol
literal. Like functional macros, symbol macros can expand recursively
into other macro calls.

Note that the "body" of a symbol macro is a single expression, not a
collection of zero or more expressions. Symbol macros are designed to
have the same syntax as ``defconst``. To write a symbol macro whose
body consists of multiple statements, wrap the body in the ``progn``
special form.

Technical Limitations
---------------------

Macros can reference other GDLisp source files freely. However, due to
technical limitations, macros cannot currently interface directly with
GDScript source files or other resource types (such as packed scenes
or textures). This limitation may be lifted in the future.

Additionally, care must be taken if files are dynamically loaded via
the ``load`` function. GDLisp performs name mangling during macro
expansion in order to consistently load macros into the runtime. The
GDLisp compiler understands ``use`` directives and ``preload`` calls
(both of which must refer to a statically-known filename) and will
translate these names accordingly, but GDLisp will not attempt to
translate the argument to a ``load`` function. The built-in macro
``contextual-load`` can be helpful to perform such dynamic loading
inside of macros.


================================================
FILE: doc/readthedocs/reference/parser.rst
================================================

.. _parser:

The GDLisp Parser
=================

The GDLisp language is a Lisp dialect, with a few extensions to make
object-oriented programming using Godot types more straightforward.

Listed below is a full description of the GDLisp grammar using
`Extended Backup-Naur form
<https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form>`_.

GDLisp source code is always written in UTF-8. GDLisp supports the
full breadth of Unicode code points, so unless otherwise stated,
"character" refers to a valid Unicode character.

.. code-block:: ebnf

   prefixed-expr = [ prefix ], expr ;
   prefix = "'" | "#'" | "`" | "," | ",." ;
   expr = literal | list-expr | array-expr |
          dict-expr | vector-expr |
          nested-name | nested-node-path |
          self-name | self-node-path ;
   literal = "#t" | "#f" | integer | float | string | symbol ;
   list-expr = "(", ")" | "(", prefixed-expr, {prefixed-expr}, ["." prefixed-expr], ")" ;
   array-expr = "[", {prefixed-expr}, "]" ;
   dict-expr = "{", {prefixed-expr, prefixed-expr}, "}" ;
   vector-expr = "V{", prefixed-expr, prefixed-expr, [prefixed-expr], "}" ;
   nested-name = expr, ":", symbol ;
   nested-node-path = expr, ":", node-path ;
   self-name = "@", symbol ;
   self-node-path = node-path ;
   integer = ? integer literal ? ;
   float = ? floating point literal ? ;
   string = ? string literal ? ;
   symbol = ? symbol literal ? ;
   node-path = ? node path literal ? ;

GDLisp code, like any other Lisp dialect, is built up of zero or more
`S-expressions <https://en.wikipedia.org/wiki/S-expression>`_, where
an S-expression is defined to be an (optionally prefixed) form of any
of the following.

* A literal expression
* A list
* An array
* A dictionary
* A (2D or 3D) vector
* A nested name or node path
* A self name or node path

Unless otherwise stated, an arbitrary amount of whitespace is allowed
between adjacent tokens in the above EBNF grammar. "Whitespace" is,
here, defined as any Unicode character with the ``White_Space=yes``
property.

Literals
--------

.. code-block:: ebnf

   literal = "#t" | "#f" | integer | float | string | symbol ;
   integer = ? integer literal ? ;
   float = ? floating point literal ? ;
   string = ? string literal ? ;
   symbol = ? symbol literal ? ;
   node-path = ? node path literal ? ;

Literals in GDLisp are integers, floating point values, strings,
symbols, or node path literals.

Integer Literals
^^^^^^^^^^^^^^^^

An integer literal consists of an optional sign (``+`` or ``-``)
followed by one or more ASCII digits (``0`` to ``9``). The following
are valid integer literals: ``0``, ``+56``, ``-9``, ``10000``,
``00900``. Leading zeroes in an integer literal are ignored. Unlike in
C, the presence of a leading zero does *not* cause the subsequent
number to be interpreted as ASCII.

Floating Point Literals
^^^^^^^^^^^^^^^^^^^^^^^

A floating point literal is an expression which matches the following
regular expression

.. code-block:: text

   [+-]?[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?

and is *not* a valid integer literal.

String Literals
^^^^^^^^^^^^^^^

A string literal is a sequence of zero or more characters enclosed in
quotation marks ``"``. Inside the quotation marks is a sequence of
individual string characters, where each individual character is one
of

* Any Unicode character other than a backslash ``\`` or a quotation
  mark ``"``.
* A valid escape sequence beginning in a backslash ``\``.

Escape Sequences
""""""""""""""""

An escape sequence in GDLisp begins with a backslash and consists of
one or more characters indicating what character the sequence should
be translated to in the resulting code. GDLisp supports most of the
commonly-used escape sequences found in C-style languages.

* ``\n`` translates to a newline (``0x0A``)
* ``\t`` translates to a horizontal tab (``0x09``)
* ``\r`` translates to a carriage return (``0x0D``)
* ``\a`` translates to the 'alert' character (``0x07``)
* ``\b`` translates to the backspace character (``0x08``)
* ``\f`` translates to a form feed (``0x0C``)
* ``\v`` translates to a vertical tab (``0x0B``)
* ``\"`` translates to a literal quotation mark (``0x22``)
* ``\'`` translates to a literal apostrophe (``0x27``)
* ``\\`` translates to a literal backslash (``0x5C``)

Finally, a backslash followed by a ``u`` is a Unicode literal. Unicode
literals can be represented in two forms: basic and extended.

A basic Unicode literal consists of ``\u`` followed by exactly four
valid hexadecimal characters. The four characters are interpreted as a
number in base 16 and must point to a valid Unicode code point. Note
that there are characters outside of the basic multilingual plane
(such as emoji) that cannot be represented in this way. For such
characters, the extended form is provided.

An extended Unicode literal consists of ``\u`` followed by a
curly-brace-enclosed list of at least one hexadecimal character. The
characters in the list are interpreted as a number in base 16 and must
point to a valid Unicode code point.

A backslash followed by any other character in a string literal is an
error.

Symbol Literals
^^^^^^^^^^^^^^^

Symbols are the cornerstone of a Lisp program and are used as variable
and function names. These are, generally speaking, the valid
identifiers in a Lisp program.

.. code-block:: ebnf

   symbol = starting-char, { following-char }, { qualifier } ;
   qualifier = ".", following-char, { following-char } ;

A symbol consists of a starting character, followed by zero or more
following characters, then subsequently followed by zero or more
qualifiers. A qualifier consists of a dot followed by one or more
following characters.

The starting character of a symbol literal can be any of the following.

* An ASCII letter
* Any of the following: ``_~+=-\/!%^&*<>?``
* Any non-ASCII character which falls into the Unicode categories L,
  Mn, Nl, No, S, Pc, Pd, or Po.

A "following" character can be any starting character, a valid ASCII
number, or any non-ASCII character in the Unicode category N.

The following are examples of valid identifiers in GDLisp: ``foo``,
``bar``, ``satisfies?``, ``set-element``, ``list/map``,
``com.mercerenies.gdlisp``.

.. Note:: Unlike in some Lisp dialects, symbols in GDLisp are **case
          sensitive**. That is, ``foo`` and ``Foo`` are distinct
          symbols that refer to distinct variables or functions.

Node Path Literals
^^^^^^^^^^^^^^^^^^

A node path literal is the primary means of accessing nodes in the
scene tree whose names are known at compile-time. A node path literal
consists of a dollar sign ``$`` followed by either a quoted string
literal or a sequence of one or more of the following:
* An ASCII letter or number
* Any of the following: ``_~+=-\/!$%^&*<>?``

Note that only ASCII characters are allowed in the non-quoted node
path form. To include Unicode characters in a node path, it is
necessary to quote the path.

Lists
-----

.. code-block:: ebnf

   list-expr = "(", ")" | "(", prefixed-expr, {prefixed-expr}, ["." prefixed-expr], ")" ;

In GDLisp, the fundamental unit of composition is a *cons cell*,
sometimes called a *pair*. A cons cell consists of two elements,
conventionally referred to as the *car* and the *cdr*, separated by a
dot and enclosed in parentheses.

.. code-block:: text

  (a . b)

By convention, lists are built up as a singly-linked list, using cons
cells as the links. The car of each is the first element, or "head",
of the list, and the cdr of each is the rest of the list, or "tail".
The end of the list is denoted with the special "null" atom,
indicating by a pair of parentheses with nothing in between.

This convention is so widely used in Lisp programs that the syntax
supports it directly. That is, a sequence of of one or more
S-expressions, followed by the dotted end of the list, is interpreted
as a list whose final cdr is the rightmost term. Concretely, the
following are equivalent.

.. code-block:: text

  (a b c . d)
  (a . (b . (c . d)))

Similarly, if the dotted terminator is left off, it is assumed to be
the special ``()`` null object, so the following are equivalent.

.. code-block:: text

  (a b c d)
  (a . (b . (c . d . ())))

An S-expression can be viewed as a *dotted list*, consisting of a
leading list of values (in the ``car`` portion of cons cells)
terminated by an arbitrary non-cons value as the final ``cdr``. For
instance, the S-expression ``(a b c . d)`` (or, equivalently, ``(a .
(b . (c . d)))`` would be viewed as a dotted list consisting of the
elements ``a``, ``b``, and ``c``, terminated by ``d``.

We call a dotted list which is terminated by the ``()`` null object a
*proper list*. All lists appearing unquoted in GDLisp source code must
be proper lists.

Arrays
------

.. code-block:: ebnf

   array-expr = "[", {prefixed-expr}, "]" ;

Like in GDScript, a GDLisp array is a general-purpose random-access
data structure. Array literals are written as a proper list whose
first element is the symbol ``array``. For convenience, zero or more
expressions wrapped in square brackets will desugar to this syntax.
Note that, unlike in GDScript, elements in an array literal are *not*
separated by commas.

Examples:

.. code-block:: text

    [] ==> (array)
    [1 2 3 4] ==> (array 1 2 3 4)

Dictionaries
------------

.. code-block:: ebnf

   dict-expr = "{", {prefixed-expr, prefixed-expr}, "}" ;

A dictionary expression is a collection of an even number of
expressions, enclosed in curly braces. Like array literals, dictionary
literals are not a new form of syntax but are instead mere sugar for
something that can be expressed with only basic S-expressions. The
first element of each pair of expressions is a key and the second is a
value in the resulting dictionary. It is an error to have a
brace-enclosed collection of an *odd* number of expressions. A
dictionary literal desugars to a proper list whose first element is
the symbol ``dict``.

Examples:

.. code-block:: text

    {} ==> (dict)
    {1 2 3 4} ==> (dict 1 2 3 4)


Vectors
-------

.. code-block:: ebnf

   vector-expr = "V{", prefixed-expr, prefixed-expr, [prefixed-expr], "}" ;

Vectors are used in Godot to represent objects in 2D or 3D space. A
vector in GDLisp is constructed using the ``vector`` built-in
function. Since vectors are so ubiquitous, the syntax ``V{ ... }`` is
provided, which desugars to a call to the ``vector`` function with the
given arguments.

Nested Names
------------

.. code-block:: ebnf

   nested-name = expr, ":", symbol ;
   nested-node-path = expr, ":", node-path ;
   self-name = "@", symbol ;
   self-node-path = node-path ;

Godot is built on an single-inheritance, messaging-passing
object-oriented paradigm. This means that it's very common to call a
function *on* an object, not just an independent function that exists
in the abstract.

In GDLisp, the equivalent to the GDScript "dot" operator is the
``access-slot`` built-in special form. That is, ``foo.bar`` in
GDScript would be translated to the GDLisp ``(access-slot foo bar)``.
This is relatively awkward and verbose to write all the time, so
several shortcuts are provided. These are purely syntax sugar and are
*not* new data structures in the abstract syntax tree of the
language.

The following translations are made.

1. ``foo:bar``, with a literal colon in the middle, is translated to
   ``(access-slot foo bar)``. The left-hand side can be any
   (non-prefixed) expression, and the right-hand side must be a symbol
   literal. Note that a prefix in front of the left-hand side will be
   parsed at a lower precedence than the ``:``, so ``'a:b`` will be
   parsed as ``(quote (access-slot a b))``, not ``(access-slot
   (quote a) b)``. If the precedence is not to your liking, then you
   can always write out the S-expressions by hand rather than using
   the syntax sugar, and sometimes this is necessary in complex macro
   expansions.

2. ``foo:$bar`` translates to a function call equivalent to
   ``(foo:get-node "bar")``. Written in full generality, this is
   ``((access-slot foo get-node) "bar")``. Internally, the *actual*
   expression calls a GDLisp built-in function that allows for better
   optimization potential, but the effect is the same as long as your
   custom nodes do not override ``get-node``. The right-hand side must
   be a node path literal, either quoted or unquoted.

3. ``@bar`` translates to ``(access-slot self bar)``, or equivalently
   ``self:bar``.

4. A node path literal on its own ``$bar`` translates to a function
   call equivalent to ``((access-slot self get-node) "bar")``. As with
   the nested form, ``@$bar`` does not *literally* translate to the
   latter, instead factoring through a GDLisp middleman for
   optimization purposes.

Prefixes
--------

.. code-block:: ebnf

   prefixed-expr = [ prefix ], expr ;
   prefix = "'" | "#'" | "`" | "," | ",." ;

Expressions, in general, can have a single prefix applied to them.
Each prefix is mere syntax sugar for some slightly more complicated
S-expression form. The semantics of these forms are explained in
futu
Download .txt
gitextract_8xnoo2xc/

├── .github/
│   └── workflows/
│       ├── style-clippy.yml
│       ├── style-docs.yml
│       ├── test-Godotv3.3.3-Ubuntu.yml
│       ├── test-Godotv3.4-Ubuntu.yml
│       ├── test-Godotv3.5-Minimal-Ubuntu.yml
│       ├── test-Godotv3.5-Mono-Ubuntu.yml
│       └── test-Godotv3.5-Ubuntu.yml
├── .gitignore
├── .readthedocs.yaml
├── COPYING
├── Cargo.toml
├── GDLisp.lisp
├── MacroServer/
│   ├── TestLoadedFile.gd
│   ├── main.gd
│   ├── main.tscn
│   └── project.godot
├── README.md
├── Rakefile
├── build.rs
├── doc/
│   ├── README.md
│   ├── internal/
│   │   ├── CompilationStages.md
│   │   └── README.md
│   └── readthedocs/
│       ├── Makefile
│       ├── conf.py
│       ├── index.rst
│       ├── make.bat
│       ├── reference/
│       │   ├── classes.rst
│       │   ├── command-line.rst
│       │   ├── datatypes.rst
│       │   ├── expressions.rst
│       │   ├── imports.rst
│       │   ├── index.rst
│       │   ├── lambda-lists.rst
│       │   ├── macros.rst
│       │   ├── parser.rst
│       │   ├── quoting.rst
│       │   ├── source-file.rst
│       │   └── standard-library/
│       │       ├── functions.rst
│       │       ├── index.rst
│       │       ├── macros.rst
│       │       ├── types.rst
│       │       └── values.rst
│       ├── requirements.txt
│       └── tutorial/
│           ├── classes.rst
│           ├── control-flow.rst
│           ├── index.rst
│           ├── lisping.rst
│           ├── macros.rst
│           ├── modules.rst
│           └── what-now.rst
├── minimal.txt
├── src/
│   ├── command_line.rs
│   ├── compile/
│   │   ├── args.rs
│   │   ├── body/
│   │   │   ├── builder.rs
│   │   │   ├── class_initializer.rs
│   │   │   ├── class_scope.rs
│   │   │   ├── mod.rs
│   │   │   ├── super_proxy.rs
│   │   │   └── synthetic_field.rs
│   │   ├── constant.rs
│   │   ├── error.rs
│   │   ├── factory.rs
│   │   ├── frame.rs
│   │   ├── import.rs
│   │   ├── mod.rs
│   │   ├── names/
│   │   │   ├── contextual.rs
│   │   │   ├── fresh.rs
│   │   │   ├── generator.rs
│   │   │   ├── mod.rs
│   │   │   ├── registered.rs
│   │   │   └── reserved.rs
│   │   ├── preload_resolver.rs
│   │   ├── resource_type.rs
│   │   ├── special_form/
│   │   │   ├── closure.rs
│   │   │   ├── flet.rs
│   │   │   ├── lambda.rs
│   │   │   ├── lambda_class.rs
│   │   │   ├── lambda_vararg/
│   │   │   │   ├── builder.rs
│   │   │   │   └── mod.rs
│   │   │   ├── let_block.rs
│   │   │   └── mod.rs
│   │   ├── stateful.rs
│   │   ├── stmt_wrapper.rs
│   │   └── symbol_table/
│   │       ├── call_magic/
│   │       │   ├── mod.rs
│   │       │   └── table.rs
│   │       ├── function_call.rs
│   │       ├── inner.rs
│   │       ├── local_var.rs
│   │       └── mod.rs
│   ├── gdscript/
│   │   ├── arglist.rs
│   │   ├── class_extends.rs
│   │   ├── decl.rs
│   │   ├── expr.rs
│   │   ├── expr_wrapper.rs
│   │   ├── inner_class.rs
│   │   ├── library/
│   │   │   ├── cell.rs
│   │   │   ├── class_loader.rs
│   │   │   ├── constant_loader.rs
│   │   │   ├── gdnative/
│   │   │   │   ├── api_type.rs
│   │   │   │   ├── argument.rs
│   │   │   │   ├── class.rs
│   │   │   │   ├── gdnative_enum.rs
│   │   │   │   ├── method.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── property.rs
│   │   │   │   └── signal.rs
│   │   │   ├── magic.rs
│   │   │   └── mod.rs
│   │   ├── literal.rs
│   │   ├── metadata.rs
│   │   ├── mod.rs
│   │   ├── op.rs
│   │   ├── pattern.rs
│   │   ├── spacing.rs
│   │   └── stmt.rs
│   ├── graph/
│   │   ├── mod.rs
│   │   ├── tarjan.rs
│   │   └── top_sort.rs
│   ├── ir/
│   │   ├── access_type.rs
│   │   ├── arglist/
│   │   │   ├── constructor.rs
│   │   │   ├── error.rs
│   │   │   ├── general.rs
│   │   │   ├── mod.rs
│   │   │   ├── ordinary.rs
│   │   │   ├── parser.rs
│   │   │   ├── simple.rs
│   │   │   └── vararg.rs
│   │   ├── bootstrapping.rs
│   │   ├── call_name.rs
│   │   ├── classification.rs
│   │   ├── closure_names.rs
│   │   ├── decl.rs
│   │   ├── declaration_table.rs
│   │   ├── depends.rs
│   │   ├── export.rs
│   │   ├── expr.rs
│   │   ├── identifier.rs
│   │   ├── import.rs
│   │   ├── incremental.rs
│   │   ├── literal.rs
│   │   ├── loops/
│   │   │   ├── error.rs
│   │   │   └── mod.rs
│   │   ├── macros.rs
│   │   ├── main_function.rs
│   │   ├── mod.rs
│   │   ├── modifier/
│   │   │   ├── class.rs
│   │   │   ├── constant.rs
│   │   │   ├── declare.rs
│   │   │   ├── enums.rs
│   │   │   ├── file.rs
│   │   │   ├── function.rs
│   │   │   ├── instance_method.rs
│   │   │   ├── macros.rs
│   │   │   ├── magic.rs
│   │   │   ├── mod.rs
│   │   │   ├── var.rs
│   │   │   └── visibility.rs
│   │   ├── quasiquote.rs
│   │   ├── scope/
│   │   │   ├── decl.rs
│   │   │   ├── error.rs
│   │   │   ├── mod.rs
│   │   │   └── name_table/
│   │   │       ├── builder.rs
│   │   │       └── mod.rs
│   │   ├── special_form/
│   │   │   ├── access_slot.rs
│   │   │   ├── assignment.rs
│   │   │   ├── local_binding.rs
│   │   │   └── mod.rs
│   │   └── special_ref.rs
│   ├── lib.rs
│   ├── main.rs
│   ├── optimize/
│   │   ├── gdscript/
│   │   │   ├── assignment.rs
│   │   │   ├── basic_math_ops.rs
│   │   │   ├── constant.rs
│   │   │   ├── constant_conditional_branch.rs
│   │   │   ├── dead_code_elimination.rs
│   │   │   ├── dead_decl_elimination.rs
│   │   │   ├── dead_var_elimination.rs
│   │   │   ├── direct_var_substitute.rs
│   │   │   ├── else_then_if_fold.rs
│   │   │   ├── expr_walker.rs
│   │   │   ├── mod.rs
│   │   │   ├── noop.rs
│   │   │   ├── redundant_assignment_elimination.rs
│   │   │   ├── stmt_walker.rs
│   │   │   ├── ternary_if_fold.rs
│   │   │   └── variables.rs
│   │   ├── ir/
│   │   │   ├── expr_walker.rs
│   │   │   └── mod.rs
│   │   └── mod.rs
│   ├── parser.lalrpop
│   ├── parser_test.rs
│   ├── pipeline/
│   │   ├── can_load.rs
│   │   ├── config.rs
│   │   ├── error.rs
│   │   ├── loader.rs
│   │   ├── mod.rs
│   │   ├── resolver.rs
│   │   ├── source.rs
│   │   ├── stdlib_unit.rs
│   │   └── translation_unit.rs
│   ├── repl.rs
│   ├── runner/
│   │   ├── godot.rs
│   │   ├── into_gd_file.rs
│   │   ├── macro_server/
│   │   │   ├── command.rs
│   │   │   ├── lazy.rs
│   │   │   ├── mod.rs
│   │   │   ├── named_file_server.rs
│   │   │   └── response.rs
│   │   ├── mod.rs
│   │   ├── named_file.rs
│   │   ├── path.rs
│   │   └── version.rs
│   ├── sxp/
│   │   ├── ast.rs
│   │   ├── dotted.rs
│   │   ├── literal.rs
│   │   ├── mod.rs
│   │   ├── reify/
│   │   │   ├── mod.rs
│   │   │   └── pretty.rs
│   │   ├── string.rs
│   │   └── syntax.rs
│   └── util/
│       ├── debug_wrapper.rs
│       ├── group_by.rs
│       ├── lattice.rs
│       ├── lazy.rs
│       ├── mod.rs
│       ├── one.rs
│       ├── prefix_matcher.rs
│       └── recursive.rs
└── tests/
    ├── integration_tests.rs
    └── test/
        ├── builtin_function_test.rs
        ├── class_test.rs
        ├── collection_conversion_test.rs
        ├── common/
        │   ├── import.rs
        │   └── mod.rs
        ├── concurrency_test.rs
        ├── cond_if_test.rs
        ├── const_test.rs
        ├── declaration_test.rs
        ├── dependencies_test.rs
        ├── dictionary_test.rs
        ├── enum_test.rs
        ├── error_test.rs
        ├── even_odd_test.rs
        ├── factorial_test.rs
        ├── flet_test.rs
        ├── floating_test.rs
        ├── for_test.rs
        ├── import_test.rs
        ├── labels_test.rs
        ├── lambda_class_test.rs
        ├── lambda_test.rs
        ├── lazy_val_test.rs
        ├── let_var_test.rs
        ├── list_operator_test.rs
        ├── macro_test.rs
        ├── meta_test.rs
        ├── mod.rs
        ├── name_translation_test.rs
        ├── object_test.rs
        ├── operator_test.rs
        ├── quoting_test.rs
        ├── signal_test.rs
        ├── simple_expr_test.rs
        ├── string_test.rs
        ├── type_checking_test.rs
        ├── typecast_test.rs
        └── while_test.rs
Download .txt
Showing preview only (247K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2924 symbols across 210 files)

FILE: build.rs
  function main (line 20) | fn main() {

FILE: src/command_line.rs
  constant PROGRAM_DESCRIPTION (line 26) | const PROGRAM_DESCRIPTION: &str =
  type CommandLineArgs (line 36) | pub struct CommandLineArgs {
    method new (line 55) | pub fn new() -> CommandLineArgs {
    method help (line 61) | pub fn help() -> CommandLineArgs {
  function options (line 71) | pub fn options() -> Options {
  function parse_args (line 88) | pub fn parse_args(args: &[String]) -> CommandLineArgs {
  function show_help_message (line 107) | pub fn show_help_message(program: &str) {

FILE: src/compile/args.rs
  type Expecting (line 49) | pub struct Expecting {
    constant NONE (line 107) | pub const NONE: Expecting = Expecting { minimum: 0, maximum: 0 };
    method new (line 111) | pub fn new(minimum: usize, maximum: usize) -> Expecting {
    method between (line 116) | pub fn between(minimum: usize, maximum: usize) -> Expecting {
    method exactly (line 121) | pub fn exactly(value: usize) -> Expecting {
    method at_least (line 126) | pub fn at_least(minimum: usize) -> Expecting {
    method at_most (line 131) | pub fn at_most(maximum: usize) -> Expecting {
    method contains (line 137) | pub fn contains(&self, args_count: usize) -> bool {
    method validate_amount (line 144) | pub fn validate_amount(&self, name: &str, pos: SourceOffset, args_coun...
    method validate (line 155) | pub fn validate<T>(&self, name: &str, pos: SourceOffset, slice: &[T]) ...
    method fmt (line 230) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type ExpectedShape (line 60) | pub enum ExpectedShape {
    method extract_symbol (line 165) | pub fn extract_symbol(form_name: &str, ast: AST) -> Result<String, GDE...
    method extract_string (line 175) | pub fn extract_string(form_name: &str, ast: AST) -> Result<String, GDE...
    method extract_i32 (line 185) | pub fn extract_i32(form_name: &str, ast: AST) -> Result<i32, GDError> {
    method validate_empty (line 200) | pub fn validate_empty(form_name: &str, lst: &[&AST], pos: SourceOffset...
    method validate_end_of_list (line 216) | pub fn validate_end_of_list(form_name: &str, lst: &[&AST], pos: Source...
    method fmt (line 246) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  function zero (line 273) | pub fn zero<T>(args: Vec<T>) {
  function one (line 282) | pub fn one<T>(mut args: Vec<T>) -> T {
  function two (line 292) | pub fn two<T>(mut args: Vec<T>) -> (T, T) {
  function three (line 304) | pub fn three<T>(mut args: Vec<T>) -> (T, T, T) {

FILE: src/compile/body/builder.rs
  type CodeBuilder (line 26) | pub struct CodeBuilder {
    method new (line 71) | pub fn new(extends: ClassExtends) -> CodeBuilder {
    method named (line 85) | pub fn named(&mut self, name: String) {
    method extends (line 90) | pub fn extends(&mut self, extends: ClassExtends) {
    method build (line 95) | pub fn build(self) -> decl::TopLevelClass {
  type StmtBuilder (line 39) | pub struct StmtBuilder {
    method new (line 110) | pub fn new() -> StmtBuilder {
    method append (line 115) | pub fn append(&mut self, stmt: Stmt) {
    method append_all (line 120) | pub fn append_all(&mut self, stmts: &mut dyn Iterator<Item=Stmt>) {
    method add_helper (line 128) | pub fn add_helper(&mut self, decl: Decl) {
    method build (line 138) | pub fn build(self) -> (Vec<Stmt>, Vec<Decl>) {
    method build_into (line 150) | pub fn build_into(self, other: &mut impl HasDecls) -> Vec<Stmt> {
  type HasDecls (line 50) | pub trait HasDecls {
    method add_decl (line 53) | fn add_decl(&mut self, decl: Decl);
    method add_decls (line 56) | fn add_decls(&mut self, decls: impl IntoIterator<Item=Decl>) {
    method add_decl (line 102) | fn add_decl(&mut self, decl: Decl) {
    method add_decl (line 161) | fn add_decl(&mut self, decl: Decl) {

FILE: src/compile/body/class_initializer.rs
  type ClassBuilder (line 44) | pub struct ClassBuilder {
    method new (line 94) | pub fn new() -> ClassBuilder {
    method builder_for (line 100) | pub fn builder_for(&mut self, init_time: InitTime) -> &mut StmtBuilder {
    method declare_getter_for (line 113) | pub fn declare_getter_for(&mut self, field_name: String) -> Option<Str...
    method declare_setter_for (line 135) | pub fn declare_setter_for(&mut self, field_name: String) -> Option<Str...
    method declare_super_proxy (line 154) | pub fn declare_super_proxy(&mut self, gen: &mut FreshNameGenerator, su...
    method declare_proxies_from_scope (line 163) | pub fn declare_proxies_from_scope(&mut self, scope: DirectClassScope) {
    method fill_out_synthetic_fields (line 173) | pub fn fill_out_synthetic_fields(&mut self, decl: &mut ClassDecl, pos:...
    method implied_getter (line 192) | fn implied_getter(field_name: &str, method_name: &str, pos: SourceOffs...
    method implied_setter (line 203) | fn implied_setter(field_name: &str, method_name: &str, pos: SourceOffs...
    method build (line 216) | pub fn build(self) -> (ClassInit, Vec<Decl>) {
    method build_into (line 241) | pub fn build_into(self, other: &mut impl HasDecls) -> ClassInit {
  type ClassInit (line 67) | pub struct ClassInit {
    method apply (line 275) | pub fn apply(mut self, class: &mut ClassDecl, pos: SourceOffset) -> Re...
    method apply_proxy_fields (line 307) | fn apply_proxy_fields(fields: Vec<SyntheticField>, class: &mut ClassDe...
    method all_var_decls (line 323) | fn all_var_decls(class: &ClassDecl) -> HashMap<String, SourceOffset> {
    method find_initializer (line 336) | pub fn find_initializer(decls: &mut Vec<Decl>) -> &mut InitFnDecl {
    method empty_initializer (line 345) | fn empty_initializer() -> Decl {
    method find_ready (line 356) | pub fn find_ready(decls: &mut Vec<Decl>) -> &mut FnDecl {
    method empty_ready (line 365) | fn empty_ready() -> Decl {
  type InitTime (line 81) | pub enum InitTime {
  method add_decl (line 253) | fn add_decl(&mut self, decl: Decl) {
  method default (line 263) | fn default() -> InitTime {

FILE: src/compile/body/class_scope.rs
  type OutsideOfClass (line 35) | pub struct OutsideOfClass;
  type ClassScopeMut (line 39) | pub struct ClassScopeMut<'a>(pub &'a mut dyn ClassScope);
  type DirectClassScope (line 46) | pub struct DirectClassScope {
    method new (line 82) | pub fn new() -> DirectClassScope {
    method into_proxies (line 88) | pub fn into_proxies(self) -> Vec<SuperProxy> {
    method add_proxy (line 93) | pub fn add_proxy(&mut self, proxy: SuperProxy) {
  type ClosedClassScope (line 54) | pub struct ClosedClassScope<'a>(pub &'a mut DirectClassScope);
  type ClassScope (line 59) | pub trait ClassScope {
    method super_call (line 64) | fn super_call(&mut self,
    method closure_mut (line 74) | fn closure_mut(&mut self) -> Box<dyn ClassScope + '_>;
    method super_call (line 101) | fn super_call(&mut self,
    method closure_mut (line 112) | fn closure_mut(&mut self) -> Box<dyn ClassScope + '_> {
    method super_call (line 120) | fn super_call(&mut self,
    method closure_mut (line 131) | fn closure_mut(&mut self) -> Box<dyn ClassScope + '_> {
    method super_call (line 141) | fn super_call(&mut self,
    method closure_mut (line 151) | fn closure_mut(&mut self) -> Box<dyn ClassScope + '_> {
    method super_call (line 160) | fn super_call(&mut self,
    method closure_mut (line 175) | fn closure_mut(&mut self) -> Box<dyn ClassScope + '_> {

FILE: src/compile/body/super_proxy.rs
  type SuperProxy (line 34) | pub struct SuperProxy {
    constant PROXY_NAME (line 50) | pub const PROXY_NAME: &'static str = "__gdlisp_super";
    method generate (line 56) | pub fn generate(gen: &mut FreshNameGenerator, super_name: String, args...
  method from (line 66) | fn from(proxy: SuperProxy) -> FnDecl {

FILE: src/compile/body/synthetic_field.rs
  type SyntheticField (line 29) | pub struct SyntheticField {
    method new (line 57) | pub fn new() -> SyntheticField {
    method into_field (line 64) | pub fn into_field(self) -> VarDecl {
  type Getter (line 41) | pub struct Getter {
    method new (line 76) | pub fn new(name: String, body: Vec<Stmt>) -> Getter {
    method method_name (line 83) | pub fn method_name(field_name: &str) -> String {
  type Setter (line 49) | pub struct Setter {
    method new (line 92) | pub fn new(name: String, argument_name: String, body: Vec<Stmt>) -> Se...
    method method_name (line 99) | pub fn method_name(field_name: &str) -> String {
  method from (line 107) | fn from(getter: Getter) -> FnDecl {
  method from (line 119) | fn from(setter: Setter) -> FnDecl {

FILE: src/compile/constant.rs
  constant CONSTANT_GDSCRIPT_FUNCTIONS (line 40) | pub const CONSTANT_GDSCRIPT_FUNCTIONS: phf::Set<&'static str> = phf_set! {
  function validate_all_constant_scopes (line 47) | pub fn validate_all_constant_scopes(decls: &[Decl], table: &SymbolTable)...
  function validate_constant_names_in_class (line 77) | fn validate_constant_names_in_class(inner_decls: &[ClassInnerDecl], tabl...
  function is_const_expr (line 102) | pub fn is_const_expr(expr: &IRExpr, table: &SymbolTable) -> bool {
  function validate_const_expr (line 106) | pub fn validate_const_expr(name: &str, expr: &IRExpr, table: &SymbolTabl...
  function validate_const_var_name (line 227) | fn validate_const_var_name(name: &str, var_name: &str, table: &SymbolTab...
  function validate_const_call (line 237) | fn validate_const_call(name: &str, object: &CallTarget, function_name: &...
  function validate_scoped_const_call (line 259) | fn validate_scoped_const_call(name: &str, function_name: &str, arg_count...
  function is_name_of_enum (line 280) | fn is_name_of_enum(lhs: &IRExpr, table: &SymbolTable) -> bool {
  function non_constant_error (line 294) | fn non_constant_error<T>(name: &str, pos: SourceOffset) -> Result<T, GDE...

FILE: src/compile/error.rs
  type GDErrorF (line 48) | pub enum GDErrorF {
    method error_number (line 324) | pub fn error_number(&self) -> u32 {
    method is_internal (line 416) | pub fn is_internal(&self) -> bool {
    method fmt (line 433) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method from (line 629) | fn from(_: sxp::dotted::TryFromDottedExprError) -> GDErrorF {
    method from (line 641) | fn from(err: ArgListParseError) -> GDErrorF {
    method from (line 654) | fn from(err: ImportDeclParseError) -> GDErrorF {
    method from (line 660) | fn from(err: ImportNameResolutionError) -> GDErrorF {
    method from (line 673) | fn from(err: VarNameIntoExtendsError) -> GDErrorF {
    method from (line 679) | fn from(err: response::Failure) -> GDErrorF {
    method from (line 685) | fn from(err: ModifierParseError) -> GDErrorF {
  type GDError (line 284) | pub struct GDError {
    method new (line 294) | pub fn new(value: GDErrorF, pos: SourceOffset) -> GDError {
    method from_value (line 300) | pub fn from_value<T>(value: T, pos: SourceOffset) -> GDError
    method error_number (line 307) | pub fn error_number(&self) -> u32 {
    method is_internal (line 313) | pub fn is_internal(&self) -> bool {
    method fmt (line 586) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method from (line 635) | fn from(err: sxp::dotted::TryFromDottedExprError) -> GDError {
    method from (line 647) | fn from(err: ArgListParseError) -> GDError {
    method from (line 691) | fn from(err: ModifierParseError) -> GDError {
    method from (line 698) | fn from(err: DuplicateMainClassError) -> GDError {
    method from (line 704) | fn from(err: ScopeError<ClassNamespace>) -> GDError {
    method from (line 715) | fn from(err: ScopeError<Namespace>) -> GDError {
    method from (line 723) | fn from(e: DependencyError) -> GDError {
    method from (line 737) | fn from(err: LoopPrimitiveError) -> GDError {
  constant INTERNAL_ERROR_NOTE (line 289) | const INTERNAL_ERROR_NOTE: &str = "Note: Unless you're doing something r...
  method source (line 593) | fn source(&self) -> Option<&(dyn Error + 'static)> {
  type Item (line 616) | type Item = GDErrorF;
  method get_source (line 618) | fn get_source(&self) -> SourceOffset {
  method get_value (line 622) | fn get_value(&self) -> &GDErrorF {

FILE: src/compile/factory.rs
  type IRLiteral (line 46) | type IRLiteral = ir::literal::Literal;
  type IRExpr (line 47) | type IRExpr = ir::expr::Expr;
  type IRArgList (line 48) | type IRArgList = ir::arglist::ordinary::ArgList;
  type DeclaredFnWithInit (line 51) | struct DeclaredFnWithInit {
  function declare_var (line 60) | pub fn declare_var(gen: &mut impl NameGenerator,
  function flatten_class_into_main (line 81) | pub fn flatten_class_into_main(import_table: &ImportTable, builder: &mut...
  function transform_extends_path_for_main (line 90) | fn transform_extends_path_for_main(import_table: &ImportTable, extends: ...
  function declare_function (line 109) | pub fn declare_function(frame: &mut CompilerFrame<impl HasDecls>,
  function declare_function_with_init (line 120) | fn declare_function_with_init(frame: &mut CompilerFrame<impl HasDecls>,
  function declare_class (line 173) | pub fn declare_class(frame: &mut CompilerFrame<impl HasDecls>,
  function declare_constructor (line 260) | pub fn declare_constructor(frame: &mut CompilerFrame<impl HasDecls>,
  function make_instance_var_initializer (line 321) | fn make_instance_var_initializer(instance_var_name: &str, local_var_name...
  function compile_literal (line 332) | pub fn compile_literal(literal: &IRLiteral, pos: SourceOffset) -> Expr {

FILE: src/compile/frame.rs
  type IRExpr (line 57) | type IRExpr = ir::expr::Expr;
  type IRExprF (line 58) | type IRExprF = ir::expr::ExprF;
  type IRDecl (line 59) | type IRDecl = ir::decl::Decl;
  type IRDeclF (line 60) | type IRDeclF = ir::decl::DeclF;
  type IRArgList (line 61) | type IRArgList = ir::arglist::ordinary::ArgList;
  constant MAX_QUOTE_REIFY_DEPTH (line 69) | pub const MAX_QUOTE_REIFY_DEPTH: u32 = 4;
  type CompilerFrame (line 95) | pub struct CompilerFrame<'a, 'b, 'c, 'd, 'e, B> {
  function new (line 131) | pub fn new(compiler: &'a mut Compiler,
  function name_generator (line 141) | pub fn name_generator(&mut self) -> &mut FreshNameGenerator {
  function preload_resolver (line 146) | pub fn preload_resolver(&self) -> &dyn PreloadResolver {
  function with_builder (line 154) | pub fn with_builder<B1, R, F>(&mut self, new_builder: &mut B1, block: F)...
  function compile_simple_expr (line 170) | pub fn compile_simple_expr(&mut self,
  function with_local_builder_value (line 202) | pub fn with_local_builder_value<R, F>(&mut self, block: F) -> (R, Vec<St...
  function with_local_builder_result (line 215) | pub fn with_local_builder_result<R, F>(&mut self, block: F) -> Result<(R...
  function with_local_builder (line 226) | pub fn with_local_builder<F>(&mut self, block: F) -> Result<Vec<Stmt>, G...
  function with_local_builder_ok (line 237) | pub fn with_local_builder_ok<F>(&mut self, block: F) -> Vec<Stmt>
  function compile_toplevel (line 247) | pub fn compile_toplevel(&mut self, toplevel: &ir::decl::TopLevel) -> Res...
  function compile_decls (line 260) | pub fn compile_decls(&mut self, decls: &[IRDecl]) -> Result<(), GDError> {
  function compile_decl (line 280) | pub fn compile_decl(&mut self, decl: &IRDecl) -> Result<(), GDError> {
  function compile_stmts (line 373) | pub fn compile_stmts(&mut self,
  function compile_stmt (line 400) | pub fn compile_stmt(&mut self,
  function compile_expr (line 411) | pub fn compile_expr(&mut self,
  function compile_bare_name (line 557) | fn compile_bare_name(&mut self,
  function compile_function_call (line 573) | fn compile_function_call(&mut self,
  function compile_ordinary_function_call (line 623) | pub fn compile_ordinary_function_call(&mut self,
  function compile_special_ref (line 647) | pub fn compile_special_ref(&mut self, special_ref: SpecialRef, pos: Sour...
  function compile_assignment (line 678) | fn compile_assignment(&mut self,
  method get_symbol_table (line 718) | fn get_symbol_table(&self) -> &SymbolTable {
  method get_symbol_table_mut (line 722) | fn get_symbol_table_mut(&mut self) -> &mut SymbolTable {

FILE: src/compile/import.rs
  type ImportTable (line 27) | pub struct ImportTable {
    method new (line 34) | pub fn new() -> ImportTable {
    method get (line 39) | pub fn get(&self, name: &str) -> Option<&str> {
    method set (line 45) | pub fn set(&mut self, name: String, value: String) {
    method del (line 50) | pub fn del(&mut self, name: &str) {
    method into_hashmap (line 55) | pub fn into_hashmap(self) -> HashMap<String, String> {

FILE: src/compile/mod.rs
  type IRDecl (line 71) | type IRDecl = ir::decl::Decl;
  type IRDeclF (line 72) | type IRDeclF = ir::decl::DeclF;
  type IRExpr (line 73) | type IRExpr = ir::expr::Expr;
  type IRExprF (line 74) | type IRExprF = ir::expr::ExprF;
  type IRArgList (line 75) | type IRArgList = ir::arglist::ordinary::ArgList;
  type Compiler (line 77) | pub struct Compiler {
    method new (line 89) | pub fn new(gen: FreshNameGenerator, resolver: Box<dyn PreloadResolver>...
    method nil_expr (line 95) | pub fn nil_expr(pos: SourceOffset) -> StExpr {
    method name_generator (line 99) | pub fn name_generator(&mut self) -> &mut FreshNameGenerator {
    method preload_resolver (line 103) | pub fn preload_resolver(&self) -> &dyn PreloadResolver {
    method import_path_table (line 107) | pub fn import_path_table(&self) -> &ImportTable {
    method is_minimalist (line 111) | pub fn is_minimalist(&self) -> bool {
    method frame (line 115) | pub fn frame<'a, 'b, 'c, 'd, 'e, B>(&'a mut self,
    method compile_export (line 124) | fn compile_export(&mut self,
    method compile_class_inner_decl (line 143) | pub fn compile_class_inner_decl(&mut self,
    method compile_inner_var_value (line 257) | fn compile_inner_var_value(name: &str,
    method resolve_extends (line 300) | pub fn resolve_extends(table: &SymbolTable, extends: &str, pos: Source...
    method bind_decl (line 309) | fn bind_decl(magic_table: &MagicTable,
    method make_preload_line (line 437) | fn make_preload_line(&self, var: String, path: &RPathBuf, pos: SourceO...
    method get_preload_resolved_path (line 445) | fn get_preload_resolved_path(&self, path: &RPathBuf, pos: SourceOffset...
    method make_preload_expr (line 456) | pub fn make_preload_expr(&self, path: &RPathBuf, pos: SourceOffset) ->...
    method import_name (line 472) | fn import_name(&mut self, import: &ImportDecl) -> String {
    method translate_call (line 480) | pub fn translate_call(import_name: String, mut call: function_call::Fn...
    method resolve_import (line 487) | pub fn resolve_import(&mut self,
  function int (line 575) | fn int(n: i32) -> AST {
  function nil (line 579) | fn nil() -> AST {
  function cons (line 584) | fn cons(a: AST, b: AST) -> AST {
  function list (line 588) | fn list(data: Vec<AST>) -> AST {
  function e (line 592) | fn e(expr: ExprF) -> Expr {
  function s (line 596) | fn s(stmt: StmtF) -> Stmt {
  function bind_helper_symbols (line 600) | fn bind_helper_symbols(table: &mut SymbolTable) {
  function compile_stmt (line 609) | fn compile_stmt(ast: &AST) -> Result<(Vec<Stmt>, Vec<Decl>), PError> {
  function compile_var (line 633) | fn compile_var() {
  function compile_call (line 642) | fn compile_call() {
  function compile_int (line 651) | fn compile_int() {
  function compile_bool_t (line 660) | fn compile_bool_t() {
  function compile_bool_f (line 669) | fn compile_bool_f() {
  function compile_string (line 678) | fn compile_string() {
  function compile_progn_vacuous (line 687) | fn compile_progn_vacuous() {
  function compile_progn_stateful (line 696) | fn compile_progn_stateful() {
  function compile_nil (line 708) | fn compile_nil() {

FILE: src/compile/names/contextual.rs
  type ContextualNameGenerator (line 39) | pub struct ContextualNameGenerator<'a> {
  function new (line 47) | pub fn new(context: &SymbolTable, namespace: Namespace) -> ContextualNam...
  function is_name_in_use (line 51) | fn is_name_in_use(&self, name: &str) -> bool {
  method generate_with (line 62) | fn generate_with(&mut self, prefix: &str) -> String {
  function empty_generate (line 79) | fn empty_generate() {
  function contextual_generate (line 88) | fn contextual_generate() {

FILE: src/compile/names/fresh.rs
  type FreshNameGenerator (line 34) | pub struct FreshNameGenerator {
    method new (line 55) | pub fn new(reserved: Vec<&str>) -> FreshNameGenerator {
    method to_json (line 66) | pub fn to_json(&self) -> JsonValue {
    method from_json (line 79) | pub fn from_json(value: &JsonValue) -> Result<Self, ParseError> {
  type ParseError (line 46) | pub enum ParseError {
  method generate_with (line 109) | fn generate_with(&mut self, prefix: &str) -> String {
  function empty_generate (line 128) | fn empty_generate() {
  function unrelated_generate (line 136) | fn unrelated_generate() {
  function conflicting_generate (line 144) | fn conflicting_generate() {
  function custom_prefix (line 152) | fn custom_prefix() {
  function through_json (line 160) | fn through_json() {

FILE: src/compile/names/generator.rs
  type NameGenerator (line 23) | pub trait NameGenerator {
    method generate_with (line 26) | fn generate_with(&mut self, prefix: &str) -> String;
    method generate (line 31) | fn generate(&mut self) -> String {
  constant DEFAULT_PREFIX (line 39) | pub const DEFAULT_PREFIX: &str = "_G";

FILE: src/compile/names/mod.rs
  constant TRANSLATIONS (line 34) | const TRANSLATIONS: phf::Map<char, &'static str> = phf_map! {
  type NameTrans (line 59) | pub struct NameTrans {
  function is_valid_gd_char (line 72) | pub fn is_valid_gd_char(ch: char) -> bool {
  function lisp_to_gd (line 136) | pub fn lisp_to_gd(name: &str) -> String {
  function lisp_to_gd_bare (line 157) | pub fn lisp_to_gd_bare(name: &str) -> String {
  function special_cases (line 199) | fn special_cases() {
  function translations (line 206) | fn translations() {
  function starts_with_number (line 227) | fn starts_with_number() {
  function keywords (line 233) | fn keywords() {
  function special_cases_bare (line 242) | fn special_cases_bare() {
  function translations_bare (line 249) | fn translations_bare() {
  function keywords_bare (line 256) | fn keywords_bare() {
  function translations_unicode (line 265) | fn translations_unicode() {

FILE: src/compile/names/registered.rs
  type RegisteredNameGenerator (line 36) | pub struct RegisteredNameGenerator<'a> {
  function new_fn (line 45) | pub fn new_fn(context: &mut SymbolTable) -> RegisteredNameGenerator<'_> {
  function new_local_var (line 54) | pub fn new_local_var(context: &mut SymbolTable) -> RegisteredNameGenerat...
  function new_global_var (line 63) | pub fn new_global_var(context: &mut SymbolTable) -> RegisteredNameGenera...
  function register_name (line 71) | fn register_name(&mut self, name: String) {
  method generate_with (line 82) | fn generate_with(&mut self, prefix: &str) -> String {

FILE: src/compile/names/reserved.rs
  constant GDSCRIPT_KEYWORDS (line 28) | const GDSCRIPT_KEYWORDS: [&str; 42] = [
  constant GDSCRIPT_FUNCTIONS (line 39) | const GDSCRIPT_FUNCTIONS: [&str; 93] = [
  constant GLOBAL_CONSTANTS (line 58) | const GLOBAL_CONSTANTS: [&str; 6] = [
  constant NAMED_PRIMITIVE_TYPES (line 65) | const NAMED_PRIMITIVE_TYPES: [&str; 27] = [
  function get_all_reserved_words (line 72) | fn get_all_reserved_words() -> HashSet<Cow<'static, str>> {

FILE: src/compile/preload_resolver.rs
  type DefaultPreloadResolver (line 41) | pub struct DefaultPreloadResolver;
  type LookupPreloadResolver (line 52) | pub struct LookupPreloadResolver(pub HashMap<PathBuf, PathBuf>);
    method insert (line 82) | pub fn insert(&mut self, key: PathBuf, value: PathBuf) -> Option<PathB...
  type PreloadResolver (line 57) | pub trait PreloadResolver {
    method resolve_preload (line 65) | fn resolve_preload(&self, path: &RPathBuf) -> Option<String>;
    method include_resource (line 72) | fn include_resource(&self, res: ResourceType) -> bool;
    method resolve_preload (line 91) | fn resolve_preload(&self, path: &RPathBuf) -> Option<String> {
    method include_resource (line 97) | fn include_resource(&self, _res: ResourceType) -> bool {
    method resolve_preload (line 108) | fn resolve_preload(&self, path: &RPathBuf) -> Option<String> {
    method include_resource (line 115) | fn include_resource(&self, res: ResourceType) -> bool {

FILE: src/compile/resource_type.rs
  type ResourceType (line 33) | pub enum ResourceType {
    method from_path (line 58) | pub fn from_path<P : AsRef<Path> + ?Sized>(path: &P) -> ResourceType {
    method from_file_extension (line 66) | pub fn from_file_extension<S : AsRef<OsStr> + ?Sized>(ext: &S) -> Reso...
    method can_have_macros (line 81) | pub fn can_have_macros(&self) -> bool {
    method is_import_allowed (line 90) | pub fn is_import_allowed(&self, import: &ImportDecl) -> bool {
    method check_import (line 102) | pub fn check_import(_pipeline: &Pipeline, import: &ImportDecl) -> Resu...
    method from (line 121) | fn from(path: &Path) -> ResourceType {
    method from (line 129) | fn from(imp: &ImportDecl) -> ResourceType {

FILE: src/compile/special_form/closure.rs
  type IRArgList (line 27) | type IRArgList = crate::ir::arglist::ordinary::ArgList;
  type IRExpr (line 28) | type IRExpr = crate::ir::expr::Expr;
  type ClosureData (line 33) | pub struct ClosureData {
    method purge_globals (line 76) | pub fn purge_globals(&mut self, table: &SymbolTable) {
    method to_gd_closure_vars (line 114) | pub fn to_gd_closure_vars(&self, table: &SymbolTable) -> Vec<String> {
    method from (line 158) | fn from(function: Function<'a, 'b>) -> ClosureData {
    method from (line 176) | fn from(class: &'a LambdaClass) -> ClosureData {
    method from (line 200) | fn from(comp: LabelsComponent<'a, 'b>) -> ClosureData {
  type Function (line 56) | pub struct Function<'a, 'b> {
  type LabelsComponent (line 68) | pub struct LabelsComponent<'a, 'b>(pub &'a [&'b LocalFnClause]);
  function new (line 147) | pub fn new(args: &'a IRArgList, body: &'b IRExpr) -> Self {
  function purge_globals (line 237) | pub fn purge_globals(vars: &mut Locals, table: &SymbolTable) {
  function closure_fn_to_gd_var (line 248) | pub fn closure_fn_to_gd_var(call: &FnCall) -> Option<String> {

FILE: src/compile/special_form/flet.rs
  type IRExpr (line 40) | type IRExpr = ir::expr::Expr;
  type IRArgList (line 41) | type IRArgList = ir::arglist::ordinary::ArgList;
  function compile_flet (line 43) | pub fn compile_flet(frame: &mut CompilerFrame<StmtBuilder>,
  function compile_flet_call (line 59) | fn compile_flet_call(frame: &mut CompilerFrame<StmtBuilder>,
  function compile_labels (line 94) | pub fn compile_labels(frame: &mut CompilerFrame<StmtBuilder>,
  type CompileLabelsRecAlgorithm (line 121) | struct CompileLabelsRecAlgorithm<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j,...
  function compile_labels_rec (line 134) | fn compile_labels_rec(&mut self) -> Result<StExpr, GDError> {
  method get_symbol_table (line 174) | fn get_symbol_table(&self) -> &SymbolTable {
  method get_symbol_table_mut (line 178) | fn get_symbol_table_mut(&mut self) -> &mut SymbolTable {
  function is_declaration_semiglobal (line 197) | pub fn is_declaration_semiglobal(args: &IRArgList, body: &IRExpr, table:...
  function all_names_are_nonlocal (line 207) | fn all_names_are_nonlocal<I, T>(mut names: I, table: &SymbolTable)

FILE: src/compile/special_form/lambda.rs
  type IRExpr (line 53) | type IRExpr = ir::expr::Expr;
  type IRArgList (line 54) | type IRArgList = ir::arglist::ordinary::ArgList;
  function compile_labels_scc (line 56) | pub fn compile_labels_scc(frame: &mut CompilerFrame<StmtBuilder>,
  function generate_scc_name (line 175) | fn generate_scc_name(original_name: &str, gen: &mut FreshNameGenerator) ...
  function generate_names_for_scc_clauses (line 180) | fn generate_names_for_scc_clauses<'a>(clauses: impl Iterator<Item=&'a Lo...
  function special_local_fn_call (line 190) | pub fn special_local_fn_call(labels_var: String, function: String, specs...
  function locally_bind_vars (line 200) | pub fn locally_bind_vars(compiler: &mut Compiler,
  function protect_closure_var_name (line 226) | fn protect_closure_var_name(gen: &mut impl NameGenerator, var: &mut Loca...
  function locally_bind_fns (line 236) | pub fn locally_bind_fns<L>(compiler: &mut Compiler,
  function copy_global_vars (line 262) | pub fn copy_global_vars(src_table: &SymbolTable, dest_table: &mut Symbol...
  function make_constructor_call (line 282) | pub fn make_constructor_call(class_name: String,
  function wrap_in_cell_if_needed (line 296) | fn wrap_in_cell_if_needed(name: &str, gd_name: &str, all_vars: &Locals, ...
  function compile_lambda_stmt (line 304) | pub fn compile_lambda_stmt(frame: &mut CompilerFrame<StmtBuilder>,
  function compile_function_ref (line 398) | pub fn compile_function_ref(compiler: &mut Compiler,
  function simple_arg_names (line 460) | pub fn simple_arg_names(count: usize) -> ArgList {

FILE: src/compile/special_form/lambda_class.rs
  function compile_lambda_class (line 40) | pub fn compile_lambda_class(frame: &mut CompilerFrame<StmtBuilder>,
  function get_all_instance_scoped_vars (line 167) | fn get_all_instance_scoped_vars(decls: &[ir::decl::ClassInnerDecl]) -> V...
  function compile_lambda_class_constructor (line 187) | fn compile_lambda_class_constructor(frame: &mut CompilerFrame<impl HasDe...

FILE: src/compile/special_form/lambda_vararg/builder.rs
  type LambdaVarargBuilder (line 32) | pub struct LambdaVarargBuilder {
    method new (line 45) | pub fn new(args_variable: String, pos: SourceOffset) -> LambdaVarargBu...
    method with_existing_args (line 53) | pub fn with_existing_args(args_variable: String, args: impl Iterator<I...
    method with_inner_builder (line 71) | pub fn with_inner_builder(&self, block: impl FnOnce(&mut LambdaVarargB...
    method declare_argument_var (line 83) | pub fn declare_argument_var(&mut self, name: String) {
    method push_error (line 90) | pub fn push_error(&mut self, message: &str) {
    method pop_argument (line 104) | pub fn pop_argument(&mut self, variable_name: &str) {
    method assign_to_var (line 118) | pub fn assign_to_var(&mut self, variable_name: &str, value: Expr) {
    method pop_rest_of_arguments_with (line 131) | pub fn pop_rest_of_arguments_with<F>(&mut self, function: F)
    method pop_rest_of_arguments (line 142) | pub fn pop_rest_of_arguments(&mut self) {
    method call_function_with_arguments (line 150) | pub fn call_function_with_arguments(&mut self, function_name: &str) {
    method if_args_is_empty (line 162) | pub fn if_args_is_empty<F1, F2>(&mut self, empty_block: F1, nonempty_b...
    method build (line 177) | pub fn build(self) -> Vec<Stmt> {

FILE: src/compile/special_form/lambda_vararg/mod.rs
  constant ARGS_VAR (line 33) | const ARGS_VAR: &str = "args";
  function generate_lambda_vararg (line 35) | pub fn generate_lambda_vararg(specs: FnSpecs, pos: SourceOffset) -> decl...
  function generate_lambda_class (line 86) | pub fn generate_lambda_class(class_name: String,
  function gdlisp_function_class (line 133) | fn gdlisp_function_class(minimalist_run: bool) -> ClassExtends {
  function compile_vararg (line 146) | fn compile_vararg(specs: FnSpecs) -> String {
  function test_lambda_vararg (line 152) | fn test_lambda_vararg() {

FILE: src/compile/special_form/let_block.rs
  type IRExpr (line 33) | type IRExpr = ir::expr::Expr;
  function compile_let (line 35) | pub fn compile_let(frame: &mut CompilerFrame<StmtBuilder>,

FILE: src/compile/special_form/mod.rs
  type IRExpr (line 45) | type IRExpr = ir::expr::Expr;
  function compile_cond_stmt (line 47) | pub fn compile_cond_stmt(frame: &mut CompilerFrame<StmtBuilder>,
  function compile_while_stmt (line 94) | pub fn compile_while_stmt(frame: &mut CompilerFrame<StmtBuilder>,
  function compile_for_stmt (line 125) | pub fn compile_for_stmt(frame: &mut CompilerFrame<StmtBuilder>,
  function assign_to_compiler (line 147) | pub fn assign_to_compiler(inst_var: String, local_var: String, pos: Sour...
  function assign_expr_to_compiler (line 153) | pub fn assign_expr_to_compiler(inst_var: String, expr: Expr) -> Stmt {

FILE: src/compile/stateful.rs
  type StExpr (line 40) | pub struct StExpr {
  type SideEffects (line 55) | pub enum SideEffects {
    method reads_state (line 166) | pub fn reads_state(&self) -> bool {
    method modifies_state (line 181) | pub fn modifies_state(&self) -> bool {
    method from (line 193) | fn from(x: AccessType) -> SideEffects {
  type NeedsResult (line 93) | pub enum NeedsResult { No, Yes }
    method from (line 102) | fn from(b: bool) -> NeedsResult {
    method or (line 110) | pub fn or(self, other: NeedsResult) -> NeedsResult {
    method and (line 115) | pub fn and(self, other: NeedsResult) -> NeedsResult {
    method into_destination (line 136) | pub fn into_destination(self,
  function from (line 96) | fn from(s: NeedsResult) -> bool {

FILE: src/compile/stmt_wrapper.rs
  type StmtWrapper (line 35) | pub trait StmtWrapper {
    method wrap_expr (line 38) | fn wrap_expr(&self, expr: Expr) -> Stmt;
    method is_vacuous (line 49) | fn is_vacuous(&self) -> bool {
    method wrap_to_builder (line 65) | fn wrap_to_builder(&self, builder: &mut StmtBuilder, expr: StExpr) {
    method wrap_to_stmt (line 76) | fn wrap_to_stmt(&self, expr: StExpr) -> Option<Stmt> {
    method wrap_expr (line 102) | fn wrap_expr(&self, expr: Expr) -> Stmt {
    method wrap_expr (line 110) | fn wrap_expr(&self, expr: Expr) -> Stmt {
    method is_vacuous (line 115) | fn is_vacuous(&self) -> bool {
    method wrap_expr (line 128) | fn wrap_expr(&self, expr: Expr) -> Stmt {
  type Return (line 89) | pub struct Return;
  type Vacuous (line 94) | pub struct Vacuous;
  type AssignToExpr (line 99) | pub struct AssignToExpr(pub Expr);
  function assign_to_var (line 123) | pub fn assign_to_var(s: String, pos: SourceOffset) -> AssignToExpr {

FILE: src/compile/symbol_table/call_magic/mod.rs
  type CallMagic (line 79) | pub enum CallMagic {
    method is_default (line 257) | pub fn is_default(&self) -> bool {
    method compile (line 266) | pub fn compile(&self,
    method can_be_called_as_const (line 557) | pub fn can_be_called_as_const(&self, arg_count: usize) -> bool {
  type Assoc (line 198) | pub enum Assoc {
  function strip_st (line 208) | fn strip_st(x: Vec<StExpr>) -> Vec<Expr> {
  function compile_default_call (line 219) | pub fn compile_default_call(call: FnCall, mut args: Vec<Expr>, pos: Sour...

FILE: src/compile/symbol_table/call_magic/table.rs
  type MagicTable (line 41) | pub struct MagicTable {
    method new (line 48) | pub fn new() -> MagicTable {
    method get (line 53) | pub fn get(&self, name: &str) -> Option<&CallMagic> {
    method set (line 59) | pub fn set(&mut self, name: String, value: CallMagic) {
    method del (line 65) | pub fn del(&mut self, name: &str) {
    method into_hashmap (line 70) | pub fn into_hashmap(self) -> HashMap<String, CallMagic> {
    method from (line 77) | fn from(values: HashMap<String, CallMagic>) -> MagicTable {

FILE: src/compile/symbol_table/function_call.rs
  type FnCall (line 44) | pub struct FnCall {
    method file_macro (line 178) | pub fn file_macro(specs: FnSpecs, scope: FnScope, function: String) ->...
    method file_constant (line 183) | pub fn file_constant(specs: FnSpecs, scope: FnScope, function: String)...
    method superglobal (line 188) | pub fn superglobal(specs: FnSpecs, scope: FnScope, function: String) -...
    method can_be_called_as_const (line 195) | pub fn can_be_called_as_const(&self) -> bool {
    method into_expr (line 210) | pub fn into_expr(self,
    method into_expr_with_magic (line 222) | pub fn into_expr_with_magic(self,
  type FnScope (line 65) | pub enum FnScope {
    method is_local (line 339) | pub fn is_local(&self) -> bool {
    method local_name (line 348) | pub fn local_name(&self) -> Option<&str> {
  type FnName (line 113) | pub enum FnName {
    method imported_constant (line 360) | pub fn imported_constant(orig_name: VarName) -> FnName {
    method on_local_var (line 365) | pub fn on_local_var(local_name: VarName) -> FnName {
    method into_imported (line 376) | pub fn into_imported(self, import_name: String) -> FnName {
    method into_imported_var (line 380) | pub fn into_imported_var(self, import: VarName) -> FnName {
    method inner_static_load (line 413) | pub fn inner_static_load(resolver: &(impl PreloadResolver + ?Sized), l...
    method update_for_inner_scope (line 446) | pub fn update_for_inner_scope(&mut self,
    method needs_inner_scope_reference (line 470) | pub fn needs_inner_scope_reference(&self) -> bool {
    method into_inner_scope (line 486) | pub fn into_inner_scope(mut self,
    method into_expr (line 500) | pub fn into_expr(self, pos: SourceOffset) -> Option<Expr> {
    method from (line 540) | fn from(var_name: VarName) -> FnName {
  type FnSpecs (line 132) | pub struct FnSpecs {
    constant EMPTY (line 238) | pub const EMPTY: FnSpecs = FnSpecs { required: 0, optional: 0, rest: N...
    method new (line 241) | pub fn new(required: usize, optional: usize, rest: Option<VarArg>) -> ...
    method has_rest (line 247) | pub fn has_rest(&self) -> bool {
    method runtime_arity (line 280) | pub fn runtime_arity(&self) -> usize {
    method min_arity (line 301) | pub fn min_arity(&self) -> usize {
    method max_arity (line 325) | pub fn max_arity(&self) -> usize {
  type OuterStaticRef (line 164) | pub enum OuterStaticRef<'a> {
  function from_ref_type (line 520) | pub fn from_ref_type(static_binding: bool, outer_ref_name: &'a str) -> S...
  function from_option_ref (line 530) | pub fn from_option_ref(outer_ref_name: Option<&'a str>) -> Self {
  method from (line 546) | fn from(specs: FnSpecs) -> Expecting {

FILE: src/compile/symbol_table/inner.rs
  type InnerSymbolTable (line 34) | pub struct InnerSymbolTable<'a> {
  function new (line 43) | pub fn new(inner_table: SymbolTable, outer_table: &'a mut SymbolTable) -...
  function with_synthetics_from (line 49) | pub fn with_synthetics_from(outer_table: &'a mut SymbolTable) -> Self {
  function cloned_from (line 56) | pub fn cloned_from(outer_table: &'a mut SymbolTable) -> Self {
  type Target (line 64) | type Target = SymbolTable;
  method deref (line 66) | fn deref(&self) -> &SymbolTable {
  method deref_mut (line 73) | fn deref_mut(&mut self) -> &mut SymbolTable {
  method drop (line 80) | fn drop(&mut self) {

FILE: src/compile/symbol_table/local_var.rs
  type LocalVar (line 42) | pub struct LocalVar {
    method read (line 191) | pub fn read(name: String) -> LocalVar {
    method rw (line 197) | pub fn rw(name: String) -> LocalVar {
    method closed_rw (line 202) | pub fn closed_rw(name: String) -> LocalVar {
    method local (line 207) | pub fn local(name: String, access_type: AccessType) -> LocalVar {
    method outer_class_ref (line 219) | pub fn outer_class_ref(name: String, access_type: AccessType) -> Local...
    method superglobal (line 232) | pub fn superglobal(name: String) -> LocalVar {
    method file_constant (line 244) | pub fn file_constant(name: String) -> LocalVar {
    method current_file (line 257) | pub fn current_file(name: String) -> LocalVar {
    method self_var (line 272) | pub fn self_var() -> LocalVar { // TODO Should this be a special case?
    method no_assign (line 279) | pub fn no_assign(mut self) -> Self {
    method with_hint (line 286) | pub fn with_hint(mut self, value_hint: ValueHint) -> Self {
    method simple_name (line 293) | pub fn simple_name(&self) -> Option<&str> {
    method set_simple_name (line 300) | pub fn set_simple_name(&mut self, name: String) {
    method is_valid_const_expr (line 330) | pub fn is_valid_const_expr(&self) -> bool {
    method expr (line 359) | pub fn expr(&self, pos: SourceOffset) -> Expr {
  type VarName (line 65) | pub enum VarName {
    method load_expr (line 378) | pub fn load_expr(filename: String, pos: SourceOffset) -> Expr {
    method local (line 383) | pub fn local(name: &str) -> VarName {
    method outer_class_ref (line 388) | pub fn outer_class_ref(name: &str) -> VarName {
    method file_constant (line 393) | pub fn file_constant(name: &str) -> VarName {
    method superglobal (line 398) | pub fn superglobal(name: &str) -> VarName {
    method imported_constant (line 403) | pub fn imported_constant(orig_name: VarName, name: &str) -> VarName {
    method current_file (line 408) | pub fn current_file(filename: &str) -> VarName {
    method to_gd (line 414) | pub fn to_gd(&self, pos: SourceOffset) -> String {
    method simple_name (line 423) | pub fn simple_name(&self) -> Option<&str> {
    method into_imported (line 444) | pub fn into_imported(self, import_name: String) -> VarName {
    method into_imported_var (line 448) | pub fn into_imported_var(self, import: VarName) -> VarName {
    method into_expr (line 496) | pub fn into_expr(self, pos: SourceOffset) -> Expr {
  type VarNameIntoExtendsError (line 101) | pub enum VarNameIntoExtendsError {
    method fmt (line 582) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type VarScope (line 124) | pub enum VarScope {
  type ValueHint (line 141) | pub enum ValueHint {
    method enumeration (line 562) | pub fn enumeration<'a>(values: impl Iterator<Item=&'a str>) -> ValueHi...
    method from_file_ext (line 570) | pub fn from_file_ext(file_extension: &OsStr) -> Option<ValueHint> {
  type ValueHintsTable (line 171) | pub trait ValueHintsTable {
    method get_value_hint (line 174) | fn get_value_hint(&self, name: &str) -> Option<&ValueHint>;
    method get_value_hint (line 182) | fn get_value_hint(&self, _name: &str) -> Option<&ValueHint> {
  type VacuousValueHintsTable (line 179) | pub struct VacuousValueHintsTable;
  type Error (line 516) | type Error = VarNameIntoExtendsError;
  method try_from (line 523) | fn try_from(var_name: VarName) -> Result<ClassExtends, VarNameIntoExtend...
  function qualified (line 612) | fn qualified(mut name: Vec<&'static str>) -> ClassExtends {
  function extends_constant (line 619) | fn extends_constant() {
  function extends_superglobal (line 627) | fn extends_superglobal() {
  function extends_imported (line 635) | fn extends_imported() {
  function cannot_extend_local (line 643) | fn cannot_extend_local() {
  function cannot_extend_subscripted (line 651) | fn cannot_extend_subscripted() {
  function cannot_extend_current_file (line 659) | fn cannot_extend_current_file() {
  function cannot_extend_null_value (line 667) | fn cannot_extend_null_value() {
  function from_file_ext_test (line 675) | fn from_file_ext_test() {

FILE: src/compile/symbol_table/mod.rs
  type SymbolTable (line 49) | pub struct SymbolTable {
    method new (line 94) | pub fn new() -> SymbolTable {
    method with_synthetics_from (line 102) | pub fn with_synthetics_from(table: &SymbolTable) -> SymbolTable {
    method dump_synthetics_to (line 110) | pub fn dump_synthetics_to(&self, destination_table: &mut SymbolTable) {
    method get_var (line 126) | pub fn get_var(&self, name: &str) -> Option<&LocalVar> {
    method get_var_by_gd_name (line 133) | pub fn get_var_by_gd_name(&self, gd_name: &str) -> Option<&LocalVar> {
    method get_fn_by_gd_name (line 140) | pub fn get_fn_by_gd_name(&self, gd_name: &str) -> Option<(&FnCall, &Ca...
    method set_var (line 146) | pub fn set_var(&mut self, name: String, value: LocalVar) -> Option<Loc...
    method del_var (line 162) | pub fn del_var(&mut self, name: &str) {
    method add_synthetic_var (line 174) | pub fn add_synthetic_var(&mut self, name: String, is_local: bool) {
    method remove_synthetic_var (line 180) | pub fn remove_synthetic_var(&mut self, name: &str) {
    method clear_synthetic_locals (line 185) | pub fn clear_synthetic_locals(&mut self) {
    method get_fn (line 191) | pub fn get_fn(&self, name: &str) -> Option<(&FnCall, &CallMagic)> {
    method set_fn (line 199) | pub fn set_fn(&mut self, name: String, value: FnCall, magic: CallMagic) {
    method del_fn (line 210) | pub fn del_fn(&mut self, name: &str) {
    method add_synthetic_fn (line 220) | pub fn add_synthetic_fn(&mut self, name: String) {
    method remove_synthetic_fn (line 226) | pub fn remove_synthetic_fn(&mut self, name: &str) {
    method vars (line 231) | pub fn vars(&self) -> impl Iterator<Item=(&str, &LocalVar)> {
    method fns (line 236) | pub fn fns(&self) -> impl Iterator<Item=(&str, &FnCall, &CallMagic)> {
    method fns_mut (line 245) | pub fn fns_mut(&mut self) -> impl Iterator<Item=(&str, &mut FnCall, &m...
    method keys (line 254) | pub fn keys(&self) -> impl Iterator<Item=(Namespace, &str)> {
    method into_keys (line 263) | pub fn into_keys(self) -> impl Iterator<Item=Id> {
    method assign_from (line 273) | pub fn assign_from(&mut self, other: &SymbolTable) {
    method has_var_with_gd_name (line 284) | pub fn has_var_with_gd_name(&self, name: &str) -> bool {
    method has_fn_with_gd_name (line 291) | pub fn has_fn_with_gd_name(&self, name: &str) -> bool {
  type ClassTablePair (line 83) | pub struct ClassTablePair<'a, 'b> {
  type HasSymbolTable (line 300) | pub trait HasSymbolTable {
    method get_symbol_table (line 303) | fn get_symbol_table(&self) -> &SymbolTable;
    method get_symbol_table_mut (line 306) | fn get_symbol_table_mut(&mut self) -> &mut SymbolTable;
    method with_local_var (line 312) | fn with_local_var<B, F>(&mut self,
    method with_local_vars (line 330) | fn with_local_vars<B>(&mut self,
    method with_local_fn (line 346) | fn with_local_fn<B>(&mut self,
    method with_local_fns (line 364) | fn with_local_fns<B>(&mut self,
    method get_symbol_table (line 380) | fn get_symbol_table(&self) -> &SymbolTable {
    method get_symbol_table_mut (line 384) | fn get_symbol_table_mut(&mut self) -> &mut SymbolTable {
  method get_value_hint (line 394) | fn get_value_hint(&self, name: &str) -> Option<&ValueHint> {
  function into_table (line 403) | pub fn into_table(self, is_static: bool) -> &'a mut SymbolTable {
  function from_var_name (line 421) | fn from_var_name(e: &VarName) -> &str {
  function test_vars (line 426) | fn test_vars() {
  function test_iter_vars (line 454) | fn test_iter_vars() {
  function sample_fn (line 464) | fn sample_fn() -> FnCall {
  function test_fns (line 469) | fn test_fns() {
  function test_iter_fns (line 488) | fn test_iter_fns() {
  function test_synthetic_vars (line 500) | fn test_synthetic_vars() {
  function test_synthetic_fns (line 510) | fn test_synthetic_fns() {

FILE: src/gdscript/arglist.rs
  type ArgList (line 37) | pub struct ArgList {
    method empty (line 47) | pub fn empty() -> ArgList {
    method required (line 52) | pub fn required(args: Vec<String>) -> ArgList {
    method optional (line 71) | pub fn optional(mut self, args: impl IntoIterator<Item=(String, Expr)>...
    method is_empty (line 77) | pub fn is_empty(&self) -> bool {
    method prepend_required (line 83) | pub fn prepend_required(&mut self, required: impl Iterator<Item=String...
    method optionalize_all (line 93) | pub fn optionalize_all(&mut self, default_value: &Expr) {
    method all_args_iter (line 100) | pub fn all_args_iter(&self) -> impl Iterator<Item=&str> {
    method to_gd (line 107) | pub fn to_gd(&self) -> String {
  function null (line 127) | fn null() -> Expr {
  function empty_arglist_to_gd_test (line 132) | fn empty_arglist_to_gd_test() {
  function required_arglist_to_gd_test (line 137) | fn required_arglist_to_gd_test() {
  function optional_arglist_to_gd_test (line 144) | fn optional_arglist_to_gd_test() {
  function full_arglist_to_gd_test (line 150) | fn full_arglist_to_gd_test() {
  function optional_arglist_custom_expr_to_gd_test (line 158) | fn optional_arglist_custom_expr_to_gd_test() {
  function prepend_required_test (line 164) | fn prepend_required_test() {
  function all_args_iter_test (line 171) | fn all_args_iter_test() {

FILE: src/gdscript/class_extends.rs
  type ClassExtends (line 25) | pub enum ClassExtends {
    method attribute (line 39) | pub fn attribute(self, attr: impl Into<String>) -> ClassExtends {
    method to_gd (line 45) | pub fn to_gd(&self) -> String {
  function test_simple_identifier (line 60) | fn test_simple_identifier() {
  function test_string_literal (line 66) | fn test_string_literal() {
  function test_string_literal_escaped (line 72) | fn test_string_literal_escaped() {
  function test_qualified_identifier (line 78) | fn test_qualified_identifier() {
  function test_qualified_path (line 84) | fn test_qualified_path() {

FILE: src/gdscript/decl.rs
  type DeclF (line 38) | pub enum DeclF {
  type Decl (line 51) | pub struct Decl {
    method new (line 154) | pub fn new(value: DeclF, pos: SourceOffset) -> Decl {
    method name (line 161) | pub fn name(&self) -> Option<&str> {
    method write_gd (line 184) | pub fn write_gd<W : fmt::Write>(&self, w: &mut W, ind: u32) -> Result<...
    method to_gd (line 273) | pub fn to_gd(&self, ind: u32) -> String {
  type ClassDecl (line 57) | pub struct ClassDecl {
  type TopLevelClass (line 69) | pub struct TopLevelClass {
    method to_gd (line 297) | pub fn to_gd(&self) -> String {
  type VarDecl (line 80) | pub struct VarDecl {
    method new (line 323) | pub fn new(name: String, value: Option<Expr>) -> VarDecl {
    method simple (line 335) | pub fn simple(name: String) -> VarDecl {
    method with_export (line 340) | pub fn with_export(mut self, export: Option<Export>) -> VarDecl {
    method onready (line 346) | pub fn onready(mut self) -> VarDecl {
    method setget (line 352) | pub fn setget(mut self, setget: Setget) -> VarDecl {
  type FnDecl (line 89) | pub struct FnDecl {
  type InitFnDecl (line 96) | pub struct InitFnDecl {
  type EnumDecl (line 103) | pub struct EnumDecl {
  type Export (line 114) | pub struct Export {
  type Static (line 121) | pub enum Static {
    method from (line 388) | fn from(b: bool) -> Static {
  type Onready (line 128) | pub enum Onready {
    method from (line 394) | fn from(b: bool) -> Onready {
  type Setget (line 135) | pub struct Setget {
    method to_gd (line 364) | pub fn to_gd(&self) -> String {
  function empty_class_body (line 140) | fn empty_class_body(pos: SourceOffset) -> Decl {
  type Item (line 282) | type Item = DeclF;
  method get_source (line 284) | fn get_source(&self) -> SourceOffset {
  method get_value (line 288) | fn get_value(&self) -> &DeclF {
  function from (line 376) | fn from(s: Static) -> bool {
  function from (line 382) | fn from(r: Onready) -> bool {
  function e (line 405) | fn e(expr: ExprF) -> Expr {
  function d (line 409) | fn d(decl: DeclF) -> Decl {
  function var (line 415) | fn var(export: Option<Export>, onready: Onready, name: String, value: Op...
  function var_and_const (line 420) | fn var_and_const() {
  function exported_var (line 430) | fn exported_var() {
  function setget_var (line 447) | fn setget_var() {
  function signal (line 470) | fn signal() {
  function functions (line 476) | fn functions() {
  function init_functions (line 516) | fn init_functions() {
  function classes (line 549) | fn classes() {
  function enums (line 611) | fn enums() {
  function decl_names (line 638) | fn decl_names() {

FILE: src/gdscript/expr.rs
  constant PRECEDENCE_LOWEST (line 35) | pub const PRECEDENCE_LOWEST: i32 = -99;
  constant PRECEDENCE_SUBSCRIPT (line 36) | pub const PRECEDENCE_SUBSCRIPT: i32 = 21;
  constant PRECEDENCE_ATTRIBUTE (line 37) | pub const PRECEDENCE_ATTRIBUTE: i32 = 20;
  constant PRECEDENCE_CALL (line 38) | pub const PRECEDENCE_CALL: i32 = 19;
  type ExprF (line 42) | pub enum ExprF {
    method from (line 297) | fn from(x: T) -> ExprF {
    method from (line 303) | fn from(x: TernaryIf) -> ExprF {
  type Expr (line 66) | pub struct Expr {
    method new (line 90) | pub fn new(value: ExprF, pos: SourceOffset) -> Expr {
    method null (line 95) | pub fn null(pos: SourceOffset) -> Expr {
    method self_var (line 100) | pub fn self_var(pos: SourceOffset) -> Expr {
    method str_lit (line 105) | pub fn str_lit(a: &str, pos: SourceOffset) -> Expr {
    method var (line 111) | pub fn var(a: &str, pos: SourceOffset) -> Expr {
    method attribute (line 117) | pub fn attribute(self, attr: impl Into<String>, pos: SourceOffset) -> ...
    method subscript (line 122) | pub fn subscript(self, rhs: Expr, pos: SourceOffset) -> Expr {
    method unary (line 127) | pub fn unary(self, op: UnaryOp, pos: SourceOffset) -> Expr {
    method binary (line 132) | pub fn binary(self, op: BinaryOp, rhs: Expr, pos: SourceOffset) -> Expr {
    method call (line 137) | pub fn call(lhs: Option<Expr>, name: &str, args: Vec<Expr>, pos: Sourc...
    method simple_call (line 143) | pub fn simple_call(name: &str, args: Vec<Expr>, pos: SourceOffset) -> ...
    method super_call (line 148) | pub fn super_call(name: &str, args: Vec<Expr>, pos: SourceOffset) -> E...
    method yield_expr (line 157) | pub fn yield_expr(args: Option<(Expr, Expr)>, pos: SourceOffset) -> Ex...
    method assert_expr (line 168) | pub fn assert_expr(cond: Expr, message: Option<Expr>, pos: SourceOffse...
    method preload_expr (line 177) | pub fn preload_expr(arg: String, pos: SourceOffset) -> Expr {
    method from_value (line 182) | pub fn from_value<T>(value: T, pos: SourceOffset) -> Expr
    method to_gd_prec (line 192) | pub fn to_gd_prec(&self, prec: i32) -> String {
    method to_gd (line 276) | pub fn to_gd(&self) -> String {
  type TernaryIf (line 73) | pub struct TernaryIf {
  function maybe_parens (line 79) | fn maybe_parens(cond: bool, inner: String) -> String {
  type Item (line 283) | type Item = ExprF;
  method get_source (line 285) | fn get_source(&self) -> SourceOffset {
  method get_value (line 289) | fn get_value(&self) -> &ExprF {
  function e (line 312) | fn e(expr: ExprF) -> Expr {
  function basic_expr_types (line 317) | fn basic_expr_types() {
  function call_exprs (line 345) | fn call_exprs() {
  function unary (line 373) | fn unary(op: UnaryOp, expr: &Expr) -> Expr {
  function binary (line 377) | fn binary(a: &Expr, op: BinaryOp, b: &Expr) -> Expr {
  function unary_ops (line 382) | fn unary_ops() {
  function binary_ops (line 390) | fn binary_ops() {
  function ternary_op (line 417) | fn ternary_op() {
  function operator_precedence (line 425) | fn operator_precedence() {
  function ternary_if_precedence_1 (line 438) | fn ternary_if_precedence_1() {
  function ternary_if_precedence_2 (line 460) | fn ternary_if_precedence_2() {
  function arrays (line 511) | fn arrays() {
  function dictionaries (line 519) | fn dictionaries() {

FILE: src/gdscript/expr_wrapper.rs
  function int (line 26) | pub fn int(expr: Expr) -> Expr {
  function float (line 37) | pub fn float(expr: Expr) -> Expr {
  function int_test (line 52) | fn int_test() {
  function float_test (line 60) | fn float_test() {

FILE: src/gdscript/inner_class.rs
  constant OUTER_REFERENCE_NAME (line 49) | pub const OUTER_REFERENCE_NAME: &str = "__gdlisp_outer_class";
  function add_outer_class_ref_named (line 58) | pub fn add_outer_class_ref_named(inner_class: &mut decl::ClassDecl, reso...
  function get_current_filename (line 70) | pub fn get_current_filename<L, R>(current_file: &L, resolver: &R) -> Opt...
  type NeedsOuterClassRef (line 84) | pub trait NeedsOuterClassRef {
    method needs_outer_class_ref (line 88) | fn needs_outer_class_ref(&self, table: &SymbolTable) -> bool;
    method needs_outer_class_ref (line 109) | fn needs_outer_class_ref(&self, table: &SymbolTable) -> bool {
    method needs_outer_class_ref (line 121) | fn needs_outer_class_ref(&self, table: &SymbolTable) -> bool {
    method needs_outer_class_ref (line 127) | fn needs_outer_class_ref(&self, table: &SymbolTable) -> bool {
    method needs_outer_class_ref (line 135) | fn needs_outer_class_ref(&self, table: &SymbolTable) -> bool {
    method needs_outer_class_ref (line 143) | fn needs_outer_class_ref(&self, table: &SymbolTable) -> bool {
  function check_dependencies_for_outer_class_ref (line 91) | fn check_dependencies_for_outer_class_ref(deps: impl Iterator<Item=Id>, ...

FILE: src/gdscript/library/cell.rs
  constant CELL_CLASS (line 63) | pub const CELL_CLASS: &str = "Cell";
  constant CELL_CONTENTS (line 66) | pub const CELL_CONTENTS: &str = "contents";
  function cell_class (line 69) | pub fn cell_class(pos: SourceOffset) -> Expr {
  function construct_cell (line 75) | pub fn construct_cell(expr: Expr) -> Expr {
  function wrap_var_in_cell (line 82) | pub fn wrap_var_in_cell(stmt_builder: &mut StmtBuilder, arg: &str, pos: ...

FILE: src/gdscript/library/class_loader.rs
  constant CLASS_NAME_BLACKLIST (line 33) | const CLASS_NAME_BLACKLIST: phf::Set<&'static str> = phf_set! {
  constant PATCHED_CLASS_NAMES (line 41) | const PATCHED_CLASS_NAMES: phf::Map<&'static str, &'static str> = phf_ma...
  function get_all_non_singleton_classes (line 49) | pub fn get_all_non_singleton_classes(native: &NativeClasses) -> Vec<&Cla...
  function get_all_singleton_classes (line 58) | pub fn get_all_singleton_classes(native: &NativeClasses) -> Vec<&Class> {
  function get_non_singleton_declarations (line 67) | pub fn get_non_singleton_declarations(native: &NativeClasses) -> impl It...
  function get_singleton_declarations (line 73) | pub fn get_singleton_declarations(native: &NativeClasses) -> Vec<Declare...
  function get_singleton_class_var_declarations (line 83) | pub fn get_singleton_class_var_declarations(native: &NativeClasses, pos:...
  function type_declaration_for_class (line 105) | fn type_declaration_for_class(class: &Class, declare_type: DeclareType) ...
  function value_declaration_for_singleton (line 115) | fn value_declaration_for_singleton(class: &Class, declare_type: DeclareT...
  function backing_class_name_of (line 125) | fn backing_class_name_of(class: &Class) -> String {
  function native_types_dictionary_literal (line 141) | pub fn native_types_dictionary_literal(native: &NativeClasses, pos: Sour...
  function build_dict (line 171) | fn build_dict(terms: impl DoubleEndedIterator<Item=(Expr, Expr)>, pos: S...
  function native_types_dictionary_initializer (line 175) | pub fn native_types_dictionary_initializer(native: &NativeClasses, pos: ...
  function test_non_singleton_classes (line 195) | fn test_non_singleton_classes() {
  function test_singleton_classes (line 211) | fn test_singleton_classes() {

FILE: src/gdscript/library/constant_loader.rs
  constant ENUM_GROUPINGS_BY_PREFIX (line 30) | const ENUM_GROUPINGS_BY_PREFIX: phf::Map<&'static str, &'static str> = p...
  constant ENUM_BLACKLIST (line 50) | const ENUM_BLACKLIST: phf::Set<&'static str> = phf_set! { "SPKEY" };
  constant ENUM_CUSTOM_NAMES (line 53) | const ENUM_CUSTOM_NAMES: phf::Map<&'static str, &'static str> = phf_map! {
  type ConstantEnum (line 71) | pub struct ConstantEnum {
  type EnumGrouping (line 78) | enum EnumGrouping {
  function get_all_constants (line 85) | pub fn get_all_constants(classes: &NativeClasses) -> impl Iterator<Item=...
  function get_all_constant_enums (line 90) | pub fn get_all_constant_enums(classes: &NativeClasses, pos: SourceOffset...
  function get_all_constant_enums_with_leftovers (line 94) | fn get_all_constant_enums_with_leftovers(classes: &NativeClasses, pos: S...
  function identify_enum_grouping (line 135) | fn identify_enum_grouping(table: &PrefixMatcher<'_>, constant_name: &str...
  method from (line 154) | fn from(constant_enum: ConstantEnum) -> EnumDecl {
  function all_constants_classified_test (line 177) | fn all_constants_classified_test() {

FILE: src/gdscript/library/gdnative/api_type.rs
  type ApiType (line 26) | pub enum ApiType {
  function serialize_api_type_test (line 40) | fn serialize_api_type_test() {
  function deserialize_api_type_test (line 48) | fn deserialize_api_type_test() {

FILE: src/gdscript/library/gdnative/argument.rs
  type Argument (line 21) | pub struct Argument {
  function serialize_roundtrip_argument_test (line 35) | fn serialize_roundtrip_argument_test() {
  function deserialize_argument_test (line 47) | fn deserialize_argument_test() {

FILE: src/gdscript/library/gdnative/class.rs
  type Class (line 29) | pub struct Class {
  constant SAMPLE_CLASS_JSON (line 52) | const SAMPLE_CLASS_JSON: &str = r#"{
  function deserialize_class_test (line 113) | fn deserialize_class_test() {

FILE: src/gdscript/library/gdnative/gdnative_enum.rs
  type Enum (line 23) | pub struct Enum {
  function deserialize_enum_test (line 34) | fn deserialize_enum_test() {

FILE: src/gdscript/library/gdnative/method.rs
  type Method (line 23) | pub struct Method {
  function deserialize_method_test (line 42) | fn deserialize_method_test() {

FILE: src/gdscript/library/gdnative/mod.rs
  constant GLOBAL_CONSTANTS_CLASS (line 37) | pub const GLOBAL_CONSTANTS_CLASS: &str = "GlobalConstants";
  type NativeClasses (line 40) | pub struct NativeClasses {
    method get_api_from_godot (line 46) | pub fn get_api_from_godot() -> io::Result<NativeClasses> {
    method len (line 56) | pub fn len(&self) -> usize {
    method is_empty (line 60) | pub fn is_empty(&self) -> bool {
    method get (line 64) | pub fn get(&self, class_name: &str) -> Option<&Class> {
    method get_global_constants (line 68) | pub fn get_global_constants(&self) -> &Class {
    method values (line 72) | pub fn values(&self) -> impl Iterator<Item=&Class> {
  function test_get_api_from_godot (line 83) | fn test_get_api_from_godot() {

FILE: src/gdscript/library/gdnative/property.rs
  type Property (line 21) | pub struct Property {
  function deserialize_property_test (line 36) | fn deserialize_property_test() {

FILE: src/gdscript/library/gdnative/signal.rs
  type Signal (line 23) | pub struct Signal {
  function deserialize_signal_test (line 34) | fn deserialize_signal_test() {

FILE: src/gdscript/library/magic.rs
  function bind_magic (line 48) | pub fn bind_magic(table: &mut MagicTable) {
  function standard_magic_table (line 200) | pub fn standard_magic_table() -> MagicTable {

FILE: src/gdscript/library/mod.rs
  constant GDLISP_NAME (line 53) | pub const GDLISP_NAME: &str = "GDLisp";
  constant CONSTRUCTOR_NAME (line 56) | pub const CONSTRUCTOR_NAME: &str = "_init";
  constant READY_NAME (line 60) | pub const READY_NAME: &str = "_ready";
  constant REFERENCE_NAME (line 63) | pub const REFERENCE_NAME: &str = "Reference";
  function gdlisp_root (line 66) | pub fn gdlisp_root(pos: SourceOffset) -> Expr {
  function gdlisp_root_var_name (line 71) | pub fn gdlisp_root_var_name() -> VarName {
  function on_gdlisp_root (line 76) | pub fn on_gdlisp_root(name: String, pos: SourceOffset) -> Expr {
  function construct_list (line 82) | pub fn construct_list(vec: Vec<Expr>, pos: SourceOffset) -> Expr {
  function gdlisp_project_config (line 89) | pub fn gdlisp_project_config(godot_version: VersionInfo) -> ProjectConfig {
  function get_stdlib (line 97) | fn get_stdlib() -> StdlibUnit {
  function load_stdlib_to_file (line 104) | pub fn load_stdlib_to_file() -> StdlibUnit {
  function load_stdlib_file (line 114) | fn load_stdlib_file(pipeline: &mut Pipeline) -> &TranslationUnit {
  function ensure_stdlib_loaded (line 131) | pub fn ensure_stdlib_loaded() {
  function bind_builtins (line 149) | pub fn bind_builtins(table: &mut SymbolTable, minimalist: bool) {
  function bind_builtins_unchecked (line 159) | fn bind_builtins_unchecked(table: &mut SymbolTable, unit: Option<&Stdlib...
  function all_builtin_names (line 193) | pub fn all_builtin_names(minimalist: bool) -> HashSet<Id> {
  function bind_builtin_macros (line 210) | pub fn bind_builtin_macros(macros: &mut HashMap<Id, MacroData>,

FILE: src/gdscript/literal.rs
  type Literal (line 38) | pub enum Literal {
    method to_gd (line 66) | pub fn to_gd(&self) -> String {
    method from (line 87) | fn from(x: i32) -> Literal {
    method from (line 93) | fn from(x: OrderedFloat<f32>) -> Literal {
    method from (line 99) | fn from(x: String) -> Literal {
    method from (line 105) | fn from(x: &'a str) -> Literal {
    method from (line 111) | fn from(x: bool) -> Literal {
    type Error (line 117) | type Error = IRToExprLiteralError;
    method try_from (line 119) | fn try_from(value: IRLiteral) -> Result<Literal, Self::Error> {
  type LiteralFloat (line 52) | pub struct LiteralFloat(pub f32);
    method fmt (line 155) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type IRToExprLiteralError (line 60) | pub struct IRToExprLiteralError;
  method eq (line 136) | fn eq(&self, other: &Self) -> bool {
  type Target (line 145) | type Target = f32;
  method deref (line 147) | fn deref(&self) -> &f32 {
  function literal_test (line 166) | fn literal_test() {
  function string_test (line 174) | fn string_test() {
  function node_path_test (line 180) | fn node_path_test() {
  function node_path_literal_test (line 187) | fn node_path_literal_test() {

FILE: src/gdscript/metadata.rs
  constant PREFIX (line 39) | pub const PREFIX: &str = "__gdlisp";
  constant CONS_META (line 43) | pub const CONS_META: &str = "__gdlisp_Primitive_Cons";
  constant SYMBOL_META (line 47) | pub const SYMBOL_META: &str = "__gdlisp_Primitive_Symbol";
  constant REPL_FUNCTION_NAME (line 51) | pub const REPL_FUNCTION_NAME: &str = "__gdlisp_Repl_runner";
  constant SIGNAL_META (line 55) | pub const SIGNAL_META: &str = "__gdlisp_signals";
  function symbol_macro (line 59) | pub fn symbol_macro(name: &str) -> String {
  function lazy (line 69) | pub fn lazy(name: &str) -> String {
  type MetadataCompiler (line 77) | pub struct MetadataCompiler {
    method new (line 85) | pub fn new(expr: Expr) -> MetadataCompiler {
    method get_pos (line 89) | fn get_pos(&self) -> SourceOffset {
    method get_meta (line 94) | pub fn get_meta(&self, meta_name: &str) -> Expr {
    method set_meta (line 100) | pub fn set_meta(&self, meta_name: &str, value: Expr) -> Expr {
    method has_meta (line 106) | pub fn has_meta(&self, meta_name: &str) -> Expr {
    method remove_meta (line 112) | pub fn remove_meta(&self, meta_name: &str) -> Expr {
  function naming_test (line 125) | fn naming_test() {
  function compiler_test (line 131) | fn compiler_test() {
  function compiler_offset_test (line 145) | fn compiler_offset_test() {

FILE: src/gdscript/mod.rs
  function indent (line 49) | pub fn indent<W: fmt::Write>(w: &mut W, ind: u32) -> Result<(), fmt::Err...
  function is_valid_identifier (line 58) | pub fn is_valid_identifier(s: &str) -> bool {
  function is_valid_node_path (line 74) | pub fn is_valid_node_path(s: &str) -> bool {
  function do_indent (line 82) | fn do_indent(ind: u32) -> String {
  function test_indent (line 89) | fn test_indent() {
  function test_identifier (line 98) | fn test_identifier() {
  function test_path (line 119) | fn test_path() {

FILE: src/gdscript/op.rs
  type UnaryOp (line 24) | pub enum UnaryOp {
  type BinaryOp (line 30) | pub enum BinaryOp {
  type AssignOp (line 37) | pub enum AssignOp {
  type TernaryOp (line 47) | pub struct TernaryOp;
  type OperatorInfo (line 51) | pub struct OperatorInfo {
  type Padding (line 73) | pub enum Padding {
  function info (line 86) | fn info(prec: i32, name: &'static str, padding: Padding) -> OperatorInfo {
  type OperatorHasInfo (line 93) | pub trait OperatorHasInfo {
    method op_info (line 95) | fn op_info(&self) -> OperatorInfo;
    method op_info (line 99) | fn op_info(&self) -> OperatorInfo {
    method op_info (line 109) | fn op_info(&self) -> OperatorInfo {
    method op_info (line 137) | fn op_info(&self) -> OperatorInfo {
    method op_info (line 155) | fn op_info(&self) -> OperatorInfo {

FILE: src/gdscript/pattern.rs
  type Pattern (line 28) | pub enum Pattern {
    method to_gd (line 48) | pub fn to_gd(&self) -> String {
  type Wildcard (line 40) | pub enum Wildcard {
  function from (line 74) | fn from(w: Wildcard) -> bool {
  function atomic_patterns (line 84) | fn atomic_patterns() {
  function compound_patterns (line 92) | fn compound_patterns() {

FILE: src/gdscript/spacing.rs
  type SpacedDeclPrinter (line 27) | pub struct SpacedDeclPrinter {
    method new (line 36) | pub fn new() -> Self {
    method with_spacing (line 42) | pub fn with_spacing(mut self, spacing: u32) -> Self {
    method with_indentation (line 49) | pub fn with_indentation(mut self, indentation: u32) -> Self {
    method write_gd (line 56) | pub fn write_gd<'a, W: Write, I: Iterator<Item=&'a Decl>>(&self, w: &m...
  function group_predicate (line 80) | fn group_predicate(a: &Decl, b: &Decl) -> bool {
  function write_newlines (line 92) | fn write_newlines(w: &mut impl Write, count: u32) -> Result<(), fmt::Err...
  method default (line 99) | fn default() -> Self {

FILE: src/gdscript/stmt.rs
  type StmtF (line 35) | pub enum StmtF {
  type Stmt (line 59) | pub struct Stmt {
    method new (line 146) | pub fn new(value: StmtF, pos: SourceOffset) -> Stmt {
    method expr (line 151) | pub fn expr(expr: Expr) -> Stmt {
    method return_stmt (line 157) | pub fn return_stmt(expr: Expr, pos: SourceOffset) -> Stmt {
    method simple_assign (line 162) | pub fn simple_assign(lhs: Expr, rhs: Expr, pos: SourceOffset) -> Stmt {
    method var_decl (line 167) | pub fn var_decl(var_name: String, value: Expr, pos: SourceOffset) -> S...
    method break_stmt (line 172) | pub fn break_stmt(pos: SourceOffset) -> Stmt {
    method continue_stmt (line 177) | pub fn continue_stmt(pos: SourceOffset) -> Stmt {
    method pass_stmt (line 182) | pub fn pass_stmt(pos: SourceOffset) -> Stmt {
    method write_gd (line 196) | pub fn write_gd<W : fmt::Write>(&self, w: &mut W, ind: u32) -> Result<...
    method write_gd_stmts (line 268) | pub fn write_gd_stmts<'a, W, I>(iter: I, w: &mut W, ind: u32) -> Resul...
    method to_gd (line 289) | pub fn to_gd(&self, ind: u32) -> String {
  type IfStmt (line 66) | pub struct IfStmt {
  type ForLoop (line 74) | pub struct ForLoop {
  type WhileLoop (line 82) | pub struct WhileLoop {
  function if_then (line 88) | pub fn if_then(cond: Expr, true_branch: Vec<Stmt>, pos: SourceOffset) ->...
  function if_else (line 101) | pub fn if_else(cond: Expr, true_branch: Vec<Stmt>, false_branch: Vec<Stm...
  function if_branches (line 124) | pub fn if_branches(cases: Vec<(Expr, Vec<Stmt>)>, default: Vec<Stmt>, po...
  type Item (line 298) | type Item = StmtF;
  method get_source (line 300) | fn get_source(&self) -> SourceOffset {
  method get_value (line 304) | fn get_value(&self) -> &StmtF {
  function assign (line 317) | fn assign(a: &Expr, op: AssignOp, b: &Expr) -> Stmt {
  function e (line 321) | fn e(expr: ExprF) -> Expr {
  function s (line 325) | fn s(stmt: StmtF) -> Stmt {
  function expr_stmt (line 330) | fn expr_stmt() {
  function basic_indent (line 336) | fn basic_indent() {
  function simple_stmts (line 343) | fn simple_stmts() {
  function if_stmt (line 350) | fn if_stmt() {
  function nested_if (line 413) | fn nested_if() {
  function for_loop (line 437) | fn for_loop() {
  function while_loop (line 458) | fn while_loop() {
  function match_stmt (line 477) | fn match_stmt() {
  function assign_ops (line 499) | fn assign_ops() {

FILE: src/graph/mod.rs
  type Graph (line 48) | pub struct Graph<T> {
  function from_edges (line 57) | pub fn from_edges<I>(iter: I) -> Graph<T>
  function from_nodes (line 78) | pub fn from_nodes<I>(iter: I) -> Graph<T>
  function new (line 84) | pub fn new() -> Graph<T> {
  function nodes (line 90) | pub fn nodes(&self) -> impl Iterator<Item=&T> {
  function get_node (line 97) | pub fn get_node<U>(&self, x: &U) -> Option<&T> where U : Borrow<T> {
  function has_node (line 102) | pub fn has_node<U>(&self, x: &U) -> bool where U : Borrow<T> {
  function all_edges (line 108) | pub fn all_edges(&self) -> impl Iterator<Item=(&T, &T)> {
  function outgoing_edges (line 114) | pub fn outgoing_edges(&self, node: impl Borrow<T>) -> Option<&Vec<T>> {
  function add_node (line 120) | pub fn add_node(&mut self, node: T) {
  function add_edge (line 126) | pub fn add_edge(&mut self, x: T, y: T) {
  function add_edge_no_dup (line 134) | pub fn add_edge_no_dup(&mut self, x: T, y: T) {
  function has_edge (line 141) | pub fn has_edge<U, V>(&self, x: &U, y: &V) -> bool where U : Borrow<T>, ...
  function remove_edge (line 150) | pub fn remove_edge<U, V>(&mut self, x: &U, y: &V) where U : Borrow<T>, V...
  function node_count (line 159) | pub fn node_count(&self) -> usize {
  function transpose (line 166) | pub fn transpose(&self) -> Graph<T>
  method default (line 179) | fn default() -> Self {

FILE: src/graph/tarjan.rs
  type SCC (line 34) | pub struct SCC<'a, T>(pub HashSet<&'a T>);
  type SCCSummary (line 38) | pub struct SCCSummary<'a, T> {
  type Algorithm (line 43) | struct Algorithm<'a, T> {
  method eq (line 54) | fn eq(&self, other: &Self) -> bool {
  method default (line 60) | fn default() -> Self {
  function get_scc_by_id (line 76) | pub fn get_scc_by_id(&self, id: usize) -> Option<&SCC<'a, T>> {
  function get_scc_id (line 81) | pub fn get_scc_id(&self, node: &'a T) -> Option<usize> {
  function get_scc (line 86) | pub fn get_scc(&self, node: &'a T) -> Option<&SCC<'a, T>> {
  function is_in_same (line 93) | pub fn is_in_same(&self, a: &'a T, b: &'a T) -> bool {
  function count (line 104) | pub fn count(&self) -> usize {
  function new (line 113) | fn new(graph: &'a Graph<T>) -> Algorithm<'a, T> {
  function strongconnect (line 125) | fn strongconnect(&mut self, v: &'a T) {
  function from (line 159) | fn from(alg: Algorithm<'a, T>) -> SCCSummary<'a, T> {
  function find_scc (line 173) | pub fn find_scc<T>(graph: &Graph<T>) -> SCCSummary<'_, T>
  function build_scc_graph (line 193) | pub fn build_scc_graph<'a, 'b, T>(graph: &'a Graph<T>, summary: &'b SCCS...
  function scc_test_isolated (line 211) | fn scc_test_isolated() {
  function scc_test_path (line 223) | fn scc_test_path() {
  function scc_test_cycle_rhs (line 235) | fn scc_test_cycle_rhs() {
  function scc_test_cycle_lhs (line 247) | fn scc_test_cycle_lhs() {
  function scc_test_one_big_cycle (line 259) | fn scc_test_one_big_cycle() {
  function scc_test_two_connected_cycles (line 266) | fn scc_test_two_connected_cycles() {

FILE: src/graph/top_sort.rs
  type CycleInTopSortError (line 26) | pub struct CycleInTopSortError {}
  function top_sort (line 36) | pub fn top_sort<T>(graph: &Graph<T>) -> Result<Vec<&T>, CycleInTopSortEr...
  function test_top_sort_1 (line 65) | fn test_top_sort_1() {
  function test_top_sort_2 (line 73) | fn test_top_sort_2() {
  function test_top_sort_3 (line 81) | fn test_top_sort_3() {
  function test_top_sort_4 (line 90) | fn test_top_sort_4() {

FILE: src/ir/access_type.rs
  type AccessType (line 85) | pub enum AccessType {
    method closed (line 126) | pub fn closed(&self) -> AccessType {
    method requires_cell (line 156) | pub fn requires_cell(&self) -> bool {
    method is_written_to (line 163) | pub fn is_written_to(&self) -> bool {
  method join (line 173) | fn join(self, b: AccessType) -> AccessType {
  method meet (line 194) | fn meet(self, b: AccessType) -> AccessType {

FILE: src/ir/arglist/constructor.rs
  type ConstructorArgList (line 40) | pub struct ConstructorArgList {
    method into_gd_arglist (line 55) | pub fn into_gd_arglist(self, gen: &mut impl NameGenerator) -> (GDArgLi...
    method has_any_instance_fields (line 64) | pub fn has_any_instance_fields(&self) -> bool {
    method iter_vars (line 71) | pub fn iter_vars(&self) -> impl Iterator<Item = (&str, bool)> {
    method iter_vars_mut (line 77) | pub fn iter_vars_mut(&mut self) -> impl Iterator<Item = &mut (String, ...
    method parse (line 94) | pub fn parse<'a>(args: impl IntoIterator<Item = &'a AST>, pos: SourceO...
    method len (line 102) | pub fn len(&self) -> usize {
    method is_empty (line 107) | pub fn is_empty(&self) -> bool {
    type Error (line 127) | type Error = ArgListParseErrorF;
    method try_from (line 129) | fn try_from(arglist: GeneralArgList) -> Result<Self, Self::Error> {
  method from (line 114) | fn from(arglist: ConstructorArgList) -> GeneralArgList {

FILE: src/ir/arglist/error.rs
  type ArgListParseErrorF (line 30) | pub enum ArgListParseErrorF {
  type ArgListParseError (line 57) | pub struct ArgListParseError {
    method new (line 63) | pub fn new(value: ArgListParseErrorF, pos: SourceOffset) -> ArgListPar...
    method fmt (line 69) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type Item (line 97) | type Item = ArgListParseErrorF;
  method get_source (line 99) | fn get_source(&self) -> SourceOffset {
  method get_value (line 103) | fn get_value(&self) -> &ArgListParseErrorF {

FILE: src/ir/arglist/general.rs
  type GeneralArgList (line 32) | pub struct GeneralArgList {
    method empty (line 52) | pub fn empty() -> GeneralArgList {
  type GeneralArg (line 43) | pub struct GeneralArg {
    method simple (line 65) | pub fn simple(name: String) -> GeneralArg {
    method parse (line 72) | pub fn parse(ast: &AST) -> Result<GeneralArg, ArgListParseError> {
    method into_simple_name (line 93) | pub fn into_simple_name(self) -> Result<String, ArgListParseErrorF> {
  function parse_access_slot (line 107) | fn parse_access_slot(ast: &AST) -> Result<AccessSlotSyntax<'_>, ArgListP...
  function verify_self (line 113) | fn verify_self(ast: &AST) -> Result<(), ArgListParseError> {

FILE: src/ir/arglist/mod.rs
  function parse_ast (line 49) | fn parse_ast(input: &str) -> AST {
  function parse_arglist (line 53) | fn parse_arglist(input: &str) -> Result<ArgList, ArgListParseError> {
  function arglist (line 59) | fn arglist(req: Vec<&str>, opt: Vec<&str>, rest: Option<(&str, VarArg)>)...
  function gdarglist (line 67) | fn gdarglist(req: Vec<&str>) -> GDArgList {
  function into_gd (line 71) | fn into_gd(args: ArgList) -> (GDArgList, Vec<NameTrans>) {
  function test_parsing (line 77) | fn test_parsing() {
  function test_invalid_parse (line 90) | fn test_invalid_parse() {
  function test_arglist_gen (line 102) | fn test_arglist_gen() {

FILE: src/ir/arglist/ordinary.rs
  type ArgList (line 39) | pub struct ArgList {
    method empty (line 55) | pub fn empty() -> ArgList {
    method rest (line 66) | pub fn rest() -> ArgList {
    method required (line 76) | pub fn required(args: Vec<String>) -> ArgList {
    method from_specs (line 90) | pub fn from_specs(specs: FnSpecs) -> ArgList {
    method parse (line 100) | pub fn parse<'a>(args: impl IntoIterator<Item = &'a AST>, pos: SourceO...
    method into_gd_arglist (line 118) | pub fn into_gd_arglist(self, gen: &mut impl NameGenerator) -> (GDArgLi...
    method iter_vars (line 142) | pub fn iter_vars(&self) -> impl Iterator<Item = &str> {
    type Error (line 184) | type Error = ArgListParseErrorF;
    method try_from (line 186) | fn try_from(arglist: GeneralArgList) -> Result<Self, Self::Error> {
  method from (line 156) | fn from(arglist: ArgList) -> FnSpecs {
  method from (line 170) | fn from(arglist: ArgList) -> GeneralArgList {

FILE: src/ir/arglist/parser.rs
  type ParseState (line 35) | pub enum ParseState {
    constant START_STATE (line 96) | pub const START_STATE: ParseState =
    method state_transition (line 106) | pub fn state_transition(self, arg: &str) -> Option<ParseState> {
    method parse_once (line 117) | pub fn parse_once(&mut self, arglist: &mut GeneralArgList, arg: &AST) ...
    method parse_state_transition (line 149) | fn parse_state_transition(&mut self, arg: &AST) -> Result<bool, ArgLis...
  method partial_cmp (line 67) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
  function parse (line 179) | pub fn parse<'a>(args: impl IntoIterator<Item = &'a AST>)

FILE: src/ir/arglist/simple.rs
  type SimpleArgList (line 39) | pub struct SimpleArgList {
    method into_gd_arglist (line 49) | pub fn into_gd_arglist(self, gen: &mut impl NameGenerator) -> (GDArgLi...
    method iter_vars (line 55) | pub fn iter_vars(&self) -> impl Iterator<Item = &str> {
    method parse (line 63) | pub fn parse<'a>(args: impl IntoIterator<Item = &'a AST>, pos: SourceO...
    method len (line 71) | pub fn len(&self) -> usize {
    method is_empty (line 76) | pub fn is_empty(&self) -> bool {
    type Error (line 94) | type Error = ArgListParseErrorF;
    method try_from (line 96) | fn try_from(arglist: GeneralArgList) -> Result<Self, Self::Error> {
  method from (line 83) | fn from(arglist: SimpleArgList) -> GeneralArgList {
  method from (line 108) | fn from(arglist: SimpleArgList) -> ArgList {

FILE: src/ir/arglist/vararg.rs
  type VarArg (line 26) | pub enum VarArg {
    constant NONE (line 36) | pub const NONE: i32 = 0;
    method into_constant (line 41) | pub fn into_constant(self) -> i32 {
    method arg_to_const (line 50) | pub fn arg_to_const(opt: Option<VarArg>) -> i32 {

FILE: src/ir/bootstrapping.rs
  function compile_bootstrapping_decl (line 29) | pub fn compile_bootstrapping_decl(
  function compile_bootstrapping_class_inner_decl (line 57) | pub fn compile_bootstrapping_class_inner_decl(
  function compile_bootstrapping_expr (line 76) | pub fn compile_bootstrapping_expr(
  function bootstrap_constant_names (line 93) | fn bootstrap_constant_names(
  function declare_superglobal (line 102) | fn declare_superglobal(name: &str, pos: SourceOffset) -> Decl {
  function bootstrap_constant_enums (line 116) | fn bootstrap_constant_enums(
  function bootstrap_non_singletons (line 128) | fn bootstrap_non_singletons(
  function bootstrap_singletons (line 137) | fn bootstrap_singletons(
  function bootstrap_singleton_backing_types (line 146) | fn bootstrap_singleton_backing_types(

FILE: src/ir/call_name.rs
  type CallName (line 37) | pub enum CallName {
    method resolve_call_name (line 55) | pub fn resolve_call_name(icompiler: &mut IncCompiler,
    method into_expr (line 76) | pub fn into_expr(self,
    method try_resolve_method_name (line 103) | fn try_resolve_method_name(ast: &AST) -> Option<(&AST, &str)> {
    method try_resolve_atomic_name (line 116) | fn try_resolve_atomic_name(ast: &AST) -> Option<&str> {
  function parse_ast (line 141) | fn parse_ast(input: &str) -> AST {
  function dummy_config (line 145) | fn dummy_config() -> ProjectConfig {
  function dummy_pipeline (line 153) | fn dummy_pipeline() -> Pipeline {
  function resolve_call (line 157) | fn resolve_call(input: &str) -> Result<CallName, PError> {
  function simple_call_name (line 164) | fn simple_call_name() {
  function method_name (line 181) | fn method_name() {
  function super_name (line 187) | fn super_name() {
  function atomic_name (line 192) | fn atomic_name() {

FILE: src/ir/classification.rs
  type DetectedSuperCall (line 31) | pub struct DetectedSuperCall<'a> {
  constant DECL_HEADS (line 42) | pub const DECL_HEADS: [&str; 9] = [
  function is_decl (line 63) | pub fn is_decl(decl: &AST) -> bool {
  function detect_super (line 80) | pub fn detect_super<'a, 'b>(body: &'a [&'b AST]) -> (Option<DetectedSupe...
  function parse_ast (line 103) | fn parse_ast(input: &str) -> AST {
  function is_decl_test (line 108) | fn is_decl_test() {
  function is_not_decl_test (line 120) | fn is_not_decl_test() {

FILE: src/ir/closure_names.rs
  type ClosureNames (line 36) | pub struct ClosureNames<T : Lattice>(HashMap<String, (T, SourceOffset)>);
  function new (line 41) | pub fn new() -> Self {
  function from_hashmap (line 47) | pub fn from_hashmap(map: HashMap<String, (T, SourceOffset)>) -> Self {
  function get (line 54) | pub fn get(&self, name: &str) -> Option<&T> {
  function contains (line 60) | pub fn contains(&self, name: &str) -> bool {
  function visit (line 74) | pub fn visit(&mut self, name: String, usage: T, pos: SourceOffset) {
  function remove (line 83) | pub fn remove(&mut self, name: &str) -> Option<T> {
  function names (line 88) | pub fn names(&self) -> impl Iterator<Item=&str> {
  function into_names (line 94) | pub fn into_names(self) -> impl Iterator<Item=String> {
  function is_empty (line 99) | pub fn is_empty(&self) -> bool {
  function merge_with (line 106) | pub fn merge_with(&mut self, b: ClosureNames<T>) {
  function retain (line 114) | pub fn retain(&mut self, mut f: impl FnMut(&str, &mut T) -> bool) {
  function iter (line 121) | pub fn iter(&self) -> impl Iterator<Item=(&str, &T)> {
  function iter_mut (line 127) | pub fn iter_mut(&mut self) -> impl Iterator<Item=(&str, &mut T)> {
  function into_iter_with_offset (line 132) | pub fn into_iter_with_offset(self) -> impl Iterator<Item=(String, T, Sou...
  function iter_with_offset (line 137) | pub fn iter_with_offset(&self) -> impl Iterator<Item=(&str, &T, SourceOf...
  method default (line 144) | fn default() -> Self {

FILE: src/ir/decl.rs
  type TopLevel (line 40) | pub struct TopLevel {
    method new (line 233) | pub fn new() -> TopLevel {
    method find_main_class (line 241) | pub fn find_main_class(&self) -> Result<Option<&ClassDecl>, DuplicateM...
    method inner_exprs (line 271) | pub fn inner_exprs(&self) -> impl Iterator<Item=&Expr> + '_ {
  type DeclF (line 47) | pub enum DeclF {
  type Decl (line 58) | pub struct Decl {
    method new (line 279) | pub fn new(value: DeclF, pos: SourceOffset) -> Decl {
    method to_id (line 283) | pub fn to_id(&self) -> Id {
    method id_like (line 287) | pub fn id_like<'a>(&'a self) -> Box<dyn IdLike<NS=Namespace> + 'a> {
    method name (line 291) | pub fn name(&self) -> &str {
    method dependencies (line 304) | pub fn dependencies(&self) -> HashMap<Id, SourceOffset> {
    method is_macro (line 353) | pub fn is_macro(&self) -> bool {
    method is_exported_by_default (line 358) | pub fn is_exported_by_default(&self) -> bool {
    method namespace (line 364) | pub fn namespace(&self) -> Namespace {
    method visibility (line 376) | pub fn visibility(&self) -> Visibility {
    method visibility_mut (line 388) | pub fn visibility_mut(&mut self) -> &mut Visibility {
    method inner_exprs (line 400) | pub fn inner_exprs(&self) -> Box<dyn Iterator<Item=&Expr> + '_> {
  type FnDecl (line 64) | pub struct FnDecl {
  type MacroDecl (line 73) | pub struct MacroDecl {
    method from (line 702) | fn from(decl: SymbolMacroDecl) -> MacroDecl {
  type SymbolMacroDecl (line 81) | pub struct SymbolMacroDecl {
  type ConstDecl (line 88) | pub struct ConstDecl {
  type EnumDecl (line 95) | pub struct EnumDecl {
    method value_names (line 425) | pub fn value_names(&self) -> impl Iterator<Item=&str> {
  type ClassDecl (line 102) | pub struct ClassDecl {
    method new (line 433) | pub fn new(name: String, extends: String) -> ClassDecl {
    method constructor_or_default (line 448) | pub fn constructor_or_default(&self, default_pos: SourceOffset) -> Cow...
  type ConstructorDecl (line 112) | pub struct ConstructorDecl {
    method empty (line 458) | pub fn empty(pos: SourceOffset) -> ConstructorDecl {
    method dependencies (line 466) | pub fn dependencies(&self) -> HashMap<Id, SourceOffset> {
    method get_names (line 484) | pub fn get_names(&self) -> (Locals, Functions) {
  type SuperCall (line 119) | pub struct SuperCall {
    method empty (line 503) | pub fn empty(pos: SourceOffset) -> SuperCall {
  type ClassInnerDeclF (line 125) | pub enum ClassInnerDeclF {
  type ClassInnerDecl (line 133) | pub struct ClassInnerDecl {
    method new (line 511) | pub fn new(value: ClassInnerDeclF, pos: SourceOffset) -> ClassInnerDecl {
    method dependencies (line 515) | pub fn dependencies(&self) -> HashMap<Id, SourceOffset> {
    method name (line 531) | pub fn name(&self) -> Cow<str> {
    method namespace (line 540) | pub fn namespace(&self) -> ClassNamespace {
    method get_names (line 549) | pub fn get_names(&self) -> (Locals, Functions) {
    method is_static (line 574) | pub fn is_static(&self) -> bool {
    method inner_exprs (line 582) | pub fn inner_exprs(&self) -> Box<dyn Iterator<Item=&Expr> + '_> {
  type ClassSignalDecl (line 139) | pub struct ClassSignalDecl {
  type ClassVarDecl (line 145) | pub struct ClassVarDecl {
  type ClassFnDecl (line 153) | pub struct ClassFnDecl {
  type DeclareDecl (line 179) | pub struct DeclareDecl {
  type DeclareType (line 190) | pub enum DeclareType {
    method namespace (line 595) | pub fn namespace(&self) -> Namespace {
  type Export (line 211) | pub struct Export {
  type InstanceFunctionName (line 218) | pub enum InstanceFunctionName {
    method parse (line 623) | pub fn parse(ast: &AST) -> Option<InstanceFunctionName> {
    method method_name (line 648) | pub fn method_name(&self) -> Cow<str> {
    method is_constructor_function (line 659) | pub fn is_constructor_function(&self) -> bool {
  type DuplicateMainClassError (line 229) | pub struct DuplicateMainClassError(pub SourceOffset);
  type Item (line 670) | type Item = DeclF;
  method get_source (line 672) | fn get_source(&self) -> SourceOffset {
  method get_value (line 676) | fn get_value(&self) -> &DeclF {
  type Item (line 683) | type Item = ClassInnerDeclF;
  method get_source (line 685) | fn get_source(&self) -> SourceOffset {
  method get_value (line 689) | fn get_value(&self) -> &ClassInnerDeclF {
  method from (line 696) | fn from(d: DeclareType) -> Namespace {
  function from (line 713) | fn from(arg: (ClassDecl, Vec<Expr>)) -> expr::LambdaClass {
  function parse_ast (line 729) | fn parse_ast(input: &str) -> AST {
  function sample_class (line 733) | fn sample_class(class_name: &str, main_class: bool) -> ClassDecl {
  function find_main_class_test_1 (line 745) | fn find_main_class_test_1() {
  function find_main_class_test_2 (line 758) | fn find_main_class_test_2() {
  function find_main_class_test_3 (line 771) | fn find_main_class_test_3() {
  function find_main_class_test_4 (line 784) | fn find_main_class_test_4() {
  function find_main_class_test_5 (line 797) | fn find_main_class_test_5() {
  function parse_instance_function_name_test (line 812) | fn parse_instance_function_name_test() {
  function parse_instance_function_name_failures_test (line 829) | fn parse_instance_function_name_failures_test() {
  function is_constructor_name_test (line 841) | fn is_constructor_name_test() {

FILE: src/ir/declaration_table.rs
  type DeclarationTable (line 37) | pub struct DeclarationTable {
    method new (line 45) | pub fn new() -> DeclarationTable {
    method get (line 50) | pub fn get<'a>(&self, id: &(dyn IdLike<NS=Namespace> + 'a)) -> Option<...
    method add (line 59) | pub fn add(&mut self, value: Decl) -> Option<Decl> {
    method add_unless_exists (line 76) | pub fn add_unless_exists(&mut self, value: Decl) -> Result<(), GDError> {
    method del (line 90) | pub fn del<'a>(&mut self, id: &(dyn IdLike<NS=Namespace> + 'a)) -> Opt...
    method has (line 108) | pub fn has<'a>(&self, id: &(dyn IdLike<NS=Namespace> + 'a)) -> bool {
    method filter (line 115) | pub fn filter(&self, condition: impl FnMut(&Decl) -> bool) -> Declarat...
    method iter (line 122) | pub fn iter(&self) -> impl Iterator<Item=&Decl> {
    method from (line 138) | fn from(decls: Vec<Decl>) -> DeclarationTable {
  function from (line 130) | fn from(table: DeclarationTable) -> Vec<Decl> {

FILE: src/ir/depends.rs
  type Dependencies (line 26) | pub struct Dependencies {
    method identify (line 39) | pub fn identify<'a>(table: &DeclarationTable,
    method purge_unknowns (line 84) | pub fn purge_unknowns<'a, 'b, I>(&mut self, purge: I)
    method try_into_knowns (line 92) | pub fn try_into_knowns(self) -> Result<HashSet<Id>, DependencyError> {
  type DependencyError (line 33) | pub enum DependencyError {

FILE: src/ir/export.rs
  type Visibility (line 28) | pub enum Visibility { Public, Private }
    constant FUNCTION (line 33) | pub const FUNCTION: Visibility = Visibility::Public;
    constant MACRO (line 36) | pub const MACRO: Visibility = Visibility::Public;
    constant SYMBOL_MACRO (line 39) | pub const SYMBOL_MACRO: Visibility = Visibility::Public;
    constant CONST (line 42) | pub const CONST: Visibility = Visibility::Public;
    constant CLASS (line 45) | pub const CLASS: Visibility = Visibility::Public;
    constant OBJECT (line 48) | pub const OBJECT: Visibility = Visibility::Public;
    constant ENUM (line 51) | pub const ENUM: Visibility = Visibility::Public;
    constant DECLARE (line 54) | pub const DECLARE: Visibility = Visibility::Private;
  function get_export_list (line 60) | pub fn get_export_list<'a>(decls: impl IntoIterator<Item=&'a Decl>) -> V...

FILE: src/ir/expr.rs
  constant DEFAULT_SPLIT_NAME (line 36) | pub const DEFAULT_SPLIT_NAME: &str = "_split";
  type ExprF (line 39) | pub enum ExprF {
    method from (line 545) | fn from(value: T) -> ExprF {
  type Expr (line 67) | pub struct Expr {
    method new (line 170) | pub fn new(value: ExprF, pos: SourceOffset) -> Expr {
    method var (line 174) | pub fn var(name: impl Into<String>, pos: SourceOffset) -> Expr {
    method atomic_var (line 178) | pub fn atomic_var(name: impl Into<String>, pos: SourceOffset) -> Expr {
    method while_stmt (line 182) | pub fn while_stmt(cond: Expr, body: Expr, pos: SourceOffset) -> Expr {
    method for_stmt (line 186) | pub fn for_stmt(name: String, iter: Expr, body: Expr, pos: SourceOffse...
    method literal (line 190) | pub fn literal(literal: literal::Literal, pos: SourceOffset) -> Expr {
    method nil (line 194) | pub fn nil(pos: SourceOffset) -> Expr {
    method progn (line 198) | pub fn progn(body: Vec<Expr>, pos: SourceOffset) -> Expr {
    method call (line 202) | pub fn call(name: impl Into<String>, args: Vec<Expr>, pos: SourceOffse...
    method atomic_call (line 206) | pub fn atomic_call(name: impl Into<String>, args: Vec<Expr>, pos: Sour...
    method super_call (line 210) | pub fn super_call(name: impl Into<String>, args: Vec<Expr>, pos: Sourc...
    method method_call (line 214) | pub fn method_call(self, name: impl Into<String>, args: Vec<Expr>, pos...
    method yield_none (line 218) | pub fn yield_none(pos: SourceOffset) -> Expr {
    method yield_some (line 222) | pub fn yield_some(lhs: Expr, rhs: Expr, pos: SourceOffset) -> Expr {
    method assert_expr (line 226) | pub fn assert_expr(cond: Expr, message: Option<Expr>, pos: SourceOffse...
    method as_plain_name (line 232) | pub fn as_plain_name(&self) -> Option<&str> {
    method from_ast_literal (line 242) | pub fn from_ast_literal(ast_literal: &ASTLiteral, pos: SourceOffset) -...
    method self_evaluating_lambda (line 274) | pub fn self_evaluating_lambda(self) -> Expr {
    method from_value (line 283) | pub fn from_value<T>(value: T, pos: SourceOffset) -> Expr
    method named_split (line 288) | pub fn named_split(self, name: &str, pos: SourceOffset) -> Expr {
    method split (line 292) | pub fn split(self, pos: SourceOffset) -> Expr {
    method walk_locals (line 296) | fn walk_locals(&self, acc_vars: &mut Locals, acc_fns: &mut Functions) {
    method get_locals (line 495) | pub fn get_locals(&self) -> Locals {
    method get_functions (line 501) | pub fn get_functions(&self) -> Functions {
    method get_names (line 505) | pub fn get_names(&self) -> (Locals, Functions) {
    method get_ids (line 512) | pub fn get_ids(&self) -> impl Iterator<Item=(Id, SourceOffset)> {
  type AssignTarget (line 73) | pub enum AssignTarget {
  type CallTarget (line 80) | pub enum CallTarget {
  type BareName (line 103) | pub enum BareName {
    method to_gd_name (line 552) | pub fn to_gd_name(&self) -> String {
    method to_gd_name_bare (line 559) | pub fn to_gd_name_bare(&self) -> String {
  type FuncRefTarget (line 112) | pub enum FuncRefTarget {
  type FunctionBindingType (line 119) | pub enum FunctionBindingType {
    method into_local_binding (line 575) | pub fn into_local_binding(self) -> Box<dyn local_binding::LocalBinding> {
  type LambdaClass (line 134) | pub struct LambdaClass {
    method constructor_or_default (line 524) | pub fn constructor_or_default(&self, default_pos: SourceOffset) -> Cow...
  type LocalFnClause (line 142) | pub struct LocalFnClause {
  type LocalVarClause (line 149) | pub struct LocalVarClause {
  type Locals (line 156) | pub type Locals = ClosureNames<AccessType>;
  type Functions (line 166) | pub type Functions = ClosureNames<()>;
  type Item (line 531) | type Item = ExprF;
  method get_source (line 533) | fn get_source(&self) -> SourceOffset {
  method get_value (line 537) | fn get_value(&self) -> &ExprF {
  function lhash (line 589) | fn lhash(vec: Vec<String>) -> Locals {
  function lhash_rw (line 593) | fn lhash_rw(vec: Vec<(String, AccessType)>) -> Locals {
  function fhash (line 597) | fn fhash(vec: Vec<String>) -> Functions {
  function lvc (line 601) | fn lvc(name: &str, value: Expr) -> LocalVarClause {
  function e (line 611) | fn e(expr: ExprF) -> Expr {
  function test_locals_simple (line 616) | fn test_locals_simple() {
  function test_locals_compound (line 625) | fn test_locals_compound() {
  function test_locals_super_call (line 632) | fn test_locals_super_call() {
  function test_locals_let (line 638) | fn test_locals_let() {
  function test_locals_assignment (line 668) | fn test_locals_assignment() {
  function test_locals_slot_assignment (line 695) | fn test_locals_slot_assignment() {
  function test_functions_trivial (line 716) | fn test_functions_trivial() {
  function test_functions_calls (line 722) | fn test_functions_calls() {
  function test_functions_ref (line 728) | fn test_functions_ref() {
  function test_function_binding_type_local_binding_inverse (line 734) | fn test_function_binding_type_local_binding_inverse() {

FILE: src/ir/identifier.rs
  type Id (line 29) | pub struct Id {
    method new (line 109) | pub fn new(namespace: Namespace, name: String) -> Self {
    method build (line 116) | pub fn build<'a, NS: Clone + 'a>(namespace: NS, name: &'a str) -> Box<...
    method borrow (line 186) | fn borrow(&self) -> &(dyn IdLike<NS=Namespace> + 'a) {
  type Namespace (line 39) | pub enum Namespace {
    method name (line 124) | pub fn name(self) -> &'static str {
  type ClassNamespace (line 55) | pub enum ClassNamespace {
    method from (line 97) | fn from(ns: Namespace) -> ClassNamespace {
    method name (line 133) | pub fn name(self) -> &'static str {
  type IdLike (line 80) | pub trait IdLike {
    method namespace (line 88) | fn namespace(&self) -> Self::NS;
    method name (line 91) | fn name(&self) -> &str;
    type NS (line 145) | type NS = Namespace;
    method namespace (line 147) | fn namespace(&self) -> Namespace {
    method name (line 151) | fn name(&self) -> &str {
    type NS (line 159) | type NS = NS;
    method namespace (line 161) | fn namespace(&self) -> NS {
    method name (line 165) | fn name(&self) -> &str {
    type NS (line 173) | type NS = NS;
    method namespace (line 175) | fn namespace(&self) -> NS {
    method name (line 179) | fn name(&self) -> &str {
  function borrow (line 192) | fn borrow(&self) -> &(dyn IdLike<NS=NS> + 'a) {
  method hash (line 198) | fn hash<H : Hasher>(&self, state: &mut H) {
  method eq (line 205) | fn eq(&self, other: &Self) -> bool {
  type Owned (line 213) | type Owned = Id;
  method to_owned (line 214) | fn to_owned(&self) -> Id {
  function test_id_in_hashmap (line 225) | fn test_id_in_hashmap() {
  function test_id_in_hashset (line 232) | fn test_id_in_hashset() {

FILE: src/ir/import.rs
  type ImportDecl (line 52) | pub struct ImportDecl {
    method default_import_name (line 89) | pub fn default_import_name(path: &RPathBuf) -> String {
    method parse_path_param (line 100) | pub fn parse_path_param(arg: &str) -> Option<RPathBuf> {
    method named (line 107) | pub fn named(filename: RPathBuf, name: Option<String>, pos: SourceOffs...
    method restricted (line 116) | pub fn restricted(filename: RPathBuf, imports: Vec<ImportName<Option<N...
    method open (line 124) | pub fn open(filename: RPathBuf, pos: SourceOffset) -> ImportDecl {
    method names (line 132) | pub fn names(&self, exports: &[Id]) -> Vec<ImportName<Namespace>> {
    method parse (line 155) | pub fn parse(tail: &[&AST]) -> Result<ImportDecl, ImportDeclParseError> {
  type ImportDetails (line 59) | pub enum ImportDetails {
  type ImportName (line 66) | pub struct ImportName<NS> {
  type ImportDeclParseError (line 73) | pub enum ImportDeclParseError {
    method fmt (line 309) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type ImportNameResolutionError (line 82) | pub enum ImportNameResolutionError {
    method fmt (line 331) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  function new (line 210) | pub fn new(namespace: NS, in_name: String, out_name: String) -> ImportNa...
  function simple (line 214) | pub fn simple(namespace: NS, in_name: String) -> ImportName<NS> {
  function symbol_to_namespace (line 219) | fn symbol_to_namespace(symbol: &str, pos: SourceOffset) -> Result<Namesp...
  function parse (line 227) | pub fn parse(clause: &AST) -> Result<ImportName<Option<Namespace>>, Impo...
  function refine (line 265) | pub fn refine(&self, exports: &[Id]) -> Result<ImportName<Namespace>, Im...
  function into_imported_id (line 285) | pub fn into_imported_id(self) -> Id {
  function into_exported_id (line 289) | pub fn into_exported_id(self) -> Id {
  function to_imported_id (line 293) | pub fn to_imported_id<'a>(&'a self) -> Box<dyn IdLike<NS=Namespace> + 'a> {
  function to_exported_id (line 297) | pub fn to_exported_id<'a>(&'a self) -> Box<dyn IdLike<NS=Namespace> + 'a> {
  function invalid_ending_err (line 303) | fn invalid_ending_err(tail: &[&AST], pos: SourceOffset) -> ImportDeclPar...
  function parse_ast (line 350) | fn parse_ast(input: &str) -> AST {
  function parse_import (line 354) | fn parse_import(input: &str) -> Result<ImportDecl, ImportDeclParseError> {
  function str_to_rpathbuf (line 360) | fn str_to_rpathbuf(input: &str) -> RPathBuf {
  function so (line 364) | fn so(x: usize) -> SourceOffset {
  function default_import_name_test_relative (line 369) | fn default_import_name_test_relative() {
  function default_import_name_test_absolute_windows (line 378) | fn default_import_name_test_absolute_windows() {
  function default_import_name_test_absolute_unix (line 385) | fn default_import_name_test_absolute_unix() {
  function test_parsing (line 391) | fn test_parsing() {
  function test_invalid_parsing (line 424) | fn test_invalid_parsing() {

FILE: src/ir/incremental.rs
  type IncCompiler (line 67) | pub struct IncCompiler {
    method new (line 79) | pub fn new(names: Vec<&str>) -> IncCompiler {
    method with_ambient_symbols (line 83) | pub fn with_ambient_symbols(names: Vec<&str>, ambient_symbols: SymbolT...
    method resolve_macro_call (line 95) | fn resolve_macro_call<K: IdLike>(&mut self,
    method try_resolve_macro_call (line 136) | fn try_resolve_macro_call(&mut self, pipeline: &mut Pipeline, ast: &AS...
    method try_resolve_symbol_macro_call (line 154) | fn try_resolve_symbol_macro_call(&mut self, pipeline: &mut Pipeline, h...
    method resolve_simple_call (line 162) | pub fn resolve_simple_call(&mut self, pipeline: &mut Pipeline, head: &...
    method compile_expr (line 176) | pub fn compile_expr(&mut self, pipeline: &mut Pipeline, expr: &AST) ->...
    method compile_decl (line 203) | pub fn compile_decl(&mut self,
    method compile_class_inner_decl (line 423) | pub fn compile_class_inner_decl(&mut self,
    method compile_import (line 604) | pub fn compile_import(&mut self, curr: &AST) -> Result<Option<ImportDe...
    method import_macros_from (line 613) | fn import_macros_from(&mut self, unit: &TranslationUnit, import: &Impo...
    method compile_decl_or_expr (line 622) | fn compile_decl_or_expr(&mut self, pipeline: &mut Pipeline, main: &mut...
    method compile_toplevel (line 667) | pub fn compile_toplevel(mut self, pipeline: &mut Pipeline, body: &AST,...
    method bind_macro (line 690) | pub fn bind_macro(&mut self, pipeline: &mut Pipeline, mut decl: decl::...
    method locally_save_macro (line 768) | pub fn locally_save_macro<B, K>(&mut self, name: &K, func: impl FnOnce...
    method has_macro (line 779) | pub fn has_macro<K>(&self, name: &K) -> bool
    method unbind_macro (line 785) | pub fn unbind_macro<K>(&mut self, name: &K)
    method bind_builtin_macros (line 791) | pub fn bind_builtin_macros(&mut self, pipeline: &mut Pipeline) {
    method bind_macros_from (line 797) | pub fn bind_macros_from(&mut self, existing_macros: impl IntoIterator<...
    method declaration_table (line 801) | pub fn declaration_table(&mut self) -> &mut DeclarationTable {
    method mark_as_minimalist (line 805) | pub fn mark_as_minimalist(&mut self) {
    method name_generator (line 809) | pub fn name_generator(&mut self) -> &mut FreshNameGenerator {
    method get_declare_decl_name (line 825) | fn get_declare_decl_name(form: &AST) -> Result<(String, Option<String>...
  function from (line 857) | fn from(compiler: IncCompiler) -> (decl::TopLevel, HashMap<Id, MacroData...
  function dummy_config (line 881) | fn dummy_config() -> ProjectConfig {
  function dummy_pipeline (line 889) | fn dummy_pipeline() -> Pipeline {
  function bad_call_test (line 894) | fn bad_call_test() {

FILE: src/ir/literal.rs
  type Literal (line 24) | pub enum Literal {
    method from (line 34) | fn from(value: i32) -> Literal {
    method from (line 40) | fn from(value: OrderedFloat<f32>) -> Literal {
    method from (line 46) | fn from(value: String) -> Literal {
    method from (line 52) | fn from(value: &'a str) -> Literal {
    method from (line 58) | fn from(value: bool) -> Literal {

FILE: src/ir/loops/error.rs
  type LoopPrimitiveErrorF (line 28) | pub struct LoopPrimitiveErrorF {
  type LoopPrimitiveError (line 40) | pub struct LoopPrimitiveError {
    method new (line 52) | pub fn new(value: LoopPrimitiveErrorF, pos: SourceOffset) -> LoopPrimi...
    method break_error (line 56) | pub fn break_error(pos: SourceOffset) -> LoopPrimitiveError {
    method continue_error (line 63) | pub fn continue_error(pos: SourceOffset) -> LoopPrimitiveError {
    method in_closure (line 70) | pub fn in_closure(mut self) -> Self {
    method fmt (line 91) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type LoopPrimitive (line 46) | pub enum LoopPrimitive {
    method fmt (line 102) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type Item (line 78) | type Item = LoopPrimitiveErrorF;
  method get_source (line 80) | fn get_source(&self) -> SourceOffset {
  method get_value (line 84) | fn get_value(&self) -> &LoopPrimitiveErrorF {

FILE: src/ir/loops/mod.rs
  type LoopWalker (line 29) | enum LoopWalker {
    method new (line 60) | fn new() -> Self {
    method enter_loop (line 64) | fn enter_loop(self) -> Self {
    method enter_closure (line 68) | fn enter_closure(self) -> Self {
    method check (line 77) | fn check(self, expr: &Expr) -> Result<(), LoopPrimitiveError> {
    method check_loop_primitive (line 200) | fn check_loop_primitive(self, primitive: LoopPrimitive, pos: SourceOff...
  function check_expr (line 47) | pub fn check_expr(expr: &Expr) -> Result<(), LoopPrimitiveError> {
  function check_all_exprs (line 51) | pub fn check_all_exprs(toplevel: &TopLevel) -> Result<(), LoopPrimitiveE...

FILE: src/ir/macros.rs
  type MacroData (line 45) | pub struct MacroData {
    method to_imported (line 61) | pub fn to_imported(&self) -> MacroData {
  function make_tmp (line 51) | fn make_tmp() -> io::Result<NamedTempFile> {
  function create_macro_file (line 69) | pub fn create_macro_file(pipeline: &mut Pipeline, imports: Vec<ImportDec...

FILE: src/ir/main_function.rs
  type DisallowMainFunctionHandler (line 32) | pub struct DisallowMainFunctionHandler;
  type StaticMainFunctionHandler (line 43) | pub struct StaticMainFunctionHandler {
    method new (line 77) | pub fn new(function_name: String) -> Self {
  type MainFunctionHandler (line 57) | pub trait MainFunctionHandler {
    method handle_main (line 59) | fn handle_main(&self, icompiler: &mut IncCompiler, main: &[Expr]) -> R...
    method handle_main (line 65) | fn handle_main(&self, _icompiler: &mut IncCompiler, main: &[Expr]) -> ...
    method handle_main (line 85) | fn handle_main(&self, icompiler: &mut IncCompiler, main: &[Expr]) -> R...

FILE: src/ir/mod.rs
  function compile_toplevel (line 61) | pub fn compile_toplevel(pipeline: &mut Pipeline, body: &AST, main_functi...
  function compile_and_check (line 67) | pub fn compile_and_check(pipeline: &mut Pipeline, body: &AST, main_funct...
  function check_ir (line 74) | pub fn check_ir(ir: &decl::TopLevel) -> Result<(), GDError> {
  function int (line 96) | fn int(n: i32) -> AST {
  function symbol (line 100) | fn symbol(s: &str) -> AST {
  function string (line 105) | fn string(s: &str) -> AST {
  function nil (line 109) | fn nil() -> AST {
  function cons (line 114) | fn cons(a: AST, b: AST) -> AST {
  function list (line 118) | fn list(data: Vec<AST>) -> AST {
  function call (line 122) | fn call(name: &str, args: Vec<Expr>) -> Expr {
  function literal (line 126) | fn literal(literal: Literal) -> Expr {
  function progn (line 130) | fn progn(body: Vec<Expr>) -> Expr {
  function compile_expr (line 134) | fn compile_expr(pipeline: &mut Pipeline, expr: &AST)
  function compile_decl (line 141) | fn compile_decl(pipeline: &mut Pipeline, decl: &AST)
  function do_compile_expr (line 151) | fn do_compile_expr(expr: &AST) -> Result<Expr, PError> {
  function do_compile_decl (line 156) | fn do_compile_decl(decl: &AST) -> Result<Decl, PError> {
  function compile_call (line 162) | fn compile_call() {
  function compile_builtin (line 172) | fn compile_builtin() {
  function compile_int (line 180) | fn compile_int() {
  function compile_nil (line 186) | fn compile_nil() {
  function compile_progn (line 191) | fn compile_progn() {
  function compile_defn (line 201) | fn compile_defn() {
  function compile_defmacro (line 217) | fn compile_defmacro() {
  function compile_set (line 232) | fn compile_set() {

FILE: src/ir/modifier/class.rs
  type ClassMod (line 27) | pub enum ClassMod {
    method apply (line 37) | pub fn apply(&self, decl: &mut ClassDecl) {
  function parser (line 50) | pub fn parser() -> impl ParseRule<Modifier=ClassMod> {

FILE: src/ir/modifier/constant.rs
  type ConstMod (line 27) | pub enum ConstMod {
    method apply (line 34) | pub fn apply(&self, decl: &mut ConstDecl) {
  function parser (line 44) | pub fn parser() -> impl ParseRule<Modifier=ConstMod> {

FILE: src/ir/modifier/declare.rs
  type DeclareMod (line 27) | pub enum DeclareMod {
    method apply (line 34) | pub fn apply(&self, decl: &mut DeclareDecl) {
  function parser (line 44) | pub fn parser() -> impl ParseRule<Modifier=DeclareMod> {

FILE: src/ir/modifier/enums.rs
  type EnumMod (line 27) | pub enum EnumMod {
    method apply (line 34) | pub fn apply(&self, decl: &mut EnumDecl) {
  function parser (line 44) | pub fn parser() -> impl ParseRule<Modifier=EnumMod> {

FILE: src/ir/modifier/file.rs
  type FileMod (line 29) | pub enum FileMod {
    method apply (line 46) | pub fn apply(&self, icompiler: &mut IncCompiler) {
  type NoStdLibParser (line 41) | pub struct NoStdLibParser;
  type Modifier (line 57) | type Modifier = ();
  method name (line 59) | fn name(&self) -> &str {
  method parse_once (line 63) | fn parse_once(&mut self, ast: &AST) -> Result<(), ParseError> {
  function file_error (line 78) | fn file_error(ast: &AST) -> ParseError {
  function parser (line 83) | pub fn parser() -> impl ParseRule<Modifier=FileMod> {

FILE: src/ir/modifier/function.rs
  type FnMod (line 32) | pub enum FnMod {
    method apply (line 41) | pub fn apply(&self, decl: &mut FnDecl) {
  function parser (line 54) | pub fn parser() -> impl ParseRule<Modifier=FnMod> {

FILE: src/ir/modifier/instance_method.rs
  type MethodMod (line 28) | pub enum MethodMod {
    method apply (line 40) | pub fn apply(&self, decl: &mut ClassFnDecl) {
    method apply_to_constructor (line 54) | pub fn apply_to_constructor(&self, decl: &mut ConstructorDecl) -> Resu...
  function parser (line 67) | pub fn parser() -> impl ParseRule<Modifier=MethodMod> {

FILE: src/ir/modifier/macros.rs
  type MacroMod (line 27) | pub enum MacroMod {
    method apply (line 33) | pub fn apply(&self, decl: &mut MacroDecl) {
    method apply_to_symbol_macro (line 41) | pub fn apply_to_symbol_macro(&self, decl: &mut SymbolMacroDecl) {
  function parser (line 51) | pub fn parser() -> impl ParseRule<Modifier=MacroMod> {

FILE: src/ir/modifier/magic.rs
  type MagicParser (line 35) | pub struct MagicParser;
  type Modifier (line 38) | type Modifier = String;
  method name (line 40) | fn name(&self) -> &str {
  method parse_once (line 44) | fn parse_once(&mut self, ast: &AST) -> Result<String, ParseError> {
  function magic_error (line 61) | fn magic_error(ast: &AST) -> ParseError {
  function parser (line 66) | pub fn parser() -> impl ParseRule<Modifier=String> {

FILE: src/ir/modifier/mod.rs
  type Constant (line 49) | pub struct Constant<M> {
  type Several (line 60) | pub struct Several<'a, M> {
  type Map (line 72) | pub struct Map<R, F> {
  type Unique (line 81) | pub struct Unique<R> {
  type ParseErrorF (line 95) | pub enum ParseErrorF {
  type ParseError (line 109) | pub struct ParseError {
    method new (line 178) | pub fn new(value: ParseErrorF, pos: SourceOffset) -> ParseError {
    method is_fatal (line 185) | pub fn is_fatal(&self) -> bool {
    method fmt (line 209) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type ParseRule (line 117) | pub trait ParseRule {
    method parse_once (line 125) | fn parse_once(&mut self, ast: &AST) -> Result<Self::Modifier, ParseErr...
    method name (line 129) | fn name(&self) -> &str;
    method parse (line 139) | fn parse<'a, 'b>(&mut self, args: &'a [&'b AST]) -> Result<(Vec<Self::...
    method map (line 159) | fn map<N, F>(self, f: F) -> Map<Self, F>
    method unique (line 169) | fn unique(self) -> Unique<Self>
    type Modifier (line 233) | type Modifier = M;
    method parse_once (line 235) | fn parse_once(&mut self, ast: &AST) -> Result<M, ParseError> {
    method name (line 243) | fn name(&self) -> &str {
    type Modifier (line 264) | type Modifier = M;
    method parse_once (line 266) | fn parse_once(&mut self, ast: &AST) -> Result<M, ParseError> {
    method name (line 283) | fn name(&self) -> &str {
    type Modifier (line 292) | type Modifier = N;
    method parse_once (line 294) | fn parse_once(&mut self, ast: &AST) -> Result<N, ParseError> {
    method name (line 299) | fn name(&self) -> &str {
    type Modifier (line 307) | type Modifier = R::Modifier;
    method parse_once (line 309) | fn parse_once(&mut self, ast: &AST) -> Result<Self::Modifier, ParseErr...
    method name (line 319) | fn name(&self) -> &str {
  type Item (line 196) | type Item = ParseErrorF;
  method get_source (line 198) | fn get_source(&self) -> SourceOffset {
  method get_value (line 202) | fn get_value(&self) -> &ParseErrorF {
  function new (line 224) | pub fn new(symbol_value: &str, result: M) -> Constant<M> {
  function new (line 251) | pub fn new(values: Vec<Box<dyn ParseRule<Modifier=M> + 'a>>) -> Several<...
  function named (line 256) | pub fn named(mut self, name: &str) -> Self {

FILE: src/ir/modifier/var.rs
  type VarMod (line 27) | pub enum VarMod {
    method apply (line 34) | pub fn apply(&self, decl: &mut ClassVarDecl) {
  function parser (line 44) | pub fn parser() -> impl ParseRule<Modifier=VarMod> {

FILE: src/ir/modifier/visibility.rs
  function parser (line 28) | pub fn parser() -> impl ParseRule<Modifier=Visibility> {

FILE: src/ir/quasiquote.rs
  type QQSpliced (line 33) | enum QQSpliced {
    method into_single (line 75) | fn into_single(self, ast: &AST) -> Result<Expr, GDError> {
  type UnquotedValue (line 52) | enum UnquotedValue<'a> {
  function verbatim (line 88) | fn verbatim(arg: &'a AST) -> UnquotedValue<'a> {
  function parse (line 112) | fn parse(arg: &'a AST) -> UnquotedValue<'a> {
  function quasiquote (line 133) | pub fn quasiquote(icompiler: &mut IncCompiler,
  function quasiquote_with_depth (line 140) | pub fn quasiquote_with_depth(icompiler: &mut IncCompiler,
  type QuasiquoteEngine (line 158) | struct QuasiquoteEngine<'a, 'b> {
  function new (line 175) | fn new(icompiler: &'a mut IncCompiler, pipeline: &'b mut Pipeline, max_d...
  function quasiquote_indexed (line 186) | fn quasiquote_indexed(&mut self,
  function quasiquote_spliced (line 210) | fn quasiquote_spliced(&mut self,

FILE: src/ir/scope/decl.rs
  type ClassNamespaceAdaptor (line 46) | pub struct ClassNamespaceAdaptor<'a, T>(pub &'a T);
  type DeclScope (line 53) | pub trait DeclScope<NS: Hash + Eq + Clone> {
    method get_scope_names (line 57) | fn get_scope_names(&self) -> Result<NameTable<NS>, ScopeError<NS>>;
  function get_scope_names (line 64) | fn get_scope_names(&self) -> Result<NameTable<ClassNamespace>, ScopeErro...
  method get_scope_names (line 80) | fn get_scope_names(&self) -> Result<NameTable<Namespace>, ScopeError<Nam...
  method get_scope_names (line 94) | fn get_scope_names(&self) -> Result<NameTable<ClassNamespace>, ScopeErro...
  method get_scope_names (line 115) | fn get_scope_names(&self) -> Result<NameTable<ClassNamespace>, ScopeErro...
  function get_scope_names (line 136) | fn get_scope_names(&self) -> Result<NameTable<NS>, ScopeError<NS>> {
  function get_all_decl_scopes (line 150) | pub fn get_all_decl_scopes<'a>(toplevel: &'a TopLevel) -> Vec<Box<dyn De...
  function check_all_decl_scopes (line 181) | pub fn check_all_decl_scopes(toplevel: &TopLevel) -> Result<(), ScopeErr...
  function on_each_lambda_class (line 190) | pub fn on_each_lambda_class<E, F>(decls: &[Decl], mut block: F) -> Resul...

FILE: src/ir/scope/error.rs
  type ScopeError (line 30) | pub enum ScopeError<NS> {
  function from (line 38) | fn from(error: ScopeError<Namespace>) -> ScopeError<ClassNamespace> {

FILE: src/ir/scope/mod.rs
  type ConcreteNamesAdaptor (line 33) | struct ConcreteNamesAdaptor<'a>(&'a TopLevel);
  function check_scopes (line 37) | pub fn check_scopes(toplevel: &TopLevel) -> Result<(),  GDError> {
  function check_main_class_conflicts (line 48) | pub fn check_main_class_conflicts(toplevel: &TopLevel) -> Result<(), GDE...
  function get_scope_names (line 81) | fn get_scope_names(&self) -> Result<NameTable<Namespace>, ScopeError<Nam...
  function is_declare_decl (line 95) | fn is_declare_decl(decl: &Decl) -> bool {

FILE: src/ir/scope/name_table/builder.rs
  type NameTableBuilder (line 30) | pub struct NameTableBuilder<NS: Hash + Eq + Clone> {
  function new (line 37) | pub fn new() -> NameTableBuilder<NS> {
  function add_name (line 46) | pub fn add_name(&mut self, namespace: NS, name: String, pos: SourceOffse...
  function build (line 66) | pub fn build(self) -> NameTable<NS> {
  method default (line 73) | fn default() -> NameTableBuilder<NS> {

FILE: src/ir/scope/name_table/mod.rs
  type NameTable (line 33) | pub struct NameTable<NS: Hash + Eq + Clone> {
  function new (line 40) | pub fn new() -> NameTable<NS> {
  function get_name (line 46) | pub fn get_name(&self, namespace: NS, name: &str) -> Option<SourceOffset> {
  function has_name (line 54) | pub fn has_name(&self, namespace: NS, name: &str) -> bool {
  function add_name (line 63) | pub fn add_name(&mut self, namespace: NS, name: String, pos: SourceOffse...
  function len (line 68) | pub fn len(&self) -> usize {
  function is_empty (line 73) | pub fn is_empty(&self) -> bool {
  function map_ns (line 87) | pub fn map_ns<NS1: Hash + Eq + Clone>(self, mut function: impl FnMut(NS)...
  function retain (line 95) | pub fn retain<F>(&mut self, mut f: F)
  function iter (line 100) | pub fn iter(&self) -> impl Iterator<Item=(NS, &str, SourceOffset)> {
  method default (line 108) | fn default() -> NameTable<NS> {
  function empty_table (line 120) | fn empty_table() {
  function table_insert_names (line 126) | fn table_insert_names() {
  function table_crossed_namespaces (line 136) | fn table_crossed_namespaces() {
  function table_duplicate_name_different_namespace (line 146) | fn table_duplicate_name_different_namespace() {
  function table_duplicate_name_same_namespace (line 154) | fn table_duplicate_name_same_namespace() {
  function table_map_ns (line 162) | fn table_map_ns() {
  function table_map_ns_collision (line 178) | fn table_map_ns_collision() {

FILE: src/ir/special_form/access_slot.rs
  type AccessSlotSyntax (line 27) | pub struct AccessSlotSyntax<'a> {
  constant ACCESS_SLOT_FORM_NAME (line 32) | pub const ACCESS_SLOT_FORM_NAME: &str = "access-slot";
  function parse_ast (line 36) | pub fn parse_ast(ast: &'a AST) -> Result<Self, GDError> {
  function parse_from_tail (line 48) | pub fn parse_from_tail(tail: &[&'a AST], pos: SourceOffset) -> Result<Se...

FILE: src/ir/special_form/assignment.rs
  type AssignmentForm (line 24) | pub enum AssignmentForm {
    method str_to_setter_prefix (line 31) | pub fn str_to_setter_prefix(name: &str) -> String {
    method into_expr (line 35) | pub fn into_expr(self, rhs: Expr, pos: SourceOffset) -> Expr {

FILE: src/ir/special_form/local_binding.rs
  type FLetLocalBinding (line 29) | pub struct FLetLocalBinding;
  type LabelsLocalBinding (line 30) | pub struct LabelsLocalBinding;
  type LocalBinding (line 32) | pub trait LocalBinding {
    method function_binding_type (line 33) | fn function_binding_type(&self) -> FunctionBindingType;
    method has_recursive_bindings (line 34) | fn has_recursive_bindings(&self) -> bool;
    method wrap_in_expr (line 36) | fn wrap_in_expr(&self, clauses: Vec<LocalFnClause>, body: Box<Expr>, p...
    method function_binding_type (line 43) | fn function_binding_type(&self) -> FunctionBindingType {
    method has_recursive_bindings (line 46) | fn has_recursive_bindings(&self) -> bool {
    method function_binding_type (line 52) | fn function_binding_type(&self) -> FunctionBindingType {
    method has_recursive_bindings (line 55) | fn has_recursive_bindings(&self) -> bool {

FILE: src/ir/special_form/mod.rs
  function dispatch_form (line 47) | pub fn dispatch_form(icompiler: &mut IncCompiler,
  function progn_form (line 87) | pub fn progn_form(icompiler: &mut IncCompiler,
  function cond_form (line 96) | pub fn cond_form(icompiler: &mut IncCompiler,
  function while_form (line 122) | pub fn while_form(icompiler: &mut IncCompiler,
  function for_form (line 133) | pub fn for_form(icompiler: &mut IncCompiler,
  function let_form (line 145) | pub fn let_form(icompiler: &mut IncCompiler,
  function lambda_form (line 173) | pub fn lambda_form(icompiler: &mut IncCompiler,
  function function_form (line 185) | pub fn function_form(tail: &[&AST],
  function assign_form (line 193) | pub fn assign_form(icompiler: &mut IncCompiler,
  function flet_form (line 222) | pub fn flet_form(icompiler: &mut IncCompiler,
  function quote_form (line 276) | pub fn quote_form(tail: &[&AST], pos: SourceOffset) -> Result<Expr, PErr...
  function quasiquote_form (line 281) | pub fn quasiquote_form(icompiler: &mut IncCompiler,
  function access_slot_form (line 290) | pub fn access_slot_form(icompiler: &mut IncCompiler,
  function new_form (line 300) | pub fn new_form(icompiler: &mut IncCompiler,
  function yield_form (line 327) | pub fn yield_form(icompiler: &mut IncCompiler,
  function assert_form (line 362) | pub fn assert_form(icompiler: &mut IncCompiler,
  function return_form (line 384) | pub fn return_form(icompiler: &mut IncCompiler,
  function macrolet_form (line 394) | pub fn macrolet_form(icompiler: &mut IncCompiler,
  function symbol_macrolet_form (line 424) | pub fn symbol_macrolet_form(icompiler: &mut IncCompiler,
  function special_ref_form (line 452) | pub fn special_ref_form(_icompiler: &mut IncCompiler,
  function context_filename_form (line 491) | pub fn context_filename_form(_icompiler: &mut IncCompiler,
  function literally_form (line 505) | pub fn literally_form(tail: &[&AST], pos: SourceOffset) -> Result<Expr, ...
  function split_form (line 511) | pub fn split_form(icompiler: &mut IncCompiler,
  function macrolet_bind_locals (line 521) | fn macrolet_bind_locals<B, E, F, I>(icompiler: &mut IncCompiler,
  function macrolet_unbind_macros (line 565) | fn macrolet_unbind_macros<'a, B, E, F, I>(icompiler: &mut IncCompiler,
  function preload_form (line 601) | pub fn preload_form(_icompiler: &mut IncCompiler,
  function bootstrap_form (line 611) | pub fn bootstrap_form(icompiler: &mut IncCompiler,
  function break_form (line 621) | pub fn break_form(_icompiler: &mut IncCompiler,
  function continue_form (line 630) | pub fn continue_form(_icompiler: &mut IncCompiler,

FILE: src/ir/special_ref.rs
  type SpecialRef (line 34) | pub enum SpecialRef {
  method from (line 56) | fn from(special_ref: SpecialRef) -> ExprF {

FILE: src/main.rs
  function run_pseudo_repl (line 49) | fn run_pseudo_repl(godot_version: VersionInfo) {
  function run_repl (line 74) | fn run_repl(godot_version: VersionInfo) {
  function compile_file (line 123) | fn compile_file<P : AsRef<Path> + ?Sized>(input: &P, godot_version: Vers...
  function compile_all_files (line 135) | fn compile_all_files<P : AsRef<Path> + ?Sized>(input: &P, godot_version:...
  function main (line 153) | fn main() {

FILE: src/optimize/gdscript/assignment.rs
  type AssignmentStmt (line 23) | pub struct AssignmentStmt<'a> {
  type AssignType (line 30) | pub enum AssignType {
    method ensure_eq (line 59) | pub fn ensure_eq(self) -> Self {
  function match_stmt (line 37) | pub fn match_stmt(stmt: &'a Stmt) -> Option<AssignmentStmt<'a>> {
  method from (line 70) | fn from(stmt: AssignmentStmt) -> Stmt {

FILE: src/optimize/gdscript/basic_math_ops.rs
  type BasicMathOps (line 24) | pub struct BasicMathOps;
  method run_on_expr (line 27) | fn run_on_expr(&self, expr: &Expr) -> Result<Expr, GDError> {

FILE: src/optimize/gdscript/constant.rs
  function deduce_bool (line 25) | pub fn deduce_bool(expr: &Expr) -> Option<bool> {
  function stmt_has_side_effects (line 45) | pub fn stmt_has_side_effects(stmt: &Stmt) -> bool {
  function expr_has_side_effects (line 58) | pub fn expr_has_side_effects(expr: &Expr) -> bool {
  function expr_is_constant (line 84) | pub fn expr_is_constant(expr: &Expr) -> bool {
  function e (line 107) | fn e(expr: ExprF) -> Expr {
  function literals_as_bool_test (line 112) | fn literals_as_bool_test() {
  function arbitrary_expr_as_bool_test (line 126) | fn arbitrary_expr_as_bool_test() {

FILE: src/optimize/gdscript/constant_conditional_branch.rs
  type ConstantConditionalBranch (line 24) | pub struct ConstantConditionalBranch;
    method run_on_stmt_acc (line 44) | pub fn run_on_stmt_acc(&self, stmts: &[Stmt]) -> Result<Vec<Stmt>, GDE...
  function kill_if_branch (line 27) | fn kill_if_branch(if_stmt: &stmt::IfStmt, pos: SourceOffset) -> Vec<Stmt> {
  method run_on_stmt (line 56) | fn run_on_stmt(&self, stmt: &Stmt) -> Result<Vec<Stmt>, GDError> {

FILE: src/optimize/gdscript/dead_code_elimination.rs
  type DeadCodeElimination (line 23) | pub struct DeadCodeElimination;
  method run_on_stmt (line 28) | fn run_on_stmt(&self, stmt: &Stmt) -> Result<Vec<Stmt>, GDError> {
  function e (line 60) | fn e(expr: ExprF) -> Expr {
  function s (line 64) | fn s(stmt: StmtF) -> Stmt {
  function else_do_not_run_on_stmt (line 69) | fn else_do_not_run_on_stmt() {
  function else_run_on_stmt (line 84) | fn else_run_on_stmt() {

FILE: src/optimize/gdscript/dead_decl_elimination.rs
  type DeadDeclElimination (line 27) | pub struct DeadDeclElimination;
  method run_on_file (line 34) | fn run_on_file(&self, file: &mut decl::TopLevelClass) -> Result<(), GDEr...
  function d (line 55) | fn d(decl: DeclF) -> Decl {
  function eliminate_pass (line 60) | fn eliminate_pass() {

FILE: src/optimize/gdscript/dead_var_elimination.rs
  type DeadVarElimination (line 25) | pub struct DeadVarElimination;
    method run_on_body (line 28) | fn run_on_body(&self, stmts: &mut Vec<Stmt>) {
  method run_on_function (line 47) | fn run_on_function(&self, function: &mut decl::FnDecl) -> Result<(), GDE...
  method run_on_init_function (line 51) | fn run_on_init_function(&self, function: &mut decl::InitFnDecl) -> Resul...

FILE: src/optimize/gdscript/direct_var_substitute.rs
  type DirectVarSubstitute (line 27) | pub struct DirectVarSubstitute;
    method run_on_body (line 36) | fn run_on_body(&self, stmts: &mut Vec<Stmt>) {
  method run_on_function (line 57) | fn run_on_function(&self, function: &mut decl::FnDecl) -> Result<(), GDE...
  method run_on_init_function (line 61) | fn run_on_init_function(&self, function: &mut decl::InitFnDecl) -> Resul...

FILE: src/optimize/gdscript/else_then_if_fold.rs
  type ElseThenIfFold (line 22) | pub struct ElseThenIfFold;
  method run_on_stmt (line 25) | fn run_on_stmt(&self, stmt: &Stmt) -> Result<Vec<Stmt>, GDError> {
  function e (line 55) | fn e(expr: ExprF) -> Expr {
  function s (line 59) | fn s(stmt: StmtF) -> Stmt {
  function else_then_if_optimize_test (line 64) | fn else_then_if_optimize_test() {

FILE: src/optimize/gdscript/expr_walker.rs
  function walk_expr (line 25) | pub fn walk_expr<'a, E>(stmt: &Stmt, mut walker: impl FnMut(&Expr) -> Re...
  function walk_exprs (line 30) | pub fn walk_exprs<'a, E>(stmts: &[Stmt], mut walker: impl FnMut(&Expr) -...
  function walk_expr_ok (line 35) | pub fn walk_expr_ok<'a>(stmt: &Stmt, mut walker: impl FnMut(&Expr) -> Ex...
  function walk_exprs_ok (line 41) | pub fn walk_exprs_ok<'a>(stmts: &[Stmt], mut walker: impl FnMut(&Expr) -...
  function walk_impl_expr (line 47) | fn walk_impl_expr<'a, E>(walker: &mut (impl FnMut(&Expr) -> Result<Expr,...
  function walk_impl (line 99) | fn walk_impl<'a, E>(walker: &mut (impl FnMut(&Expr) -> Result<Expr, E> +...

FILE: src/optimize/gdscript/mod.rs
  type ExpressionLevelPass (line 44) | pub trait ExpressionLevelPass {
    method run_on_expr (line 45) | fn run_on_expr(&self, expr: &Expr) -> Result<Expr, GDError>;
  type StatementLevelPass (line 48) | pub trait StatementLevelPass {
    method run_on_stmt (line 49) | fn run_on_stmt(&self, stmt: &Stmt) -> Result<Vec<Stmt>, GDError>;
    method run_on_stmt (line 141) | fn run_on_stmt(&self, stmt: &Stmt) -> Result<Vec<Stmt>, GDError> {
  type FunctionOptimization (line 52) | pub trait FunctionOptimization {
    method run_on_function (line 53) | fn run_on_function(&self, function: &mut decl::FnDecl) -> Result<(), G...
    method run_on_init_function (line 54) | fn run_on_init_function(&self, function: &mut decl::InitFnDecl) -> Res...
    method run_on_function (line 129) | fn run_on_function(&self, function: &mut decl::FnDecl) -> Result<(), G...
    method run_on_init_function (line 133) | fn run_on_init_function(&self, function: &mut decl::InitFnDecl) -> Res...
  type FileOptimization (line 57) | pub trait FileOptimization {
    method run_on_file (line 58) | fn run_on_file(&self, file: &mut decl::TopLevelClass) -> Result<(), GD...
    method run_on_file (line 121) | fn run_on_file(&self, file: &mut decl::TopLevelClass) -> Result<(), GD...
  function on_each_decl_impl (line 64) | fn on_each_decl_impl(decls: &[Decl], acc: &mut Vec<Decl>, block: &mut im...
  function on_each_decl (line 94) | pub fn on_each_decl(decls: &[Decl], mut block: impl FnMut(&Decl) -> Resu...
  function on_decl (line 100) | fn on_decl(opt: &impl FunctionOptimization, decl: &Decl) -> Result<Vec<D...
  function run_standard_passes (line 147) | pub fn run_standard_passes(file: &mut decl::TopLevelClass) -> Result<(),...

FILE: src/optimize/gdscript/noop.rs
  function is_code_seq_noop (line 24) | pub fn is_code_seq_noop(stmts: &[Stmt]) -> bool {
  function is_code_noop (line 28) | pub fn is_code_noop(stmt: &Stmt) -> bool {
  function is_expr_noop (line 32) | pub fn is_expr_noop(expr: &Expr) -> bool {
  function e (line 44) | fn e(expr: ExprF) -> Expr {
  function s (line 48) | fn s(stmt: StmtF) -> Stmt {
  function expr_noop (line 53) | fn expr_noop() {
  function stmt_noop (line 71) | fn stmt_noop() {

FILE: src/optimize/gdscript/redundant_assignment_elimination.rs
  type RedundantAssignmentElimination (line 28) | pub struct RedundantAssignmentElimination;
    method match_first_assign (line 48) | fn match_first_assign<'a>(&self, stmt: &'a Stmt) -> Option<AssignmentS...
    method match_second_assign (line 56) | fn match_second_assign<'a, 'b, 'c>(&'a self, name: &'b str, stmt: &'c ...
    method rebuild_assignment (line 65) | fn rebuild_assignment(&self, assign_type: AssignType, var_name: &str, ...
    method run_on_stmts (line 69) | pub fn run_on_stmts(&self, stmts: &[Stmt]) -> Result<Vec<Stmt>, GDErro...
  method run_on_function (line 99) | fn run_on_function(&self, function: &mut decl::FnDecl) -> Result<(), GDE...
  method run_on_init_function (line 103) | fn run_on_init_function(&self, function: &mut decl::InitFnDecl) -> Resul...
  function e (line 117) | fn e(expr: ExprF) -> Expr {
  function s (line 121) | fn s(stmt: StmtF) -> Stmt {
  function redundant_assign_test_1 (line 126) | fn redundant_assign_test_1() {
  function redundant_assign_test_2 (line 158) | fn redundant_assign_test_2() {
  function redundant_assign_test_3 (line 192) | fn redundant_assign_test_3() {
  function redundant_assign_test_4 (line 222) | fn redundant_assign_test_4() {
  function redundant_assign_test_no_trigger_1 (line 252) | fn redundant_assign_test_no_trigger_1() {
  function redundant_assign_test_no_trigger_2 (line 276) | fn redundant_assign_test_no_trigger_2() {
  function redundant_assign_test_no_trigger_3 (line 298) | fn redundant_assign_test_no_trigger_3() {
  function redundant_assign_test_no_trigger_4 (line 320) | fn redundant_assign_test_no_trigger_4() {

FILE: src/optimize/gdscript/stmt_walker.rs
  type StmtWalker (line 29) | struct StmtWalker<'a, E> {
  type WalkFn (line 33) | type WalkFn<'a, E> = dyn FnMut(&[Stmt]) -> Result<Vec<Stmt>, E> + 'a;
  function new (line 37) | fn new(function: impl FnMut(&[Stmt]) -> Result<Vec<Stmt>, E> + 'a) -> St...
  function walk_stmts (line 41) | fn walk_stmts(&mut self, stmts: &[Stmt]) -> Result<Vec<Stmt>, E> {
  function walk_stmt (line 49) | fn walk_stmt(&mut self, stmt: &Stmt) -> Result<Vec<Stmt>, E> {
  function on_each_stmt (line 90) | pub fn on_each_stmt<'a, E>(mut walker: impl FnMut(&Stmt) -> Result<Vec<S...
  function on_each_stmt_ok (line 102) | pub fn on_each_stmt_ok<'a>(mut walker: impl FnMut(&Stmt) -> Vec<Stmt> + 'a)
  function walk_stmt (line 116) | pub fn walk_stmt<'a, E>(stmt: &Stmt, walker: impl FnMut(&[Stmt]) -> Resu...
  function walk_stmts (line 126) | pub fn walk_stmts<'a, E>(stmts: &[Stmt], walker: impl FnMut(&[Stmt]) -> ...
  function walk_stmt_ok (line 133) | pub fn walk_stmt_ok<'a>(stmt: &Stmt, mut walker: impl FnMut(&[Stmt]) -> ...
  function walk_stmts_ok (line 140) | pub fn walk_stmts_ok<'a>(stmts: &[Stmt], mut walker: impl FnMut(&[Stmt])...
  type SampleError (line 155) | struct SampleError;
  function s (line 157) | fn s(stmt: StmtF) -> Stmt {
  function e (line 161) | fn e(expr: ExprF) -> Expr {
  function test_walk_simple_stmt (line 166) | fn test_walk_simple_stmt() {
  function test_walk_simple_stmt_seq (line 174) | fn test_walk_simple_stmt_seq() {
  function test_walk_complex_stmt (line 182) | fn test_walk_complex_stmt() {
  function test_walk_complex_stmt_seq (line 194) | fn test_walk_complex_stmt_seq() {
  function test_walk_simple_error_1 (line 207) | fn test_walk_simple_error_1() {
  function test_walk_simple_error_2 (line 214) | fn test_walk_simple_error_2() {

FILE: src/optimize/gdscript/ternary_if_fold.rs
  type TernaryIfFold (line 24) | pub struct TernaryIfFold;
    method fold_into_ternary (line 43) | fn fold_into_ternary(acc: Expr, next: (Expr, Expr)) -> Expr {
    method match_simple_assign (line 55) | fn match_simple_assign<'a>(&self, stmts: &'a [Stmt]) -> Option<(&'a st...
    method try_to_run (line 64) | fn try_to_run(&self, if_stmt: &stmt::IfStmt) -> Option<Stmt> {
  method run_on_stmt (line 100) | fn run_on_stmt(&self, stmt: &Stmt) -> Result<Vec<Stmt>, GDError> {
  function e (line 115) | fn e(expr: ExprF) -> Expr {
  function s (line 119) | fn s(stmt: StmtF) -> Stmt {
  function ternary_if_fold_test_1 (line 124) | fn ternary_if_fold_test_1() {
  function ternary_if_fold_test_2 (line 149) | fn ternary_if_fold_test_2() {
  function ternary_if_fold_test_no_trigger_1 (line 180) | fn ternary_if_fold_test_no_trigger_1() {
  function ternary_if_fold_test_no_trigger_2 (line 198) | fn ternary_if_fold_test_no_trigger_2() {

FILE: src/optimize/gdscript/variables.rs
  type VarInfo (line 28) | pub struct VarInfo {
    method new (line 36) | pub fn new(expr: Expr) -> VarInfo {
    method is_ever_used (line 40) | pub fn is_ever_used(&self) -> bool {
    method is_read_only (line 44) | pub fn is_read_only(&self) -> bool {
  function get_variable_info (line 50) | pub fn get_variable_info(stmts: &[Stmt]) -> HashMap<String, VarInfo> {

FILE: src/optimize/ir/expr_walker.rs
  type ExprWalker (line 24) | struct ExprWalker<'a, E> {
  type WalkFn (line 28) | type WalkFn<'a, E> = dyn (FnMut(&Expr) -> Result<Expr, E>) + 'a;
  function new (line 32) | fn new(function: impl FnMut(&Expr) -> Result<Expr, E> + 'a) -> ExprWalke...
  function walk_exprs (line 36) | fn walk_exprs(&mut self, exprs: &[Expr]) -> Result<Vec<Expr>, E> {
  function walk_expr (line 42) | fn walk_expr(&mut self, expr: &Expr) -> Result<Expr, E> {
  function walk_lambda_class (line 196) | fn walk_lambda_class(&mut self, cls: &expr::LambdaClass) -> Result<expr:...
  function walk_expr (line 233) | pub fn walk_expr<'a, E>(expr: &Expr, walker: impl FnMut(&Expr) -> Result...
  function walk_expr_ok (line 239) | pub fn walk_expr_ok<'a>(expr: &Expr, mut walker: impl FnMut(&Expr) -> Ex...
  function walk_exprs_in_decl (line 245) | pub fn walk_exprs_in_decl<'a, E>(decl: &Decl, walker: impl FnMut(&Expr) ...
  function walk_exprs_in_toplevel (line 336) | pub fn walk_exprs_in_toplevel<'a, E>(decl: &decl::TopLevel, mut walker: ...
  function walk_exprs_in_toplevel_ok (line 345) | pub fn walk_exprs_in_toplevel_ok<'a>(decl: &decl::TopLevel, mut walker: ...

FILE: src/optimize/ir/mod.rs
  type FileOptimization (line 23) | pub trait FileOptimization {
    method run_on_file (line 24) | fn run_on_file(&self, file: &mut TopLevel) -> Result<(), GDError>;

FILE: src/parser_test.rs
  function so (line 26) | fn so(x: usize) -> SourceOffset {
  function parser_simple (line 32) | fn parser_simple() {
  function parser_simple_unicode (line 42) | fn parser_simple_unicode() {
  function parser_string (line 57) | fn parser_string() {
  function parser_list (line 65) | fn parser_list() {
  function parser_quoting (line 74) | fn parser_quoting() {
  function parser_colon (line 82) | fn parser_colon() {
  function parser_at_self (line 91) | fn parser_at_self() {
  function parser_comments (line 98) | fn parser_comments() {
  function parser_array (line 109) | fn parser_array() {
  function parser_dict (line 117) | fn parser_dict() {
  function parser_failures (line 125) | fn parser_failures() {

FILE: src/pipeline/can_load.rs
  type CanLoad (line 34) | pub trait CanLoad {
    method current_filename_option (line 38) | fn current_filename_option(&self) -> Option<RPathBuf>;
    method current_filename (line 50) | fn current_filename(&self) -> RPathBuf {
    method current_filename_option (line 57) | fn current_filename_option(&self) -> Option<RPathBuf> {

FILE: src/pipeline/config.rs
  type ProjectConfig (line 28) | pub struct ProjectConfig {

FILE: src/pipeline/error.rs
  type PError (line 35) | pub enum PError {
    method fmt (line 93) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method eq (line 133) | fn eq(&self, other: &PError) -> bool {
    method from (line 147) | fn from(e: ParseError<L, T, E>) -> PError {
    method from (line 153) | fn from(e: IOError) -> PError {
    method from (line 159) | fn from(e: GDError) -> PError {
    method from (line 165) | fn from(e: TryFromDottedExprError) -> PError {
    method from (line 171) | fn from(e: ArgListParseError) -> PError {
    method from (line 177) | fn from(e: ModifierParseError) -> PError {
    method from (line 183) | fn from(e: DuplicateMainClassError) -> PError {
    method from (line 190) | fn from(e: ScopeError<NS>) -> PError {
    method from (line 196) | fn from(e: LoopPrimitiveError) -> PError {
    method from (line 202) | fn from(e: DependencyError) -> PError {
  type IOError (line 43) | pub struct IOError {
    method fmt (line 103) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method new (line 110) | pub fn new(error: io::Error, pos: SourceOffset) -> IOError {
  type Item (line 54) | type Item = PError;
  method get_source (line 56) | fn get_source(&self) -> SourceOffset {
  method get_value (line 64) | fn get_value(&self) -> &PError {
  method source (line 72) | fn source(&self) -> Option<&(dyn Error + 'static)> {
  function get_source_from_parse_error (line 82) | fn get_source_from_parse_error<T, E>(err: &ParseError<SourceOffset, T, E...
  function from (line 117) | fn from(err: IOError) -> io::Error {
  function _impl_partial_eq_warning (line 122) | fn _impl_partial_eq_warning(err: PError) {

FILE: src/pipeline/loader.rs
  type NullFileLoader (line 24) | pub struct NullFileLoader;
  type NullFileLoaderError (line 26) | pub struct NullFileLoaderError;
  type FileLoader (line 28) | pub trait FileLoader {
    method load_file (line 31) | fn load_file<'a, 'b, P>(&'a mut self, input_path: &'b P)
    method get_file (line 35) | fn get_file<'a, 'b, P>(&'a self, input_path: &'b P) -> Option<&'a Tran...
    type Error (line 42) | type Error = NullFileLoaderError;
    method load_file (line 44) | fn load_file<'a, 'b, P>(&'a mut self, _input_path: &'b P)
    method get_file (line 50) | fn get_file<'a, 'b, P>(&'a self, _input_path: &'b P) -> Option<&'a Tra...

FILE: src/pipeline/mod.rs
  type Pipeline (line 58) | pub struct Pipeline {
    method with_resolver (line 79) | pub fn with_resolver(config: ProjectConfig, resolver: Box<dyn NameReso...
    method new (line 91) | pub fn new(config: ProjectConfig) -> Pipeline {
    method get_native_classes_impl (line 95) | fn get_native_classes_impl() -> NativeClasses {
    method compile_code (line 100) | pub fn compile_code<P : AsRef<Path> + ?Sized>(&mut self, filename: &P,...
    method load_file_unconditionally (line 130) | fn load_file_unconditionally<'a, 'b, P>(&'a mut self, input_path: &'b P)
    method get_loaded_file (line 186) | pub fn get_loaded_file<'a, 'b, P>(&'a self, input_path: &'b P, pos: So...
    method to_absolute_path (line 196) | fn to_absolute_path<P>(&self, input_path: &P) -> PathBuf
    method load_file (line 206) | pub fn load_file<'a, 'b, P>(&'a mut self, input_path: &'b P, pos: Sour...
    method get_file (line 221) | pub fn get_file<'a, 'b, P>(&'a self, input_path: &'b P, pos: SourceOff...
    method get_server (line 226) | pub fn get_server(&self) -> &NamedFileServer {
    method get_server_mut (line 230) | pub fn get_server_mut(&mut self) -> &mut NamedFileServer {
    method make_preload_resolver (line 234) | pub fn make_preload_resolver(&self) -> LookupPreloadResolver {
    method currently_loading_file (line 238) | pub fn currently_loading_file(&self) -> Option<&RPathBuf> {
    method set_currently_loading_file (line 245) | pub fn set_currently_loading_file(&mut self, path: RPathBuf) {
    method config (line 249) | pub fn config(&self) -> &ProjectConfig {
    method get_native_classes (line 253) | pub fn get_native_classes(&mut self) -> &NativeClasses {
  type KnownFile (line 69) | enum KnownFile {
  function input_to_output_filename (line 259) | pub fn input_to_output_filename<P : AsRef<Path> + ?Sized>(input: &P) -> ...

FILE: src/pipeline/resolver.rs
  type DefaultNameResolver (line 33) | pub struct DefaultNameResolver;
  type PanickingNameResolver (line 41) | pub struct PanickingNameResolver;
  type NameResolver (line 61) | pub trait NameResolver {
    method resolve_input_path (line 64) | fn resolve_input_path(&self, filename: &Path) -> io::Result<Box<dyn Re...
    method resolve_output_path (line 67) | fn resolve_output_path(&self, filename: &Path) -> io::Result<Box<dyn W...
    method resolve_input_path (line 72) | fn resolve_input_path(&self, filename: &Path) -> io::Result<Box<dyn Re...
    method resolve_output_path (line 77) | fn resolve_output_path(&self, filename: &Path) -> io::Result<Box<dyn W...
    method resolve_input_path (line 86) | fn resolve_input_path(&self, _filename: &Path) -> io::Result<Box<dyn R...
    method resolve_output_path (line 90) | fn resolve_output_path(&self, _filename: &Path) -> io::Result<Box<dyn ...

FILE: src/pipeline/source.rs
  type SourceOffset (line 35) | pub struct SourceOffset(pub usize);
    method from (line 180) | fn from(x: usize) -> SourceOffset {
    method fmt (line 192) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type SourcePos (line 41) | pub struct SourcePos {
    method new (line 146) | pub fn new(line: usize, column: usize) -> SourcePos {
    method from_offset (line 152) | pub fn from_offset(offset: SourceOffset, source: &str) -> SourcePos {
    method fmt (line 198) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type SourcedValue (line 50) | pub struct SourcedValue<'a, T: Sourced> {
  type Sourced (line 64) | pub trait Sourced {
    method get_source (line 70) | fn get_source(&self) -> SourceOffset;
    method get_value (line 73) | fn get_value(&self) -> &Self::Item;
    type Item (line 106) | type Item = T::Item;
    method get_source (line 108) | fn get_source(&self) -> SourceOffset {
    method get_value (line 112) | fn get_value(&self) -> &Self::Item {
  function new (line 82) | pub fn new(value: &'a T, source_code: &str) -> SourcedValue<'a, T> {
  function from_file (line 92) | pub fn from_file<P>(value: &'a T, source_file: &P) -> io::Result<Sourced...
  function get_source_pos (line 99) | pub fn get_source_pos(&self) -> SourcePos {
  function find_newlines (line 123) | pub fn find_newlines(source: &str) -> Vec<SourceOffset> {
  function from (line 186) | fn from(x: SourceOffset) -> usize {
  function fmt (line 204) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  function test_newlines (line 214) | fn test_newlines() {
  function test_offset (line 241) | fn test_offset() {

FILE: src/pipeline/stdlib_unit.rs
  type StdlibUnit (line 33) | pub struct StdlibUnit {
    method from (line 44) | fn from(unit: TranslationUnit) -> StdlibUnit {

FILE: src/pipeline/translation_unit.rs
  type TranslationUnit (line 38) | pub struct TranslationUnit {
    method new (line 71) | pub fn new(filename: PathBuf,
    method clone_detached (line 97) | pub fn clone_detached(&self) -> TranslationUnit {
  method from (line 112) | fn from(trans: TranslationUnit) -> TopLevelClass {

FILE: src/repl.rs
  type Repl (line 59) | pub struct Repl {
    constant REPL_FILENAME (line 70) | const REPL_FILENAME: &'static str =
    method new (line 73) | pub fn new(config: ProjectConfig) -> Repl {
    method with_pipeline (line 77) | pub fn with_pipeline(pipeline: Pipeline) -> Repl {
    method initialize (line 86) | fn initialize(&mut self) {
    method force_load (line 102) | pub fn force_load(&mut self) {
    method run_code (line 129) | pub fn run_code(&mut self, code: &AST) -> Result<String, PError> {
    method parse_and_run_code (line 190) | pub fn parse_and_run_code(&mut self, code: &str) -> Result<String, PEr...
    method is_running (line 203) | pub fn is_running(&mut self) -> bool {
    method remember_symbols (line 207) | fn remember_symbols(&mut self, filename: &Path, table: &mut SymbolTabl...
    method bind_existing_names (line 226) | fn bind_existing_names(&self, table: &mut SymbolTable) {
    method main_function_handler (line 230) | fn main_function_handler() -> StaticMainFunctionHandler {
  function dummy_config (line 244) | fn dummy_config() -> ProjectConfig {
  function basic_repl_test (line 253) | fn basic_repl_test() {
  function quoted_repl_test (line 259) | fn quoted_repl_test() {
  function array_repl_test (line 265) | fn array_repl_test() {
  function dict_repl_test (line 271) | fn dict_repl_test() {
  function decl_then_expr_in_one_repl_command_test (line 277) | fn decl_then_expr_in_one_repl_command_test() {
  function force_load_in_repl_test (line 283) | fn force_load_in_repl_test() {
  function decl_then_expr_in_two_repl_commands_test (line 291) | fn decl_then_expr_in_two_repl_commands_test() {
  function failed_decl_then_expr_repl_test (line 299) | fn failed_decl_then_expr_repl_test() {
  function failed_repl_continues_test (line 309) | fn failed_repl_continues_test() {
  function minimalist_at_repl_test (line 319) | fn minimalist_at_repl_test() {
  function terminate_repl_via_tree_test (line 327) | fn terminate_repl_via_tree_test() {
  function terminate_repl_via_quit_test (line 336) | fn terminate_repl_via_quit_test() {

FILE: src/runner/godot.rs
  type GodotCommand (line 33) | pub struct GodotCommand {
    method raw (line 50) | pub fn raw() -> Self {
    method base (line 63) | pub fn base() -> Self {
    method arg (line 75) | pub fn arg(&mut self, arg_text: impl AsRef<OsStr>) -> &mut Self {
    method no_window (line 85) | pub fn no_window(&mut self) -> &mut Self {
    method script_file (line 91) | pub fn script_file(&mut self, filename: &Path) -> &mut Self {
    method project_dir (line 101) | pub fn project_dir(&mut self, directory_name: &Path) -> &mut Self {
    method quit_after_one (line 107) | pub fn quit_after_one(&mut self) -> &mut Self {
    method quiet (line 112) | pub fn quiet(&mut self) -> &mut Self {
    method env (line 120) | pub fn env<K, V>(&mut self, key: K, val: V) -> &mut Self
    method envs (line 131) | pub fn envs<I, K, V>(&mut self, vars: I) -> &mut Self
    method stderr (line 142) | pub fn stderr(&mut self, cfg: impl Into<Stdio>) -> &mut Self {
    method stdout (line 150) | pub fn stdout(&mut self, cfg: impl Into<Stdio>) -> &mut Self {
    method stdin (line 158) | pub fn stdin(&mut self, cfg: impl Into<Stdio>) -> &mut Self {
    method output (line 167) | pub fn output(&mut self) -> io::Result<Output> {
    method status (line 175) | pub fn status(&mut self) -> io::Result<ExitStatus> {
    method spawn (line 183) | pub fn spawn(&mut self) -> io::Result<Child> {
  method from (line 190) | fn from(godot_command: GodotCommand) -> Command {

FILE: src/runner/into_gd_file.rs
  type IntoGDFile (line 31) | pub trait IntoGDFile {
    method write_to_gd (line 33) | fn write_to_gd(&self, file: &mut impl Write) -> io::Result<()>;
    method write_to_gd (line 39) | fn write_to_gd(&self, file: &mut impl Write) -> io::Result<()> {
    method write_to_gd (line 47) | fn write_to_gd(&self, file: &mut impl Write) -> io::Result<()> {

FILE: src/runner/macro_server/command.rs
  type ServerCommand (line 36) | pub enum ServerCommand {
    method name (line 47) | pub fn name(&self) -> &'static str {
    method arguments (line 58) | pub fn arguments(&self) -> Vec<&str> {
    method to_json (line 76) | pub fn to_json(&self) -> JsonValue {

FILE: src/runner/macro_server/lazy.rs
  type LazyServer (line 41) | pub struct LazyServer(Option<MacroServer>);
    method new (line 51) | pub fn new() -> LazyServer {
    method is_running (line 56) | pub fn is_running(&self) -> bool {
    method get_mut (line 71) | pub fn get_mut(&mut self) -> io::Result<&mut MacroServer> {
    method get_mut_if_initialized (line 84) | pub fn get_mut_if_initialized(&mut self) -> Option<&mut MacroServer> {
    method shutdown (line 98) | pub fn shutdown(self) -> io::Result<Option<ExitStatus>> {

FILE: src/runner/macro_server/mod.rs
  constant DEFAULT_PORT_NUMBER (line 53) | pub const DEFAULT_PORT_NUMBER: u16 = 61992;
  type MacroServer (line 63) | pub struct MacroServer {
    method new (line 74) | pub fn new() -> io::Result<MacroServer> {
    method new_on_ports (line 78) | pub fn new_on_ports(min_port: u16, max_port: u16) -> io::Result<MacroS...
    method lock_macro_server_init (line 104) | fn lock_macro_server_init() -> io::Result<MutexGuard<'static, ()>> {
    method try_to_bind_port (line 110) | fn try_to_bind_port(start: u16, end: u16) -> io::Result<(TcpListener, ...
    method send_string (line 128) | fn send_string(&mut self, string: &str) -> io::Result<()> {
    method receive_string (line 137) | fn receive_string(&mut self) -> io::Result<String> {
    method issue_command (line 149) | pub fn issue_command(&mut self, command: &ServerCommand) -> io::Result...
    method _shutdown (line 160) | fn _shutdown(&mut self) -> io::Result<ExitStatus> {
    method shutdown (line 169) | pub fn shutdown(self) -> io::Result<ExitStatus> {
    method is_process_healthy (line 177) | pub fn is_process_healthy(&mut self) -> bool {
  method drop (line 201) | fn drop(&mut self) {
  function run_godot_child_process (line 207) | fn run_godot_child_process(port: u16) -> io::Result<Child> {
  function issue_command_and_unwrap (line 227) | fn issue_command_and_unwrap(server: &mut MacroServer, value: &ServerComm...
  function roundtrip_value (line 232) | fn roundtrip_value(server: &mut MacroServer, value: &str) {
  function spawn_server_simple_test (line 239) | fn spawn_server_simple_test() {
  function spawn_server_ping_pong_test (line 244) | fn spawn_server_ping_pong_test() {
  function spawn_server_eval_test (line 252) | fn spawn_server_eval_test() {
  function spawn_server_roundtrip_test_1 (line 259) | fn spawn_server_roundtrip_test_1() {
  function spawn_server_roundtrip_test_2 (line 271) | fn spawn_server_roundtrip_test_2() {
  function spawn_server_roundtrip_test_3 (line 284) | fn spawn_server_roundtrip_test_3() {
  function spawn_server_load_test (line 298) | fn spawn_server_load_test() {
  function spawn_server_exec_test (line 308) | fn spawn_server_exec_test() {
  function spawn_server_bad_json_test (line 316) | fn spawn_server_bad_json_test() {
  function healthy_server_test (line 332) | fn healthy_server_test() {
  function unhealthy_server_test (line 339) | fn unhealthy_server_test() {

FILE: src/runner/macro_server/named_file_server.rs
  type NamedFileServer (line 70) | pub struct NamedFileServer {
    method new (line 106) | pub fn new() -> NamedFileServer {
    method add_reserved_macro (line 129) | pub fn add_reserved_macro(&mut self, name: String) -> MacroID {
    method load_file_on_server (line 141) | fn load_file_on_server(&mut self, path: &Path) -> io::Result<u32> {
    method stand_up_file (line 159) | pub fn stand_up_file(&mut self, file: NamedTempFile) -> io::Result<()> {
    method stand_up_macro (line 175) | pub fn stand_up_macro(&mut self, name: String, file: NamedTempFile) ->...
    method get_file (line 185) | fn get_file(&self, id: MacroID) -> Option<&MacroCall> {
    method run_server_file (line 207) | pub fn run_server_file(&mut self, id: MacroID, prelude: Vec<Stmt>, spe...
    method run_server_file_str (line 215) | pub fn run_server_file_str(&mut self, id: MacroID, prelude: Vec<Stmt>,...
    method do_macro_call (line 253) | fn do_macro_call(&mut self,
    method set_global_name_generator (line 271) | pub fn set_global_name_generator(&mut self, gen: &FreshNameGenerator) ...
    method reset_global_name_generator (line 282) | pub fn reset_global_name_generator(&mut self) -> io::Result<()> {
    method is_process_healthy (line 294) | pub fn is_process_healthy(&mut self) -> bool {
  type MacroID (line 81) | pub struct MacroID(u32);
    constant RESERVED (line 312) | const RESERVED: u32 = 1024;
    method smallest_stdlib (line 314) | fn smallest_stdlib() -> MacroID {
    method smallest_unreserved (line 318) | fn smallest_unreserved() -> MacroID {
    method is_reserved (line 322) | fn is_reserved(self) -> bool {
    method next (line 326) | fn next(self) -> MacroID {
  type MacroCall (line 84) | struct MacroCall {
  constant RESERVED_MACRO_INDEX (line 93) | const RESERVED_MACRO_INDEX: u32 = u32::MAX;
  function response_to_string (line 96) | fn response_to_string(response: response::ServerResponse) -> io::Result<...

FILE: src/runner/macro_server/response.rs
  type ServerResponse (line 33) | pub enum ServerResponse {
    type Error (line 103) | type Error = ParseError;
    method try_from (line 105) | fn try_from(json: JsonValue) -> Result<ServerResponse, ParseError> {
  type Failure (line 41) | pub struct Failure {
    method fmt (line 139) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type Success (line 53) | pub struct Success {
    type Error (line 71) | type Error = Failure;
    method try_from (line 73) | fn try_from(resp: ServerResponse) -> Result<Success, Failure> {
  type ParseError (line 62) | pub enum ParseError {
    method fmt (line 129) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  function fail (line 66) | fn fail(json: &JsonValue) -> ParseError {
  type Error (line 83) | type Error = Failure;
  method try_from (line 85) | fn try_from(resp: ServerResponse) -> Result<String, Failure> {

FILE: src/runner/mod.rs
  type JsonApiError (line 43) | pub struct JsonApiError;
    method fmt (line 46) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  function dump_json_api (line 57) | pub fn dump_json_api() -> io::Result<NamedTempFile> {
  function make_tmp_file (line 73) | fn make_tmp_file() -> io::Result<NamedTempFile> {
  function run_with_temporary (line 87) | fn run_with_temporary(data: &str) -> io::Result<String> {
  function run_minimal_test (line 102) | fn run_minimal_test() {
  function run_printing_test (line 112) | fn run_printing_test() {
  function dump_json_api_test (line 123) | fn dump_json_api_test() {

FILE: src/runner/named_file.rs
  type NamedFile (line 30) | pub trait NamedFile : io::Write {
    method path (line 33) | fn path(&self) -> &Path;
    method path (line 68) | fn path(&self) -> &Path {
    method path (line 74) | fn path(&self) -> &Path {
  type SimpleNamedFile (line 41) | pub struct SimpleNamedFile(PathBuf, File);
    method create (line 48) | pub fn create<P : AsRef<Path>>(path: P) -> io::Result<SimpleNamedFile> {
    method write (line 57) | fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
    method flush (line 61) | fn flush(&mut self) -> io::Result<()> {

FILE: src/runner/path.rs
  type RPathBuf (line 50) | pub struct RPathBuf {
    method new (line 86) | pub fn new(source: PathSrc, path: PathBuf) -> Result<RPathBuf, TryFrom...
    method source (line 97) | pub fn source(&self) -> PathSrc {
    method path (line 102) | pub fn path(&self) -> &Path {
    method path_mut (line 111) | pub fn path_mut(&mut self) -> &mut PathBuf {
    method into_path (line 116) | pub fn into_path(self) -> PathBuf {
    method components (line 122) | pub fn components(&self) -> Components<'_> {
    method extension (line 128) | pub fn extension(&self) -> Option<&OsStr> {
    method components_no_root (line 135) | pub fn components_no_root(&self) -> Components<'_> {
    method path_to_string (line 147) | pub fn path_to_string<P : AsRef<Path> + ?Sized>(path: &P) -> String {
    method fmt (line 157) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    type Error (line 193) | type Error = TryFromRPathBufError;
    method try_from (line 195) | fn try_from(path: String) -> Result<RPathBuf, TryFromRPathBufError> {
  type PathSrc (line 58) | pub enum PathSrc {
    method should_be_relative_path (line 170) | pub fn should_be_relative_path(self) -> bool {
    method prefix (line 179) | pub fn prefix(self) -> &'static str {
  type TryFromRPathBufError (line 69) | pub enum TryFromRPathBufError {
  function test_rpathbuf_new_relative (line 213) | fn test_rpathbuf_new_relative() {
  function test_rpathbuf_new_absolute_windows (line 221) | fn test_rpathbuf_new_absolute_windows() {
  function test_rpathbuf_new_absolute_unix (line 229) | fn test_rpathbuf_new_absolute_unix() {
  function test_rpathbuf_parse (line 236) | fn test_rpathbuf_parse() {
  function test_rpath_parse_windows (line 254) | fn test_rpath_parse_windows() {
  function test_rpath_parse_unix (line 265) | fn test_rpath_parse_unix() {
  function test_rpathbuf_display (line 275) | fn test_rpathbuf_display() {
  function test_rpathbuf_display_windows (line 282) | fn test_rpathbuf_display_windows() {
  function test_rpathbuf_display_unix (line 288) | fn test_rpathbuf_display_unix() {

FILE: src/runner/version.rs
  type Version (line 27) | pub struct Version {
    method new (line 45) | pub fn new(major: i32, minor: i32, patch: i32) -> Self {
    method into_i32 (line 54) | pub fn into_i32(self) -> i32 {
  type VersionInfo (line 36) | pub struct VersionInfo {
    method new (line 64) | pub fn new() -> Self {
    method parse (line 72) | pub fn parse(version_string: &str) -> VersionInfo {
  function get_godot_version_as_string (line 102) | pub fn get_godot_version_as_string() -> io::Result<String> {
  function get_godot_version (line 116) | pub fn get_godot_version() -> io::Result<VersionInfo> {
  function pop_version_number (line 121) | fn pop_version_number(atoms: &mut VecDeque<&str>) -> Option<i32> {
  function test_parse_basic_version_string (line 133) | fn test_parse_basic_version_string() {
  function test_parse_nonsense_version_string (line 169) | fn test_parse_nonsense_version_string() {
  function test_parse_full_version_string (line 182) | fn test_parse_full_version_string() {
  function test_parse_partial_version_string (line 200) | fn test_parse_partial_version_string() {

FILE: src/sxp/ast.rs
  type ASTF (line 31) | pub enum ASTF {
    constant NIL (line 73) | pub const NIL: ASTF = ASTF::Atom(Literal::Nil);
    method cons (line 77) | pub fn cons(car: AST, cdr: AST) -> ASTF {
    method string (line 83) | pub fn string<S>(s: S) -> ASTF
    method symbol (line 90) | pub fn symbol<S>(s: S) -> ASTF
    method int (line 96) | pub fn int(value: i32) -> ASTF {
    method float (line 101) | pub fn float(value: f32) -> ASTF {
    method from (line 376) | fn from(_: ()) -> ASTF {
    method from (line 382) | fn from(n: i32) -> ASTF {
    method from (line 388) | fn from(b: bool) -> ASTF {
    method from (line 394) | fn from(f: f32) -> ASTF {
    method from (line 400) | fn from(s: String) -> ASTF {
    method from (line 406) | fn from(s: &'a str) -> ASTF {
  type AST (line 44) | pub struct AST {
    method new (line 111) | pub fn new(value: ASTF, pos: SourceOffset) -> AST {
    method nil (line 117) | pub fn nil(pos: SourceOffset) -> AST {
    method symbol (line 122) | pub fn symbol<S>(name: S, pos: SourceOffset) -> AST
    method string (line 128) | pub fn string<S>(name: S, pos: SourceOffset) -> AST
    method int (line 134) | pub fn int(value: i32, pos: SourceOffset) -> AST {
    method float (line 139) | pub fn float(value: f32, pos: SourceOffset) -> AST {
    method cons (line 144) | pub fn cons(car: AST, cdr: AST, pos: SourceOffset) -> AST {
    method _recurse (line 148) | fn _recurse<'a, 'b, F1, F2, E>(&'a self, func: &mut F1, default: &mut ...
    method _recurse_mut (line 164) | fn _recurse_mut<'a, 'b, F1, F2, E>(&'a mut self, func: &mut F1, defaul...
    method _walk_preorder (line 180) | fn _walk_preorder<'a, 'b, F, E>(&'a self, func: &mut F) -> Result<(), E>
    method _walk_preorder_mut (line 187) | fn _walk_preorder_mut<'a, F, E>(&'a mut self, func: &mut F) -> Result<...
    method _walk_postorder (line 193) | fn _walk_postorder<'a, 'b, F, E>(&'a self, func: &mut F) -> Result<(), E>
    method _walk_postorder_mut (line 200) | fn _walk_postorder_mut<'a, F, E>(&'a mut self, func: &mut F) -> Result...
    method walk_preorder (line 213) | pub fn walk_preorder<'a, 'b, F, E>(&'a self, mut func: F) -> Result<()...
    method walk_preorder_mut (line 220) | pub fn walk_preorder_mut<'a, F, E>(&'a mut self, mut func: F) -> Resul...
    method walk_postorder (line 232) | pub fn walk_postorder<'a, 'b, F, E>(&'a self, mut func: F) -> Result<(...
    method walk_postorder_mut (line 239) | pub fn walk_postorder_mut<'a, F, E>(&'a mut self, mut func: F) -> Resu...
    method each_source_mut (line 247) | pub fn each_source_mut<F>(&mut self, mut func: F)
    method each_source (line 257) | pub fn each_source<F>(&self, func: F) -> AST
    method all_symbols (line 269) | pub fn all_symbols<'a>(&'a self) -> Vec<&'a str> {
    method dotted_list (line 300) | pub fn dotted_list(vec: Vec<AST>, terminal: AST) -> AST {
    method dotted_list_fold (line 304) | fn dotted_list_fold(cdr: AST, car: AST) -> AST { // NOTE: Arguments re...
    method list (line 310) | pub fn list(vec: Vec<AST>, nil_pos: SourceOffset) -> AST {
    method from_value (line 315) | pub fn from_value<T>(value: T, pos: SourceOffset) -> AST
    method as_symbol_ref (line 323) | pub fn as_symbol_ref(&self) -> Option<&str> {
    method fmt (line 338) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  function fmt_list (line 49) | fn fmt_list(a: &AST, b: &AST, f: &mut fmt::Formatter<'_>) -> fmt::Result {
  type Item (line 352) | type Item = ASTF;
  method get_source (line 354) | fn get_source(&self) -> SourceOffset {
  method get_value (line 358) | fn get_value(&self) -> &ASTF {
  method depth (line 366) | fn depth(&self) -> u32 {
  function int (line 420) | fn int(n: i32) -> AST {
  function nil (line 424) | fn nil() -> AST {
  function cons (line 428) | fn cons(a: AST, b: AST) -> AST {
  function runtime_repr_numerical (line 433) | fn runtime_repr_numerical() {
  function runtime_repr_nil (line 441) | fn runtime_repr_nil() {
  function runtime_repr_string (line 446) | fn runtime_repr_string() {
  function runtime_repr_symbol (line 453) | fn runtime_repr_symbol() {
  function runtime_repr_cons (line 459) | fn runtime_repr_cons() {
  function runtime_repr_list (line 466) | fn runtime_repr_list() {
  function get_all_symbols (line 472) | fn get_all_symbols() {
  function each_source (line 484) | fn each_source() {
  function add10 (line 490) | fn add10(x: SourceOffset) -> SourceOffset {
  function test_depth_atomic (line 495) | fn test_depth_atomic() {
  function test_depth_nested (line 504) | fn test_depth_nested() {

FILE: src/sxp/dotted.rs
  type DottedExpr (line 38) | pub struct DottedExpr<'a> {
  type TryFromDottedExprError (line 47) | pub struct TryFromDottedExprError {
  function accumulate_ast (line 51) | fn accumulate_ast<'a>(vec: &mut Vec<&'a AST>, ast: &'a AST) -> &'a AST {
  function new (line 76) | pub fn new(ast: &'a AST) -> DottedExpr<'a> {
  type Error (line 92) | type Error = TryFromDottedExprError;
  function try_from (line 97) | fn try_from(expr: DottedExpr<'a>) -> Result<Vec<&'a AST>, TryFromDottedE...
  function int (line 112) | fn int(n: i32) -> AST {
  function nil (line 116) | fn nil() -> AST {
  function list (line 120) | fn list(data: Vec<AST>) -> AST {
  function simple_dot (line 125) | fn simple_dot() {
  function proper_list (line 136) | fn proper_list() {
  function improper_list (line 150) | fn improper_list() {

FILE: src/sxp/literal.rs
  type Literal (line 29) | pub enum Literal {
    method fmt (line 52) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    method from (line 67) | fn from(value: i32) -> Literal {
    method from (line 73) | fn from(value: f32) -> Literal {
    method from (line 79) | fn from(value: OrderedFloat<f32>) -> Literal {
    method from (line 85) | fn from(value: String) -> Literal {
    method from (line 91) | fn from(value: &'a str) -> Literal {
    method from (line 97) | fn from(value: bool) -> Literal {

FILE: src/sxp/reify/mod.rs
  type Reify (line 31) | pub trait Reify {
    method reify (line 35) | fn reify(&self) -> Expr;
    method reify (line 41) | fn reify(&self) -> Expr {
  function int (line 56) | fn int(n: i32) -> AST {
  function nil (line 60) | fn nil() -> AST {
  function list (line 65) | fn list(data: Vec<AST>) -> AST {
  function cons (line 69) | fn cons(a: AST, b: AST) -> AST {
  function reify_test (line 74) | fn reify_test() {

FILE: src/sxp/reify/pretty.rs
  function reify_pretty_expr (line 48) | pub fn reify_pretty_expr(value: &AST, max_depth: u32, gen: &mut impl Nam...
  function reify_pretty (line 57) | pub fn reify_pretty<W>(value: &AST, max_depth: u32, gen: &mut impl NameG...
  type PrettyPrinter (line 64) | struct PrettyPrinter<'a, G: NameGenerator> {
  function new (line 72) | fn new(gen: &'a mut G, max_depth: u32) -> Self {
  function reify_pretty_rec (line 76) | fn reify_pretty_rec(&mut self, value: &AST, depth: u32) -> Expr {
  function build (line 97) | fn build(self) -> Vec<Stmt> {
  function reify_literal (line 103) | fn reify_literal(value: &Literal, pos: SourceOffset) -> Expr {
  function cons (line 133) | fn cons(a: AST, b: AST) -> AST {
  function int (line 137) | fn int(n: i32) -> AST {
  function reify_pretty_test_1 (line 142) | fn reify_pretty_test_1() {
  function reify_pretty_test_2 (line 150) | fn reify_pretty_test_2() {
  function reify_pretty_test_3 (line 158) | fn reify_pretty_test_3() {
  function reify_pretty_test_4 (line 167) | fn reify_pretty_test_4() {
  function reify_pretty_test_5 (line 176) | fn reify_pretty_test_5() {
  function reify_pretty_test_6 (line 185) | fn reify_pretty_test_6() {
  function reify_pretty_test_7 (line 201) | fn reify_pretty_test_7() {

FILE: src/sxp/string.rs
  constant ESCAPE_SEQUENCES (line 27) | const ESCAPE_SEQUENCES: phf::Map<char, char> = phf_map! {
  type Error (line 42) | pub enum Error {
  function parse_escapes (line 71) | pub fn parse_escapes(input: &str) -> Result<String, Error> {
  function parse_unicode_sequence (line 105) | fn parse_unicode_sequence(iter: &mut impl Iterator<Item=char>,
  function is_hex_digit (line 147) | fn is_hex_digit(digit: char) -> bool {
  function insert_escapes (line 169) | pub fn insert_escapes(input: &str) -> String {
  function should_escape (line 193) | fn should_escape(ch: char) -> bool {
  function reverse_escape_map (line 197) | fn reverse_escape_map() -> HashMap<char, String> {
  function successful_escaping (line 210) | fn successful_escaping() {
  function failed_escaping (line 219) | fn failed_escaping() {

FILE: src/sxp/syntax.rs
  function unary (line 30) | pub fn unary(head: &str, value: AST, pos: SourceOffset) -> AST {
  function binary (line 40) | pub fn binary(head: &str, b: AST, c: AST, pos: SourceOffset) -> AST {
  function trinary (line 51) | pub fn trinary(head: &str, b: AST, c: AST, d: AST, pos: SourceOffset) ->...
  function quote (line 61) | pub fn quote(value: AST, pos: SourceOffset) -> AST {
  function function (line 66) | pub fn function(value: AST, pos: SourceOffset) -> AST {
  function quasiquote (line 71) | pub fn quasiquote(value: AST, pos: SourceOffset) -> AST {
  function unquote (line 76) | pub fn unquote(value: AST, pos: SourceOffset) -> AST {
  function unquote_spliced (line 81) | pub fn unquote_spliced(value: AST, pos: SourceOffset) -> AST {
  function array (line 87) | pub fn array(tail: AST, pos: SourceOffset) -> AST {
  function dict (line 93) | pub fn dict(tail: AST, pos: SourceOffset) -> AST {
  function vector2 (line 98) | pub fn vector2(x: AST, y: AST, pos: SourceOffset) -> AST {
  function vector3 (line 103) | pub fn vector3(x: AST, y: AST, z: AST, pos: SourceOffset) -> AST {
  function access_slot (line 108) | pub fn access_slot(x: AST, y: AST, pos: SourceOffset) -> AST {
  function get_node_on (line 116) | pub fn get_node_on(x: AST, y: AST, pos: SourceOffset) -> AST {
  function test_unary (line 130) | fn test_unary() {
  function test_binary (line 144) | fn test_binary() {
  function test_trinary (line 159) | fn test_trinary() {
  function test_quote (line 175) | fn test_quote() {
  function test_function (line 189) | fn test_function() {
  function test_quasiquote (line 203) | fn test_quasiquote() {
  function test_unquote (line 217) | fn test_unquote() {
  function test_unquote_spliced (line 231) | fn test_unquote_spliced() {

FILE: src/util/debug_wrapper.rs
  type DebugWrapper (line 32) | pub struct DebugWrapper<T>(pub T);
  method fmt (line 36) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

FILE: src/util/group_by.rs
  type GroupBy (line 26) | pub struct GroupBy<I: Iterator, F> {
  type Item (line 35) | type Item = Vec<<I as Iterator>::Item>;
  method next (line 37) | fn next(&mut self) -> Option<Self::Item> {
  function group_by (line 82) | pub fn group_by<I, F>(iter: I, function: F) -> GroupBy<I, F>
  function group_with (line 94) | pub fn group_with<I, F, G>(iter: I, mut function: F) -> GroupBy<I, impl ...
  function group_by_test_1 (line 108) | fn group_by_test_1() {
  function group_by_test_2 (line 115) | fn group_by_test_2() {
  function group_by_test_3 (line 122) | fn group_by_test_3() {
  function group_with_test (line 129) | fn group_with_test() {

FILE: src/util/lattice.rs
  type Lattice (line 39) | pub trait Lattice {
    method join (line 43) | fn join(self, other: Self) -> Self;
    method meet (line 47) | fn meet(self, other: Self) -> Self;
    method join (line 53) | fn join(self, _other: ()) -> () {
    method meet (line 56) | fn meet(self, _other: ()) -> () {
    method join (line 63) | fn join(self, other: (A, B)) -> (A, B) {
    method meet (line 66) | fn meet(self, other: (A, B)) -> (A, B) {

FILE: src/util/lazy.rs
  type Lazy (line 23) | pub struct Lazy<T, F> {
  function new (line 36) | pub fn new(init: F) -> Lazy<T, F> {
  function force_mut (line 40) | pub fn force_mut(&mut self) -> &mut T {

FILE: src/util/mod.rs
  function fold1 (line 39) | pub fn fold1<I : Iterator, F : FnMut(I::Item, I::Item) -> I::Item>(iter:...
  type PairIter (line 47) | pub struct PairIter<T, I>(Option<T>, I);
  function each_pair (line 67) | pub fn each_pair<T, I>(iter: I) -> PairIter<T, I> where I : Iterator<Ite...
  type Item (line 72) | type Item = (T, T);
  method next (line 74) | fn next(&mut self) -> Option<(T, T)> {
  type NonOverlappingPairIter (line 84) | pub struct NonOverlappingPairIter<I>(I);
  function each_non_overlapping_pair (line 109) | pub fn each_non_overlapping_pair<I: Iterator>(iter: I) -> NonOverlapping...
  type Item (line 114) | type Item = (<I as Iterator>::Item, <I as Iterator>::Item);
  method next (line 116) | fn next(&mut self) -> Option<Self::Item> {
  function merge_hashmap_inplace (line 131) | pub fn merge_hashmap_inplace<K : Eq + Hash, V>(a: &mut HashMap<K, V>,
  function read_to_end (line 146) | pub fn read_to_end(input: &mut impl Read) -> io::Result<String> {
  function option_to_vec (line 154) | pub fn option_to_vec<T>(value: Option<T>) -> Vec<T> {
  function extract_err (line 164) | pub fn extract_err<T>(value: Result<T, Infallible>) -> T {
  function unzip_err (line 176) | pub fn unzip_err<E, FromA, FromB, I, A, B>(iter: I) -> Result<(FromA, Fr...
  function find_or_else_mut (line 195) | pub fn find_or_else_mut<T>(vec: &mut Vec<T>, default: impl FnOnce() -> T...
  type FakeError (line 209) | struct FakeError;
  function test_fold1 (line 212) | fn test_fold1() {
  function test_extract_err (line 224) | fn test_extract_err() {
  function test_unzip_err_1 (line 229) | fn test_unzip_err_1() {
  function test_unzip_err_2 (line 242) | fn test_unzip_err_2() {
  function find_or_else_mut_1 (line 263) | fn find_or_else_mut_1() {
  function find_or_else_mut_2 (line 274) | fn find_or_else_mut_2() {

FILE: src/util/one.rs
  type One (line 26) | pub struct One<T>(pub T);
  type Iter (line 29) | pub struct Iter<'a, T>(Option<&'a T>);
  type IterMut (line 32) | pub struct IterMut<'a, T>(Option<&'a mut T>);
  type IntoIter (line 36) | pub struct IntoIter<T>(Option<T>);
  function iter (line 40) | pub fn iter(&self) -> Iter<'_, T> {
  function iter_mut (line 44) | pub fn iter_mut(&mut self) -> IterMut<'_, T> {
  method clone (line 52) | fn clone(&self) -> Self {
  type Item (line 58) | type Item = T;
  type IntoIter (line 59) | type IntoIter = IntoIter<T>;
  method into_iter (line 61) | fn into_iter(self) -> IntoIter<T> {
  type Item (line 68) | type Item = &'a T;
  method next (line 70) | fn next(&mut self) -> Option<&'a T> {
  type Item (line 79) | type Item = &'a mut T;
  method next (line 81) | fn next(&mut self) -> Option<&'a mut T> {
  type Item (line 90) | type Item = T;
  method next (line 92) | fn next(&mut self) -> Option<T> {
  function one_iter (line 105) | fn one_iter() {
  function one_iter_mut (line 111) | fn one_iter_mut() {
  function one_into_iter (line 121) | fn one_into_iter() {

FILE: src/util/prefix_matcher.rs
  type PrefixMatcher (line 27) | pub struct PrefixMatcher<'a> {
  type PrefixTable (line 34) | struct PrefixTable<T> {
  function new (line 41) | fn new(width: usize) -> PrefixTable<T> {
  function width (line 45) | fn width(&self) -> usize {
  function height (line 49) | fn height(&self) -> usize {
  function get (line 53) | fn get(&self, y: usize, x: usize) -> Option<&T> {
  function get_mut (line 61) | fn get_mut(&mut self, y: usize, x: usize) -> Option<&mut T> {
  function add_row (line 70) | fn add_row(&mut self, row: impl Iterator<Item=T>) {
  function add_row_value (line 80) | fn add_row_value(&mut self, value: T) {
  function build (line 92) | pub fn build<I, S>(options: I) -> Self
  function build_chars_map (line 123) | fn build_chars_map<S>(options: &[&S]) -> HashMap<char, usize>
  function identify_prefix (line 141) | pub fn identify_prefix(&self, string: &str) -> Option<&'a str> {
  constant EMPTY_CELL (line 171) | const EMPTY_CELL: usize = usize::MAX;
  function test_chars_map (line 178) | fn test_chars_map() {
  function test_empty_prefix_identifier (line 187) | fn test_empty_prefix_identifier() {
  function test_empty_string_prefix_identifier (line 197) | fn test_empty_string_prefix_identifier() {
  function test_prefix_identifier_foobar (line 207) | fn test_prefix_identifier_foobar() {
  function test_prefix_identifier_foobar_with_empty (line 222) | fn test_prefix_identifier_foobar_with_empty() {

FILE: src/util/recursive.rs
  type Recursive (line 24) | pub trait Recursive {
    method depth (line 31) | fn depth(&self) -> u32;

FILE: tests/test/builtin_function_test.rs
  function vector_test (line 26) | pub fn vector_test() {
  function vector_syntax_test (line 32) | pub fn vector_syntax_test() {
  function array_test (line 38) | pub fn array_test() {
  function array_syntax_test (line 44) | pub fn array_syntax_test() {
  function dictionary_test (line 49) | pub fn dictionary_test() {
  function dictionary_odd_args_test (line 54) | pub fn dictionary_odd_args_test() {
  function dictionary_literal_test (line 60) | pub fn dictionary_literal_test() {
  function yield_test (line 65) | pub fn yield_test() {
  function assert_test (line 71) | pub fn assert_test() {
  function attribute_test (line 77) | pub fn attribute_test() {
  function method_test (line 83) | pub fn method_test() {
  function simple_builtin_test (line 89) | pub fn simple_builtin_test() {
  function known_gdscript_classes_test_1 (line 96) | pub fn known_gdscript_classes_test_1() {
  function known_gdscript_classes_test_2 (line 102) | pub fn known_gdscript_classes_test_2() {
  function unknown_gdscript_classes_test (line 108) | pub fn unknown_gdscript_classes_test() {
  function return_test (line 116) | pub fn return_test() {
  function yield_running_test (line 122) | pub fn yield_running_test() {
  function yield_star_running_test (line 140) | pub fn yield_star_running_test() {
  function custom_call_magic_test (line 160) | pub fn custom_call_magic_test() {
  function custom_call_magic_test_failed (line 175) | pub fn custom_call_magic_test_failed() {
  function split_call_test_1 (line 183) | pub fn split_call_test_1() {
  function split_call_test_2 (line 191) | pub fn split_call_test_2() {
  function wrapped_random_functions_test (line 200) | pub fn wrapped_random_functions_test() {
  function wrapped_math_functions_test (line 210) | pub fn wrapped_math_functions_test() {
  function wrapped_error_functions_test (line 252) | pub fn wrapped_error_functions_test() {
  function wrapped_load_functions_test (line 258) | pub fn wrapped_load_functions_test() {
  function failed_preload_function_test (line 263) | pub fn failed_preload_function_test() {
  function wrapped_range_functions_test (line 269) | pub fn wrapped_range_functions_test() {
  function wrapped_misc_functions_test (line 280) | pub fn wrapped_misc_functions_test() {
  function convert_function_test (line 306) | pub fn convert_function_test() {
  function convert_function_run_test (line 312) | pub fn convert_function_run_test() {
  function instance_from_id_function_test (line 318) | pub fn instance_from_id_function_test() {
  function instance_from_id_function_run_test (line 323) | pub fn instance_from_id_function_run_test() {
  function str_test (line 333) | pub fn str_test() {
  function printerr_test (line 339) | pub fn printerr_test() {
  function print_test (line 344) | pub fn print_test() {
  function printt_test (line 349) | pub fn printt_test() {
  function prints_test (line 354) | pub fn prints_test() {
  function printraw_test (line 359) | pub fn printraw_test() {
  function print_debug_test (line 364) | pub fn print_debug_test() {
  function builtin_constant_on_type_test (line 369) | pub fn builtin_constant_on_type_test() {
  function builtin_type_constructor_test (line 374) | pub fn builtin_type_constructor_test() {
  function nodepath_constructor_test (line 416) | pub fn nodepath_constructor_test() {
  function str_running_test (line 425) | pub fn str_running_test() {
  function str_running_test_indirect (line 430) | pub fn str_running_test_indirect() {
  function printerr_running_test (line 435) | pub fn printerr_running_test() {
  function printerr_running_test_indirect (line 442) | pub fn printerr_running_test_indirect() {
  function printraw_running_test (line 449) | pub fn printraw_running_test() {
  function printraw_running_test_indirect (line 454) | pub fn printraw_running_test_indirect() {
  function print_running_test (line 459) | pub fn print_running_test() {
  function range_running_test (line 464) | pub fn range_running_test() {
  function range_running_test_indirect (line 470) | pub fn range_running_test_indirect() {
  function print_running_test_indirect (line 476) | pub fn print_running_test_indirect() {
  function deep_equal_test (line 481) | pub fn deep_equal_test() {
  function cons_accessor_test_1 (line 491) | pub fn cons_accessor_test_1() {
  function cons_accessor_test_2 (line 497) | pub fn cons_accessor_test_2() {
  function cons_accessor_test_3 (line 505) | pub fn cons_accessor_test_3() {
  function nodepath_running_test (line 517) | pub fn nodepath_running_test() {
  function vector_constant_print_test (line 523) | pub fn vector_constant_print_test() {
  function object_constant_value_test (line 528) | pub fn object_constant_value_test() {
  function thread_macro_test (line 541) | pub fn thread_macro_test() {
  function last_thread_macro_test (line 547) | pub fn last_thread_macro_test() {
  function as_thread_macro_test_1 (line 553) | pub fn as_thread_macro_test_1() {
  function as_thread_macro_test_2 (line 559) | pub fn as_thread_macro_test_2() {
  function as_thread_macro_test_3 (line 569) | pub fn as_thread_macro_test_3() {
  function list_is_not_shared_running_test (line 579) | pub fn list_is_not_shared_running_test() {
  function array_find_test (line 590) | pub fn array_find_test() {
  function list_find_test (line 599) | pub fn list_find_test() {
  function dict_find_test (line 608) | pub fn dict_find_test() {
  function vector_map_test (line 618) | pub fn vector_map_test() {
  function vector_map_two_arguments_test (line 626) | pub fn vector_map_two_arguments_test() {
  function array_concat_running_test (line 634) | pub fn array_concat_running_test() {

FILE: tests/test/class_test.rs
  function empty_class_test (line 30) | pub fn empty_class_test() {
  function simple_class_test_1 (line 42) | pub fn simple_class_test_1() {
  function simple_class_test_2 (line 60) | pub fn simple_class_test_2() {
  function parent_constructor_class_test_1 (line 78) | pub fn parent_constructor_class_test_1() {
  function parent_constructor_class_test_2 (line 95) | pub fn parent_constructor_class_test_2() {
  function parent_constructor_class_test_3 (line 112) | pub fn parent_constructor_class_test_3() {
  function parent_constructor_class_test_4 (line 157) | pub fn parent_constructor_class_test_4() {
  function parent_constructor_class_test_5 (line 202) | pub fn parent_constructor_class_test_5() {
  function parent_constructor_class_running_test (line 247) | pub fn parent_constructor_class_running_test() {
  function super_call_in_class_test_1 (line 252) | pub fn super_call_in_class_test_1() {
  function super_call_in_class_test_2 (line 268) | pub fn super_call_in_class_test_2() {
  function super_call_in_class_test_3 (line 287) | pub fn super_call_in_class_test_3() {
  function super_call_in_class_test_4 (line 306) | pub fn super_call_in_class_test_4() {
  function super_call_in_class_test_5 (line 319) | pub fn super_call_in_class_test_5() {
  function super_call_closed_in_class_test_1 (line 335) | pub fn super_call_closed_in_class_test_1() {
  function super_call_closed_in_class_test_2 (line 374) | pub fn super_call_closed_in_class_test_2() {
  function super_call_closed_in_class_test_3 (line 417) | pub fn super_call_closed_in_class_test_3() {
  function member_var_class_test_1 (line 460) | pub fn member_var_class_test_1() {
  function member_var_class_test_2 (line 478) | pub fn member_var_class_test_2() {
  function member_var_class_test_3 (line 496) | pub fn member_var_class_test_3() {
  function member_var_class_test_4 (line 514) | pub fn member_var_class_test_4() {
  function member_var_class_test_5 (line 532) | pub fn member_var_class_test_5() {
  function member_var_class_test_6 (line 550) | pub fn member_var_class_test_6() {
  function member_var_class_test_7 (line 567) | pub fn member_var_class_test_7() {
  function init_member_var_class_test_1 (line 585) | pub fn init_member_var_class_test_1() {
  function init_member_var_class_test_2 (line 602) | pub fn init_member_var_class_test_2() {
  function init_member_var_class_test_3 (line 620) | pub fn init_member_var_class_test_3() {
  function ready_member_var_class_test_1 (line 642) | pub fn ready_member_var_class_test_1() {
  function ready_member_var_class_test_2 (line 656) | pub fn ready_member_var_class_test_2() {
  function complicated_member_var_class_test (line 670) | pub fn complicated_member_var_class_test() {
  function complicated_ready_member_var_class_test (line 698) | pub fn complicated_ready_member_var_class_test() {
  function bad_member_var_class_test_1 (line 729) | pub fn bad_member_var_class_test_1() {
  function bad_self_static_ref_class_test (line 738) | pub fn bad_self_static_ref_class_test() {
  function bad_member_const_class_test (line 747) | pub fn bad_member_const_class_test() {
  function bad_static_constructor_class_test (line 757) | pub fn bad_static_constructor_class_test() {
  function bad_nullargs_constructor_class_test (line 766) | pub fn bad_nullargs_constructor_class_test() {
  function bad_super_in_instance_function_test (line 775) | pub fn bad_super_in_instance_function_test() {
  function signal_class_test_1 (line 784) | pub fn signal_class_test_1() {
  function signal_class_test_2 (line 799) | pub fn signal_class_test_2() {
  function signal_class_test_3 (line 814) | pub fn signal_class_test_3() {
  function signal_class_test_4 (line 829) | pub fn signal_class_test_4() {
  function const_in_class_test (line 845) | pub fn const_in_class_test() {
  function const_in_main_class_test (line 860) | pub fn const_in_main_class_test() {
  function static_in_class_test (line 874) | pub fn static_in_class_test() {
  function nullargs_in_class_test_1 (line 890) | pub fn nullargs_in_class_test_1() {
  function nullargs_in_class_test_2 (line 907) | pub fn nullargs_in_class_test_2() {
  function nullargs_in_class_test_3 (line 923) | pub fn nullargs_in_class_test_3() {
  function nullargs_in_class_test_4 (line 939) | pub fn nullargs_in_class_test_4() {
  function static_in_main_class_test (line 955) | pub fn static_in_main_class_test() {
  function simple_self_closure_class_test (line 970) | pub fn simple_self_closure_class_test() {
  function labels_self_closure_class_test (line 1006) | pub fn labels_self_closure_class_test() {
  function labels_self_closure_class_with_contrived_const_test (line 1034) | pub fn labels_self_closure_class_with_contrived_const_test() {
  function simple_self_run_class_test_1 (line 1065) | pub fn simple_self_run_class_test_1() {
  function simple_self_run_class_test_2 (line 1081) | pub fn simple_self_run_class_test_2() {
  function simple_self_run_class_test_3 (line 1097) | pub fn simple_self_run_class_test_3() {
  function self_with_closure_run_class_test (line 1114) | pub fn self_with_closure_run_class_test() {
  function macro_in_class_test_1 (line 1131) | pub fn macro_in_class_test_1() {
  function macro_in_class_test_2 (line 1160) | pub fn macro_in_class_test_2() {
  function macro_in_class_test_3 (line 1174) | pub fn macro_in_class_test_3() {
  function macro_uses_class_test (line 1187) | pub fn macro_uses_class_test() {
  function reference_static_test_1 (line 1200) | pub fn reference_static_test_1() {
  function reference_static_test_2 (line 1222) | pub fn reference_static_test_2() {
  function reference_static_test_3 (line 1241) | pub fn reference_static_test_3() {
  function reference_static_test_4 (line 1261) | pub fn reference_static_test_4() {
  function main_class_test_1 (line 1280) | pub fn main_class_test_1() {
  function main_class_test_2 (line 1291) | pub fn main_class_test_2() {
  function main_class_test_3 (line 1306) | pub fn main_class_test_3() {
  function main_class_test_4 (line 1325) | pub fn main_class_test_4() {
  function macro_uses_main_class_test (line 1336) | pub fn macro_uses_main_class_test() {
  function reference_to_const_in_class_test (line 1349) | pub fn reference_to_const_in_class_test() {
  function reference_to_static_in_class_test (line 1359) | pub fn reference_to_static_in_class_test() {
  function reference_to_outer_in_class_test_1 (line 1369) | pub fn reference_to_outer_in_class_test_1() {
  function reference_to_outer_in_class_test_2 (line 1379) | pub fn reference_to_outer_in_class_test_2() {
  function reference_to_outer_in_class_test_3 (line 1390) | pub fn reference_to_outer_in_class_test_3() {
  function reference_to_outer_in_class_test_4 (line 1400) | pub fn reference_to_outer_in_class_test_4() {
  function constructor_with_parent_class_test_1 (line 1411) | pub fn constructor_with_parent_class_test_1() {
  function constructor_with_parent_class_test_2 (line 1420) | pub fn constructor_with_parent_class_test_2() {
  function constructor_with_parent_class_test_3 (line 1430) | pub fn constructor_with_parent_class_test_3() {
  function constructor_with_parent_class_test_4 (line 1441) | pub fn constructor_with_parent_class_test_4() {
  function constructor_with_parent_class_test_5 (line 1452) | pub fn constructor_with_parent_class_test_5() {
  function get_node_on_self_class_test (line 1463) | pub fn get_node_on_self_class_test() {
  function get_node_on_explicit_target_class_test (line 1480) | pub fn get_node_on_explicit_target_class_test() {
  function nonsense_modifier_class_test_1 (line 1497) | pub fn nonsense_modifier_class_test_1() {
  function nonsense_modifier_class_test_2 (line 1505) | pub fn nonsense_modifier_class_test_2() {
  function nonsense_modifier_class_test_3 (line 1513) | pub fn nonsense_modifier_class_test_3() {
  function nonsense_modifier_class_test_4 (line 1521) | pub fn nonsense_modifier_class_test_4() {
  function duplicate_main_class_test (line 1529) | pub fn duplicate_main_class_test() {
  function no_self_in_scope_test (line 1537) | pub fn no_self_in_scope_test() {
  function duplicate_constructor_test (line 1545) | pub fn duplicate_constructor_test() {
  function class_setget_test_1 (line 1553) | pub fn class_setget_test_1() {
  function class_setget_test_2 (line 1569) | pub fn class_setget_test_2() {
  function class_setget_test_3 (line 1591) | pub fn class_setget_test_3() {
  function class_setget_test_4 (line 1613) | pub fn class_setget_test_4() {
  function class_setget_test_5 (line 1636) | pub fn class_setget_test_5() {
  function class_setget_test_6 (line 1660) | pub fn class_setget_test_6() {
  function class_setget_test_7 (line 1684) | pub fn class_setget_test_7() {
  function class_setget_test_8 (line 1707) | pub fn class_setget_test_8() {
  function class_setget_conflict_test_1 (line 1730) | pub fn class_setget_conflict_test_1() {
  function class_setget_conflict_test_2 (line 1738) | pub fn class_setget_conflict_test_2() {
  function class_setget_conflict_test_3 (line 1746) | pub fn class_setget_conflict_test_3() {
  function class_setget_conflict_test_4 (line 1754) | pub fn class_setget_conflict_test_4() {
  function class_setget_bad_signature_1 (line 1762) | pub fn class_setget_bad_signature_1() {
  function class_setget_bad_signature_2 (line 1769) | pub fn class_setget_bad_signature_2() {
  function class_setget_bad_signature_3 (line 1776) | pub fn class_setget_bad_signature_3() {
  function class_setget_bad_signature_4 (line 1783) | pub fn class_setget_bad_signature_4() {
  function class_setget_runner_test_1 (line 1790) | pub fn class_setget_runner_test_1() {
  function class_setget_runner_test_2 (line 1804) | pub fn class_setget_runner_test_2() {
  function super_call_runner_test_1 (line 1818) | pub fn super_call_runner_test_1() {
  function super_call_runner_test_2 (line 1834) | pub fn super_call_runner_test_2() {
  function super_call_runner_test_3 (line 1851) | pub fn super_call_runner_test_3() {
  function bad_super_call_test (line 1870) | pub fn bad_super_call_test() {
  function builtin_patched_class_test (line 1878) | pub fn builtin_patched_class_test() {
  function builtin_singleton_class_test (line 1887) | pub fn builtin_singleton_class_test() {
  function lambdas_inside_class_and_out_test (line 1893) | pub fn lambdas_inside_class_and_out_test() {
  function lambdas_inside_class_static_and_out_test (line 1951) | pub fn lambdas_inside_class_static_and_out_test() {

FILE: tests/test/collection_conversion_test.rs
  function array_roundtrip_test (line 21) | fn array_roundtrip_test() {
  function array_list_length_test (line 33) | fn array_list_length_test() {
  function list_array_length_test (line 38) | fn list_array_length_test() {
  function array_varargs_test_1 (line 43) | fn array_varargs_test_1() {
  function array_varargs_test_2 (line 49) | fn array_varargs_test_2() {

FILE: tests/test/common/import.rs
  type StringReader (line 30) | struct StringReader {
    method new (line 54) | pub fn new(s: String) -> StringReader {
  type MockFileLoader (line 36) | pub struct MockFileLoader {
    method new (line 42) | pub fn new() -> MockFileLoader {
    method add_file (line 46) | pub fn add_file(&mut self, name: &str, contents: &str) {
  method read (line 61) | fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
  method resolve_input_path (line 72) | fn resolve_input_path(&self, filename: &Path) -> io::Result<Box<dyn Read...
  method resolve_output_path (line 78) | fn resolve_output_path(&self, _filename: &Path) -> io::Result<Box<dyn Wr...

FILE: tests/test/common/mod.rs
  constant TEST_FUNCTION_NAME (line 59) | pub const TEST_FUNCTION_NAME: &'static str = "run_test";
  constant BEGIN_GDLISP_TESTS (line 61) | pub const BEGIN_GDLISP_TESTS: &'static str = "__BEGIN_GDLISP_TESTS__";
  type StringOutput (line 65) | pub struct StringOutput {
  function main_function_handler (line 102) | fn main_function_handler() -> StaticMainFunctionHandler {
  function dummy_config (line 106) | pub fn dummy_config() -> ProjectConfig {
  function dummy_pipeline (line 114) | pub fn dummy_pipeline() -> Pipeline {
  function bind_helper_symbols (line 121) | fn bind_helper_symbols(_table: &mut SymbolTable) {
  function dump_files (line 125) | pub fn dump_files<T>(dir: &mut TempDir, data: &T) -> io::Result<()>
  function parse_and_run_err_impl (line 176) | fn parse_and_run_err_impl(input: &str, runner: &mut GodotCommand) -> Res...
  function strip_cr (line 199) | fn strip_cr(input: &str) -> String {
  function parse_and_run_err (line 205) | pub fn parse_and_run_err(input: &str) -> Result<String, PError> {
  function parse_and_run (line 215) | pub fn parse_and_run(input: &str) -> String {
  function parse_and_run_with_stderr_err (line 219) | pub fn parse_and_run_with_stderr_err(input: &str) -> Result<StringOutput...
  function parse_and_run_with_stderr (line 236) | pub fn parse_and_run_with_stderr(input: &str) -> StringOutput {
  function bind_helper_symbols_comp (line 240) | fn bind_helper_symbols_comp(table: &mut SymbolTable) {
  function parse_compile_and_output_err (line 251) | pub fn parse_compile_and_output_err(input: &str) -> Result<String, PErro...
  function parse_compile_and_output_err_h (line 255) | pub fn parse_compile_and_output_err_h(input: &str) -> Result<(String, St...
  function output_decls (line 284) | fn output_decls(decls: Vec<decl::Decl>) -> String {
  function parse_compile_and_output (line 291) | pub fn parse_compile_and_output(input: &str) -> String {
  function parse_compile_and_output_h (line 295) | pub fn parse_compile_and_output_h(input: &str) -> (String, String) {
  function parse_compile_decl_err (line 299) | pub fn parse_compile_decl_err(input: &str) -> Result<String, PError> {
  function parse_compile_decl (line 317) | pub fn parse_compile_decl(input: &str) -> String {

FILE: tests/test/concurrency_test.rs
  function concurrent_runs_test (line 25) | fn concurrent_runs_test() {

FILE: tests/test/cond_if_test.rs
  function if_tests_expr (line 21) | pub fn if_tests_expr() {
  function if_tests_stmt (line 29) | pub fn if_tests_stmt() {
  function cond_tests_expr (line 35) | pub fn cond_tests_expr() {
  function cond_tests_stmt (line 40) | pub fn cond_tests_stmt() {
  function cond_tests_abbr_expr (line 45) | pub fn cond_tests_abbr_expr() {
  function cond_tests_abbr_stmt (line 50) | pub fn cond_tests_abbr_stmt() {
  function or_test (line 55) | pub fn or_test() {
  function and_test (line 75) | pub fn and_test() {
  function when_test (line 93) | pub fn when_test() {
  function unless_test (line 106) | pub fn unless_test() {
  function if_test_1 (line 122) | fn if_test_1() {
  function if_test_2 (line 131) | fn if_test_2() {

FILE: tests/test/const_test.rs
  function const_test (line 25) | pub fn const_test() {
  function const_test_nonconst (line 39) | pub fn const_test_nonconst() {
  function const_test_nonconst_in_class (line 47) | pub fn const_test_nonconst_in_class() {
  function const_test_nonconst_in_enum (line 55) | pub fn const_test_nonconst_in_enum() {
  function const_test_run (line 63) | pub fn const_test_run() {
  function builtin_const_test (line 71) | pub fn builtin_const_test() {
  function builtin_type_const_test (line 99) | pub fn builtin_type_const_test() {

FILE: tests/test/declaration_test.rs
  function empty_file_test (line 29) | pub fn empty_file_test() {
  function simple_function_declaration_test (line 41) | pub fn simple_function_declaration_test() {
  function lambda_in_function_declaration_test (line 52) | pub fn lambda_in_function_declaration_test() {
  function closed_rw_in_function_declaration_test (line 82) | pub fn closed_rw_in_function_declaration_test() {
  function mutually_recursive_test (line 114) | pub fn mutually_recursive_test() {
  function nonexistent_function_test (line 128) | pub fn nonexistent_function_test() {
  function progn_decl_test (line 136) | pub fn progn_decl_test() {
  function declare_value_test_1 (line 150) | pub fn declare_value_test_1() {
  function declare_value_test_2 (line 160) | pub fn declare_value_test_2() {
  function declare_value_test_3 (line 170) | pub fn declare_value_test_3() {
  function declare_value_test_4 (line 179) | pub fn declare_value_test_4() {
  function declare_value_non_const_test (line 188) | pub fn declare_value_non_const_test() {
  function declare_function_test_1 (line 196) | pub fn declare_function_test_1() {
  function declare_function_test_2 (line 206) | pub fn declare_function
Condensed preview — 267 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,863K chars).
[
  {
    "path": ".github/workflows/style-clippy.yml",
    "chars": 475,
    "preview": "name: Clippy Style Checker\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\nenv:\n  CARGO_"
  },
  {
    "path": ".github/workflows/style-docs.yml",
    "chars": 289,
    "preview": "name: Rustdoc Generation\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\nenv:\n  CARGO_TE"
  },
  {
    "path": ".github/workflows/test-Godotv3.3.3-Ubuntu.yml",
    "chars": 838,
    "preview": "name: \"Ubuntu 20.04 (Godot v3.3.3)\"\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\nenv:"
  },
  {
    "path": ".github/workflows/test-Godotv3.4-Ubuntu.yml",
    "chars": 828,
    "preview": "name: \"Ubuntu 20.04 (Godot v3.4)\"\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\nenv:\n "
  },
  {
    "path": ".github/workflows/test-Godotv3.5-Minimal-Ubuntu.yml",
    "chars": 854,
    "preview": "name: \"Ubuntu 20.04 (Godot v3.5 Minimal)\"\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]"
  },
  {
    "path": ".github/workflows/test-Godotv3.5-Mono-Ubuntu.yml",
    "chars": 952,
    "preview": "name: \"Ubuntu 20.04 (Godot v3.5 Mono)\"\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\ne"
  },
  {
    "path": ".github/workflows/test-Godotv3.5-Ubuntu.yml",
    "chars": 828,
    "preview": "name: \"Ubuntu 20.04 (Godot v3.5)\"\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\nenv:\n "
  },
  {
    "path": ".gitignore",
    "chars": 156,
    "preview": "/target\n/bin\n*~\nGDLisp.gd\nGDLisp.msgpack\n# Generated file that is always identical to /GDLisp.gd\n/MacroServer/GDLisp.gd\n"
  },
  {
    "path": ".readthedocs.yaml",
    "chars": 187,
    "preview": "\nversion: 2\n\nbuild:\n  os: ubuntu-20.04\n  tools:\n    python: \"3.9\"\n\nsphinx:\n  configuration: doc/readthedocs/conf.py\n\npyt"
  },
  {
    "path": "COPYING",
    "chars": 35149,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "Cargo.toml",
    "chars": 635,
    "preview": "[package]\nname = \"gdlisp\"\nversion = \"1.0.0\"\nauthors = [\"Silvio Mayolo <mercerenies@gmail.com>\"]\nedition = \"2018\"\nbuild ="
  },
  {
    "path": "GDLisp.lisp",
    "chars": 49321,
    "preview": "\n;;;; Copyright 2023 Silvio Mayolo\n;;;;\n;;;; This file is part of GDLisp.\n;;;;\n;;;; GDLisp is free software: you can red"
  },
  {
    "path": "MacroServer/TestLoadedFile.gd",
    "chars": 845,
    "preview": "# Copyright 2023 Silvio Mayolo\n#\n# This file is part of GDLisp.\n#\n# GDLisp is free software: you can redistribute it and"
  },
  {
    "path": "MacroServer/main.gd",
    "chars": 5322,
    "preview": "# Copyright 2023 Silvio Mayolo\n#\n# This file is part of GDLisp.\n#\n# GDLisp is free software: you can redistribute it and"
  },
  {
    "path": "MacroServer/main.tscn",
    "chars": 147,
    "preview": "[gd_scene load_steps=2 format=2]\n\n[ext_resource path=\"res://main.gd\" type=\"Script\" id=1]\n\n[node name=\"main\" type=\"Node\"]"
  },
  {
    "path": "MacroServer/project.godot",
    "chars": 106,
    "preview": "\nconfig_version=4\n\n[application]\n\nrun/main_scene=\"res://main.tscn\"\n\n[autoload]\n\nGDLisp=\"*res://GDLisp.gd\"\n"
  },
  {
    "path": "README.md",
    "chars": 2830,
    "preview": "[![GitHub Actions: Ubuntu](https://github.com/mercerenies/gdlisp/actions/workflows/test-Godotv3.5-Ubuntu.yml/badge.svg)]"
  },
  {
    "path": "Rakefile",
    "chars": 1398,
    "preview": "\nrequire 'logger'\nrequire 'fileutils'\n\nif Gem.win_platform?\n  # Needed to be able to create symlinks on Windows.\n  requi"
  },
  {
    "path": "build.rs",
    "chars": 773,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "doc/README.md",
    "chars": 251,
    "preview": "\n# GDLisp Official Documentation\n\nThis is the official documentation for the GDLisp language.\n\n * [`internal/`](internal"
  },
  {
    "path": "doc/internal/CompilationStages.md",
    "chars": 3615,
    "preview": "\n# Compilation Stages\n\n```mermaid\nflowchart LR\n    subgraph AST\n      direction TB\n      Parse[Parse .lisp file into AST"
  },
  {
    "path": "doc/internal/README.md",
    "chars": 80,
    "preview": "\n# Internal GDLisp Documentation\n\n * [Compilation Stages](CompilationStages.md)\n"
  },
  {
    "path": "doc/readthedocs/Makefile",
    "chars": 634,
    "preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the "
  },
  {
    "path": "doc/readthedocs/conf.py",
    "chars": 1029,
    "preview": "# Configuration file for the Sphinx documentation builder.\n#\n# For the full list of built-in configuration values, see t"
  },
  {
    "path": "doc/readthedocs/index.rst",
    "chars": 386,
    "preview": ".. GDLisp documentation master file, created by\n   sphinx-quickstart on Thu Dec  1 12:29:12 2022.\n   You can adapt this "
  },
  {
    "path": "doc/readthedocs/make.bat",
    "chars": 800,
    "preview": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sp"
  },
  {
    "path": "doc/readthedocs/reference/classes.rst",
    "chars": 14141,
    "preview": "\n.. _classes:\n\nClasses and Objected-Oriented Programming\n=========================================\n\nGDLisp, like GDScrip"
  },
  {
    "path": "doc/readthedocs/reference/command-line.rst",
    "chars": 4504,
    "preview": "\nThe GDLisp Command Line Tool\n============================\n\nThe core interface to the GDLisp compiler and programming la"
  },
  {
    "path": "doc/readthedocs/reference/datatypes.rst",
    "chars": 5576,
    "preview": "\nBasic Datatypes\n===============\n\nGDLisp compiles to GDScript and runs on the Godot engine, so the core\ndatatypes for GD"
  },
  {
    "path": "doc/readthedocs/reference/expressions.rst",
    "chars": 33424,
    "preview": "\nExpressions\n===========\n\nExpressions are the forms that make up the body of functions and the\ninitial value of variable"
  },
  {
    "path": "doc/readthedocs/reference/imports.rst",
    "chars": 4838,
    "preview": "\n.. _imports:\n\nImport Directives\n=================\n\nGDLisp uses the special ``use`` directive to import names and\nresour"
  },
  {
    "path": "doc/readthedocs/reference/index.rst",
    "chars": 321,
    "preview": "\n.. _comprehensive:\n\nReference Documentation\n=======================\n\n.. toctree::\n   :maxdepth: 2\n   :caption: Contents"
  },
  {
    "path": "doc/readthedocs/reference/lambda-lists.rst",
    "chars": 5278,
    "preview": "\nLambda Lists\n============\n\nFunctions, macros, and constructors in GDLisp take arguments. As part\nof their declaration s"
  },
  {
    "path": "doc/readthedocs/reference/macros.rst",
    "chars": 5396,
    "preview": "\n.. _macros:\n\nMacros\n======\n\nMacros are the key feature that separates a Lisp dialect from many\nconventional programming"
  },
  {
    "path": "doc/readthedocs/reference/parser.rst",
    "chars": 14177,
    "preview": "\n.. _parser:\n\nThe GDLisp Parser\n=================\n\nThe GDLisp language is a Lisp dialect, with a few extensions to make\n"
  },
  {
    "path": "doc/readthedocs/reference/quoting.rst",
    "chars": 4376,
    "preview": "\n.. _quoting:\n\nQuoting and Quasiquoting\n========================\n\nQuoting an S-expression delays its evaluation. That is"
  },
  {
    "path": "doc/readthedocs/reference/source-file.rst",
    "chars": 12341,
    "preview": "\nStructure of a GDLisp Source File\n=================================\n\nA GDLisp source file is, by convention, written wi"
  },
  {
    "path": "doc/readthedocs/reference/standard-library/functions.rst",
    "chars": 20288,
    "preview": "\nBuilt-in Functions\n==================\n\nAll of the GDLisp global functions are documented here. These\nfunctions are avai"
  },
  {
    "path": "doc/readthedocs/reference/standard-library/index.rst",
    "chars": 475,
    "preview": "\nThe GDLisp Standard Library\n===========================\n\nThe GDLisp standard library is provided at runtime by the\n``GD"
  },
  {
    "path": "doc/readthedocs/reference/standard-library/macros.rst",
    "chars": 9430,
    "preview": "\nBuilt-in Macros\n===============\n\nAll of the global macros available in GDLisp are documented here.\n\n``->``\n------\n\n::\n\n"
  },
  {
    "path": "doc/readthedocs/reference/standard-library/types.rst",
    "chars": 6755,
    "preview": "\nTypes and Classes\n=================\n\nThese are all of the class and enumeration constants defined at the\ntop-level in G"
  },
  {
    "path": "doc/readthedocs/reference/standard-library/values.rst",
    "chars": 2390,
    "preview": "\nGlobal Values\n=============\n\nConstant values defined in the GDLisp value namespace at global scope\nare documented here."
  },
  {
    "path": "doc/readthedocs/requirements.txt",
    "chars": 67,
    "preview": "sphinx==5.2.2\nsphinx_rtd_theme==1.1.1\nsphinxcontrib-mermaid==0.7.1\n"
  },
  {
    "path": "doc/readthedocs/tutorial/classes.rst",
    "chars": 12913,
    "preview": "\nClasses in GDLisp\n=================\n\nGDLisp prides itself on being a functional language, capable of\nmanipulating funct"
  },
  {
    "path": "doc/readthedocs/tutorial/control-flow.rst",
    "chars": 18774,
    "preview": "\nBasic Control Flow\n==================\n\nLet's jump right in and take a look at some GDLisp code. Once you've\n:ref:`built"
  },
  {
    "path": "doc/readthedocs/tutorial/index.rst",
    "chars": 844,
    "preview": "\nGetting Started\n===============\n\nWelcome to GDLisp, the Lisp dialect designed to compile to GDScript!\nIf you're interes"
  },
  {
    "path": "doc/readthedocs/tutorial/lisping.rst",
    "chars": 12332,
    "preview": "\nIntroduction to Lisp\n====================\n\nThe term \"Lisp\" encompasses a broad collection of programming\nlanguages dati"
  },
  {
    "path": "doc/readthedocs/tutorial/macros.rst",
    "chars": 5245,
    "preview": "\nMacros\n======\n\nMacros are the centerpiece of any Lisp. Macros provide a mechanism for\nmodifying the code of your progra"
  },
  {
    "path": "doc/readthedocs/tutorial/modules.rst",
    "chars": 9094,
    "preview": "\nFunctions and Modules\n=====================\n\nNow that we have some basic tools to do calculations and store\nvariables i"
  },
  {
    "path": "doc/readthedocs/tutorial/what-now.rst",
    "chars": 409,
    "preview": "\nWhat's Next\n===========\n\nThis has been a whirlwind tour of the basic features of GDLisp. More\ncomprehensive documentati"
  },
  {
    "path": "minimal.txt",
    "chars": 1426,
    "preview": "\nCommand to build Godot with minimal modules, for testing:\n\n> scons platform=server tools=yes target=release_debug disab"
  },
  {
    "path": "src/command_line.rs",
    "chars": 3632,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/args.rs",
    "chars": 12167,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/body/builder.rs",
    "chars": 4786,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/body/class_initializer.rs",
    "chars": 13269,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/body/class_scope.rs",
    "chars": 5860,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/body/mod.rs",
    "chars": 855,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/body/super_proxy.rs",
    "chars": 2818,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/body/synthetic_field.rs",
    "chars": 3576,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/constant.rs",
    "chars": 10091,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/error.rs",
    "chars": 29672,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/factory.rs",
    "chars": 14303,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/frame.rs",
    "chars": 31057,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/import.rs",
    "chars": 1893,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/mod.rs",
    "chars": 28543,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/names/contextual.rs",
    "chars": 3101,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/names/fresh.rs",
    "chars": 5122,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/names/generator.rs",
    "chars": 1359,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/names/mod.rs",
    "chars": 8882,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/names/registered.rs",
    "chars": 3247,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/names/reserved.rs",
    "chars": 4481,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/preload_resolver.rs",
    "chars": 4447,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/resource_type.rs",
    "chars": 4764,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/special_form/closure.rs",
    "chars": 10071,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/special_form/flet.rs",
    "chars": 9117,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/special_form/lambda.rs",
    "chars": 20910,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/special_form/lambda_class.rs",
    "chars": 8531,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/special_form/lambda_vararg/builder.rs",
    "chars": 7422,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/special_form/lambda_vararg/mod.rs",
    "chars": 6419,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/special_form/let_block.rs",
    "chars": 2541,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/special_form/mod.rs",
    "chars": 6955,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/stateful.rs",
    "chars": 7982,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/stmt_wrapper.rs",
    "chars": 4647,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/symbol_table/call_magic/mod.rs",
    "chars": 23642,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/symbol_table/call_magic/table.rs",
    "chars": 2619,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/symbol_table/function_call.rs",
    "chars": 22353,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/symbol_table/inner.rs",
    "chars": 2731,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/symbol_table/local_var.rs",
    "chars": 25107,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/compile/symbol_table/mod.rs",
    "chars": 19129,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/arglist.rs",
    "chars": 5933,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/class_extends.rs",
    "chars": 2745,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/decl.rs",
    "chars": 22101,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/expr.rs",
    "chars": 19443,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/expr_wrapper.rs",
    "chars": 2115,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/inner_class.rs",
    "chars": 6531,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/cell.rs",
    "chars": 3545,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/class_loader.rs",
    "chars": 7913,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/constant_loader.rs",
    "chars": 6117,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/gdnative/api_type.rs",
    "chars": 1764,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/gdnative/argument.rs",
    "chars": 1873,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/gdnative/class.rs",
    "chars": 3393,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/gdnative/gdnative_enum.rs",
    "chars": 1525,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/gdnative/method.rs",
    "chars": 2249,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/gdnative/mod.rs",
    "chars": 3661,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/gdnative/property.rs",
    "chars": 1547,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/gdnative/signal.rs",
    "chars": 1597,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/magic.rs",
    "chars": 7978,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/library/mod.rs",
    "chars": 8611,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/literal.rs",
    "chars": 5405,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/metadata.rs",
    "chars": 6112,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/mod.rs",
    "chars": 4458,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/op.rs",
    "chars": 5762,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/pattern.rs",
    "chars": 4380,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/spacing.rs",
    "chars": 3214,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/gdscript/stmt.rs",
    "chars": 16683,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/graph/mod.rs",
    "chars": 6057,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/graph/tarjan.rs",
    "chars": 8367,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/graph/top_sort.rs",
    "chars": 3161,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/access_type.rs",
    "chars": 7928,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/arglist/constructor.rs",
    "chars": 5174,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/arglist/error.rs",
    "chars": 3576,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/arglist/general.rs",
    "chars": 3931,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/arglist/mod.rs",
    "chars": 4555,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/arglist/ordinary.rs",
    "chars": 7358,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/arglist/parser.rs",
    "chars": 6254,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/arglist/simple.rs",
    "chars": 3933,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/arglist/vararg.rs",
    "chars": 1807,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/bootstrapping.rs",
    "chars": 4537,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/call_name.rs",
    "chars": 6907,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/classification.rs",
    "chars": 4830,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/closure_names.rs",
    "chars": 5408,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/decl.rs",
    "chars": 26727,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/declaration_table.rs",
    "chars": 4899,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/depends.rs",
    "chars": 3506,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/export.rs",
    "chars": 2372,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/expr.rs",
    "chars": 25712,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/identifier.rs",
    "chars": 6414,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/import.rs",
    "chars": 15537,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/incremental.rs",
    "chars": 38098,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/literal.rs",
    "chars": 1491,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/loops/error.rs",
    "chars": 3291,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/loops/mod.rs",
    "chars": 6888,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/macros.rs",
    "chars": 3622,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/main_function.rs",
    "chars": 3526,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/mod.rs",
    "chars": 8161,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/class.rs",
    "chars": 1753,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/constant.rs",
    "chars": 1438,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/declare.rs",
    "chars": 1435,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/enums.rs",
    "chars": 1406,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/file.rs",
    "chars": 2549,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/function.rs",
    "chars": 1776,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/instance_method.rs",
    "chars": 2399,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/macros.rs",
    "chars": 1574,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/magic.rs",
    "chars": 2202,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/mod.rs",
    "chars": 9667,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/var.rs",
    "chars": 1422,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/modifier/visibility.rs",
    "chars": 1404,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/quasiquote.rs",
    "chars": 10378,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/scope/decl.rs",
    "chars": 7222,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/scope/error.rs",
    "chars": 1631,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/scope/mod.rs",
    "chars": 3697,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/scope/name_table/builder.rs",
    "chars": 2589,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/scope/name_table/mod.rs",
    "chars": 7208,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/special_form/access_slot.rs",
    "chars": 2082,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/special_form/assignment.rs",
    "chars": 1425,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/special_form/local_binding.rs",
    "chars": 1937,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/special_form/mod.rs",
    "chars": 29205,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/ir/special_ref.rs",
    "chars": 2414,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/lib.rs",
    "chars": 1295,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/main.rs",
    "chars": 6207,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/assignment.rs",
    "chars": 2299,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/basic_math_ops.rs",
    "chars": 1869,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/constant.rs",
    "chars": 5236,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/constant_conditional_branch.rs",
    "chars": 3343,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/dead_code_elimination.rs",
    "chars": 3275,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/dead_decl_elimination.rs",
    "chars": 2479,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/dead_var_elimination.rs",
    "chars": 1811,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/direct_var_substitute.rs",
    "chars": 2274,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/else_then_if_fold.rs",
    "chars": 3179,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/expr_walker.rs",
    "chars": 5140,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/mod.rs",
    "chars": 7181,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/noop.rs",
    "chars": 2827,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/redundant_assignment_elimination.rs",
    "chars": 11014,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/stmt_walker.rs",
    "chars": 7842,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/ternary_if_fold.rs",
    "chars": 7365,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/gdscript/variables.rs",
    "chars": 2250,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/ir/expr_walker.rs",
    "chars": 11595,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/ir/mod.rs",
    "chars": 888,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/optimize/mod.rs",
    "chars": 728,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/parser.lalrpop",
    "chars": 6055,
    "preview": "// -*- Rust -*-\n\n// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you c"
  },
  {
    "path": "src/parser_test.rs",
    "chars": 7646,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/can_load.rs",
    "chars": 2353,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/config.rs",
    "chars": 1576,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/error.rs",
    "chars": 5621,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/loader.rs",
    "chars": 1614,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/mod.rs",
    "chars": 10335,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/resolver.rs",
    "chars": 3719,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/source.rs",
    "chars": 9305,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/stdlib_unit.rs",
    "chars": 1590,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  },
  {
    "path": "src/pipeline/translation_unit.rs",
    "chars": 4452,
    "preview": "// Copyright 2023 Silvio Mayolo\n//\n// This file is part of GDLisp.\n//\n// GDLisp is free software: you can redistribute i"
  }
]

// ... and 67 more files (download for full content)

About this extraction

This page contains the full source code of the Mercerenies/gdlisp GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 267 files (1.7 MB), approximately 478.1k tokens, and a symbol index with 2924 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!