Skip to content
プロジェクト

概要

🔮 A modern multi-paradigm compiled programming language for the JVM platform. website: https://ixionlang.ru/

言語・ランタイム

この数値の測り方

計測したスター増加

24時間
0
7日間
+4
15日間
+4
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Multi-paradigm compiled programming language for the jvm platform.

Specification: Русский · English

Docs: Русский

Build from source

Install JDK 21 and make sure java -version reports version 21. The repository includes the Gradle Wrapper, which downloads Gradle and the project dependencies on the first build.

Clone the repository and open its root directory.

git clone https://github.com/ixionlang/ixion.git
cd ixion

On macOS or Linux, run:

./gradlew build

On Windows, run this in PowerShell:

.\gradlew.bat build

The build runs the tests and writes the compiler JAR to build/libs/.

Examples

tree:

use <std>

type Tree[T] = enum {
  Leaf(value: T),
  Node(left: Tree[T], right: Tree[T]),
}

def mapTree[A, B](tree: Tree[A], f: (A) => B): Tree[B] {
  return case tree {
    Tree::Leaf(value) => Tree::Leaf(f(value)),
    Tree::Node(left, right) => Tree::Node(mapTree(left, f), mapTree(right, f)),
  }
}

def main() {
  let tree = Tree::Node(Tree::Leaf(-1), Tree::Leaf(7))
  std::println(mapTree(tree, lambda (n) { return n > 0 }))
}

Result:

use <std>

def mapResult[A, B, E](result: Result[A, E], f: (A) => B): Result[B, E] {
    return case result {
        Result::Ok(value) => Result::Ok(f(value)),
        Result::Err(error) => Result::Err(error),
    }
}

def main() {
    let success: Result[int, string] = Result::Ok(21)
    let failure: Result[int, string] = Result::Err("offline")

    std::println(mapResult(success, lambda (n) { return n >= 18 }))
    // Ok(true)

    std::println(mapResult(failure, lambda (n) { return n >= 18 }))
    // Err(offline)
}

Contributions

We will review and help with all reasonable pull requests as long as the guidelines below are met.

  • The license header must be applied to all java source code files.
  • IDE or system-related files should be added to the .gitignore, never committed in pull requests.
  • In general, check existing code to make sure your code matches relatively close to the code already in the project.
  • Favour readability over compactness.
  • If you need help, check out the Google Java Style Guide for a reference.

関連プロジェクトを探す

読み込み中…