Skip to content
Playground

言語リファレンス

Yulang の構文と意味を機能ごとにまとめたページです。言語を学ぶときはガイドへ、 何かを調べるときはこちらへ来てください。

プログラムの形

Yulang の program は、top-level statement の列です。statement は宣言と式に 分かれ、宣言には myourpubstructenumactroleimplerrorcasttypeusemod があります。トップレベルに裸の式を書く と、その式は実行され、CLI / playground の Result pane に表示されます。

Visibility

Keyword意味
myprivate binding。local でも top-level でも置けます
ourpublic。囲んでいる module の companion から見えます
pub外部 module へ export。playground の Types pane にも現れます

コメント

yulang
// 通常の line comment。

/* 通常の block comment。 */

-- 単一行 doc comment(line comment ではありません)。

---
複数行 doc block。
markdown と ```yulang fence を含められます。
---

///* ... */ は通常のコメント、----- は doc comment です。 doc comment は構文木や tooling に現れる可能性があり、// と入れ替え可能 ではありません。

トピック別

表面の構文

値と型

計算

スタイル

理論

標準ライブラリ

Yulang