MCPcopy Index your code
hub / github.com/Mercerenies/gdlisp

github.com/Mercerenies/gdlisp @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
2,593 symbols 6,387 edges 217 files 650 documented · 25% updated 2y agov1.0.0 · 2023-02-20★ 16861 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GitHub Actions: Ubuntu GitHub Actions: Ubuntu GitHub Actions: Ubuntu GitHub Actions: Ubuntu

GDLisp

Lisp for the Godot platform! This language aims to be a Lisp dialect which compiles to GDScript.

This project is built using Cargo with 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.

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.

Extension points exported contracts — how you extend this code

DeclScope (Interface)
Trait for containers of declarations which can meaningfully enumerate the names declared in their scope. Implementors of [6 …
src/ir/scope/decl.rs
Sourced (Interface)
Trait for types which contain [source offset](SourceOffset) information. Several data structures in GDLisp take the fol [13 …
src/pipeline/source.rs
NeedsOuterClassRef (Interface)
Trait for objects, such as declarations, which may need an outer class reference. Before blindly throwing unnecessary r [5 …
src/gdscript/inner_class.rs
ClassScope (Interface)
A `ClassScope` implementor keeps track of which class (if any) we're currently compiling inside. This is used to track w [4 …
src/compile/body/class_scope.rs
StatementLevelPass (Interface)
(no doc) [5 implementers]
src/optimize/gdscript/mod.rs
Lattice (Interface)
Defines the [`Lattice`] trait, for mathematical [lattices](https://en.wikipedia.org/wiki/Lattice_(order)). A [lattice](h [3 …
src/util/lattice.rs
NamedFile (Interface)
Instances of `NamedFile` are file-like objects which have a path. Any object which has a reasonable notion of "file path [2 …
src/runner/named_file.rs
Reify (Interface)
This trait describes any type for which there is a reasonable way to convert a `&self` into [`crate::gdscript::expr::Exp [1 …
src/sxp/reify/mod.rs

Core symbols most depended-on inside this repo

clone
called by 370
src/util/one.rs
map
called by 270
src/ir/modifier/mod.rs
to_owned
called by 250
src/ir/identifier.rs
into_iter
called by 108
src/util/one.rs
iter
called by 85
src/util/one.rs
validate
called by 55
src/compile/args.rs
insert
called by 52
src/compile/preload_resolver.rs
compile_expr
called by 49
src/ir/incremental.rs

Shape

Function 1,437
Method 855
Class 191
Enum 82
Interface 28

Languages

Rust100%

Modules by API surface

tests/test/class_test.rs115 symbols
tests/test/operator_test.rs91 symbols
tests/test/builtin_function_test.rs72 symbols
tests/test/import_test.rs61 symbols
tests/test/macro_test.rs58 symbols
src/ir/expr.rs58 symbols
src/ir/decl.rs54 symbols
tests/test/declaration_test.rs47 symbols
src/sxp/ast.rs47 symbols
src/compile/symbol_table/mod.rs43 symbols
src/compile/symbol_table/local_var.rs42 symbols
src/gdscript/expr.rs38 symbols

For agents

$ claude mcp add gdlisp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact