26 Transpiler
Jori edited this page 2026-05-13 12:02:35 +00:00

Features

Roslyn Syntax Tree Visualizer

  • Exports the syntax tree of a class to Godot nodes for inspection

Godot Library

  • Convert GDScript Enum Types Node.ProcessModeEnum to Node.ProcessMode
  • Convert GDScript Enum Values Node.ProcessModeEnum.Disabled to Node.PROCESS_MODE_DISABLED
  • Convert Godot.GD functions to global functions GD.print to print

GD Script Injection

  • Add GDScript from comment with GDGlue.CommentToGD
  • Add GDScript by string with GDGlue.InserGDScript

C# Files

  • Create own files for each class/struct
  • Create wrapper class for single file enum enum RJ_TriggerMode to class_name RJ_TriggerModeEnums
  • Create prefixed names for Rokojori Object Types
  • Handles partial classes split into multiple files

C# List/Array

  • List/Array => Array: Length/Count to size(), Add to append ,Remove to erase etc

C# Dictionary

  • Dictionary<K,V> => Dictionary[K,V]

C# HashSet

  • HashSet => Dictionary[K,true]

C# String

  • string: Length to length()
  • Automatic string conversion of number/string add binary expressions n+s to str(n)+s

C# Delegates/GDScript Callable

  • add call invocation callable(x) to callable.call( x )
  • rewrite to not-nullable type with
  • declaration null-initializers from null to Callable()
  • variable null-initializers from null to Callable()
  • null-comparisons from c == null to c == null || c.is_null()

Comments

  • Converting class comments
  • Converting member comments

Properties

  • Getters/setters creation

Export Annotations

  • Basic Export
  • ExportToolButton
  • ExportGroup
  • ExportCategory

Nullables

  • Handling nullable types of C# (String, Dictionary, Acrray, Callable) on member/local declarations/parameters
  • Adding and assigning null flag on assignment, passing default instead null
  • Reading null flag instead value for null comparisons

GD Functions

  • Ommiting return type value description in GDScript with Rokojori.Null as return type

Math

  • float.MaxValue converted to value
  • float.IsInfinity to is_inf
  • float.IsNaN to is_nan
  • Converting modulo a % b to func fmod( a, b )
  • Convert Godot.Mathf functions to global functions Mathf.max to max
  • Convert Godot.Mathf XXXtoInt to XXX Mathf.RoundToInt to round

Generics

  • Prepend/append type as parameter for per class, for all methods
  • Prepend/append type as parameter individually for a method

Statements

  • For loops with increments

Expressions

  • Remove as expressions of interfaces instance as InterfaceType

C# Method Overloading

  • Throwing errors on method overloading








==============