Skip to content

v0.1.3

Compare
Choose a tag to compare
@antfu antfu released this 31 Dec 07:02
· 407 commits to master since this release

Macros (Experimental)

As you might (not) have noticed, wenyan-lang strives to be more readable (for ancient Chinese people). Macros provide syntactic sugars to bring the 文采 of your code to the next level.

E.g. Now you can patch wenyan-lang's notorius print function like so:

或云「「書「甲」焉」」。
蓋謂「「吾有一言。曰「甲」。書之」」。

書「「問天地好在」」焉。

Since we're beating JavaScript to macros, here is a rough C equivalence:

#define   書(甲)焉   吾有一言。曰甲。書之
書("問天地好在")焉。

See Full Documation, #440 for more details.

Standard Library

A new standard library 畫譜 that manipulates canvas on web pages. Check out the demo on Online IDE!

Browser Runtime

New package @wenyanlang/runtime allowing you to run Wenyan direct in <script> tag of html! (PR #433, thanks @antfu)

Docs

Examples

Testing