Skip to content

About this documentation

Ranger is a programming language with a compiler that writes source code in other languages. One Ranger program compiles to JavaScript, TypeScript, Go, Rust, Python, Java, Kotlin, Dart, Swift, C#, C++, PHP and Scala.

Part Content Source
Operator reference Every operator of Lang.rgr, its signature, its target support and the code that it writes Generated from the language definition
Library operators Extra operators declared in Lang.rgr or in an imported file Generated from those sources
Guides The language, the types, the compiler and the target languages Written by hand

The reference is not written by hand and it is not a copy of the compiler sources. A tool does these steps on each release:

  1. The Ranger parser reads the operator sources: compiler/Lang.rgr and the library files in lib/.
  2. The compiler compiles a probe program. The writer context then gives the category and the resolved types of each operator.
  3. The compiler compiles the examples for each target language. The generated code on an operator page is the output of that compilation.
  4. The pages are written from the model and from the compilation results.

The compiler that writes the reference is the compiler of the release. The documentation and the compiler therefore cannot disagree.

The text follows ASD-STE100 Simplified Technical English. The rules are in Writing rules. The text gives technical information. It does not compare Ranger to other languages and it does not recommend Ranger.

  • The playground compiles Ranger in the browser.
  • The games site runs programs that the compiler wrote.
  • The repository holds the compiler and this documentation.
  • The Licenses page states the MIT license of the compiler and the AGPL of the gallery directory.
  • The Office documentation describes EVG and the Office applications. It is AGPL, because it quotes gallery sources.

Ranger 3.5.1 · commit f323fd4 · development build