Skip to content

Rules and tools for portable code | Правила и инструменты для портируемого кода

License

Notifications You must be signed in to change notification settings

OGStudio/cross-language-dialect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross-language dialect (CLD) is a set of tools and rules to write portable code for select programming languages at once.

Kotlin subset is the source that can be translated to the subsets of the following languages:

  • Swift

Swift

Build tests on macOS:

$ ./swift/make

Run tests on macOS:

$ ./swift/do-test

Kotlin

Build tests on macOS:

$ ./kotlin/make

Run tests on macOS:

$ ./kotlin/do-test

Translator

Build translator:

$ cd translator && ./gradlew jar

Parse entities' YML:

$ cd translator && ./run/run-java --file=../test/test-dir/entities.yml --out=../test/test-dir/entities.kt

Current availability of functions

Generation of entities

Type Kotlin
1 struct
2 context X

Generation of entity fields for Kotlin

YML type Kotlin type Default value YML example Kotlin example
1 Bool Boolean false didLaunch: Bool var didLaunch: Boolean = false
2 String String "" method: String var method: String = ""
3 [Type] Array<Type> arrayOf() arguments: [String] var arguments: Array<String> = arrayOf()

About

Rules and tools for portable code | Правила и инструменты для портируемого кода

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published