{"id":14961798,"url":"https://github.com/you-win/advanced-expression-gd","last_synced_at":"2025-04-05T19:44:45.210Z","repository":{"id":65523240,"uuid":"476055573","full_name":"you-win/advanced-expression-gd","owner":"you-win","description":"More powerful Expressions for Godot","archived":false,"fork":false,"pushed_at":"2022-08-23T02:16:51.000Z","size":760,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"senpai","last_synced_at":"2025-03-12T01:05:30.980Z","etag":null,"topics":["godot"],"latest_commit_sha":null,"homepage":"","language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/you-win.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-30T21:22:52.000Z","updated_at":"2023-08-08T11:11:28.000Z","dependencies_parsed_at":"2023-01-27T06:01:41.241Z","dependency_job_id":null,"html_url":"https://github.com/you-win/advanced-expression-gd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fadvanced-expression-gd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fadvanced-expression-gd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fadvanced-expression-gd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/you-win%2Fadvanced-expression-gd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/you-win","download_url":"https://codeload.github.com/you-win/advanced-expression-gd/tar.gz/refs/heads/senpai","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393540,"owners_count":20931810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["godot"],"created_at":"2024-09-24T13:27:46.774Z","updated_at":"2025-04-05T19:44:45.192Z","avatar_url":"https://github.com/you-win.png","language":"GDScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Expression GD\n\n[![Chat on Discord](https://img.shields.io/discord/853476898071117865?label=chat\u0026logo=discord)](https://discord.gg/6mcdWWBkrr)\n[![package](https://img.shields.io/badge/package-1.0.0-blue)](https://www.npmjs.com/package/@sometimes_youwin/advanced-expression)\n\nFunctions like Godot's built-in `Expression` class with the flexability of an actual script.\n\nSee the `tests/` directory for more examples.\n\n## Example\n```GDScript\nvar ae = preload(\"res://addons/advanced-expression/advanced_expression.gd\")\n\n# Add variables\n# Currently, variables must be preinitialized with a value since,\n# in the author's opinion, variables should avoid being null when possible\nae.add_variable(\"counter\").add(0)\n\n# Add function with a parameter\nae.add_function(\"increment\") \\\n\t.add_param(\"input: int\") \\\n\t.add(\"return input + 1\")\n\n# Add runner code that will be run on execute\n# Follows the same semantics as regular functions\nae.add() \\\n\t.add_param(\"starting_value\") \\\n\t.add(\"counter = starting_value\") \\\n\t.add(\"for i in 5:\") \\\n\t.tab() \\\n\t.add(\"counter = increment(counter)\") \\\n\t.add(\"return counter\")\n\n# Everything must be compiled before executing\nif ae.compile() != OK:\n\tpush_error(\"Failed to compile\")\n\n# Parameters must be passed as an array\n# These are passed to the runner function\nassert(ae.execute([1]) == 6)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyou-win%2Fadvanced-expression-gd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyou-win%2Fadvanced-expression-gd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyou-win%2Fadvanced-expression-gd/lists"}