コンテンツにスキップ

Hello World

const message be ///Hello, World///
console.log[message]

コンパイル結果:

const message = "Hello, World";
console.log(message);

ファイルにコンパイル:

Terminal window
purus build hello.purus
node hello.js

または直接実行:

Terminal window
purus run hello.purus
JavaScriptPurus
=be
"string"///string///
fn(args)fn[args]
{ } ブロックインデント
functionfn
+ - * /add sub mul div
=== !==eq ne
&& || !and or not
const x be 42
let y be 3.14
y be 100
fn greet name
console.log[///Hello/// add name]
greet[///World///]

式本体(toを使用):

fn double x to x mul 2