Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeRanDev committed Dec 20, 2022
1 parent a40ce0c commit a960050
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
test/gdscript/out
test/project.godot
test/project.godot
Submit.bat
gdscript.zip
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
# Haxe: GDScript Target
Compile Haxe to GDScript 2.0 like any other Haxe target. Made using [Reflaxe](https://github.com/RobertBorghese/reflaxe).

This project is incomplete and experimental. No guarantee it will be completed.

How to install:

```hxml
# In your compile.hxml file...
# Enable the library
# This will not work currently as this lib hasn't been added to haxelib
-lib gdscript-target
-lib gdscript
# Set output folder to "./output"
-D gdscript-output=output
```

## How it outputs

* As GDScript outputs one file per class, each class, regardless of module, receives its own file.
- [x] As GDScript outputs one file per class, each class, regardless of module, receives its own file.

- [x] A custom version of the Haxe standard library is made for GDScript (check out `std/gdscript/_std`)

* A custom version of the Haxe standard library is made for GDScript (check out `std/gdscript/_std`)
- [ ] Bindings to the Godot classes/functions (check out `std/godot`)

* If GDScript is being generated, conditional compilation can be used with the `gdscript` define.
- [x] If GDScript is being generated, conditional compilation can be used with the `gdscript` define.
```haxe
#if gdscript
doSomethingOnlyForGDScript();
#end
```

* GDScript can be injected directly using:
- [x] GDScript can be injected directly using:
```haxe
untyped __gdscript__("print(123)");
```

* GDScript meta can be defined using `@:meta`, though there should be defined metadata for each existing attribute in GDScript.
- [ ] GDScript meta can be defined using `@:meta`, though there should be defined metadata for each existing attribute in GDScript.
```haxe
@:meta(onready) var someVal = get_node("myNode")
```

- [ ] (Unfinished) Haxe enum support
8 changes: 4 additions & 4 deletions haxelib.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "gdscript-compiler",
"version": "1.0.0",
"name": "gdscript",
"version": "0.1.0",
"description": "Compile Haxe to GDScript 2.0 as easily as you'd output to any other target.",
"url": "https://github.com/RobertBorghese/Haxe-CompileToGDScript",
"url": "https://github.com/RobertBorghese/Haxe-to-GDScript",
"license": "MIT",
"tags": [
"godot",
Expand All @@ -17,6 +17,6 @@
"extension"
],
"classPath": "src/",
"releasenote": "Initial release.",
"releasenote": "Initial release. Most syntax and Std, Math, String, Array, haxe.Log works.",
"contributors": ["RobertBorghese"]
}

0 comments on commit a960050

Please sign in to comment.