v0.1.3
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
- Standard library document added. (PR #432, thanks @antfu @statementreply)
Examples
- New example 劉徽割圓術 (PR #431, thanks @cuixiping)
Testing
- More testing cases for hanzi2num added (PR #442, thanks @kaiyuan01)