コンテンツにスキップ

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 neq
&& || !and or not
const x be 42
let y be 3.14
y add be 1 -- y += 1(複合代入)
fn greet name
console.log[//;Hello;// add name]
greet[//;World;//]

式本体(toを使用):

fn greet name to console.log[name]