This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Run: `nim r <thisfile>` | |
## | |
## Run this from the root of godot git repo. | |
## | |
## Parses and echos to stdout builtins from @GDScript.xml and @GlobalScope.xml | |
## in a format that is easy to include in | |
## https://github.com/nvim-treesitter/nvim-treesitter gdscript queries. | |
## | |
## - methods <methods><method name="EXTRACT_ME"></method> | |
## - members which are singletons <members><member name="EXTRACT_ME"></member></members> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io' show stdin; | |
import 'dart:convert' show utf8; | |
main() async { | |
try { | |
String input = await stdin.timeout(Duration.zero).transform(utf8.decoder).first; | |
print(input); | |
} on TimeoutException { | |
print('No input was piped into stdin'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gd_scene load_steps=6 format=2] | |
[sub_resource type="GDScript" id=1] | |
script/source = "extends Control | |
class DragDataColor: | |
var sender: Object | |
var color: Color" | |
[sub_resource type="GDScript" id=3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# optional.gd | |
# | |
# Caveat | |
# ------ | |
# This only works with types inheriting from Object. Built-in types don't work | |
# with the call api. Built-ins can still be fetched but they cannot be operated | |
# on. | |
# | |
# This can be fixed by subclassing optional and adding type specific methods | |
# that wrap the builtin type. |