npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tgkw

v1.0.0

Published

析古国文言抽象之树,运转今夕阵列之卷。

Downloads

5

Readme

文言

此项目为一个恶搞的文言文编程语言,其语法与文言文相似。

文件

代码文件以.文言为扩展名。

命令行工具

使用./文言命令来运行项目的命令行工具。

帮助信息

使用以下命令查看帮助信息:

./文言 助
./文言 -助
./文言 --助也

编译命令

使用命令将文言代码编译为抽象语法树和令牌:

# 从文件编译
./文言 译 文件路径.文言

# 从标准输入编译
./文言 译

可选参数:

  • -树, --抽象树 <文件路径>:将抽象语法树保存到指定文件
  • -牌, --令牌 <文件路径>:将令牌保存到指定文件

运行命令

使用运转命令编译并运行文言代码:

# 从文件运行
./文言 运转 文件路径.文言

# 从标准输入运行
./文言 运转

语法

所有语句末尾必须以句号结尾。

导入模块

《模块名》曰:导入符号1,...导入符号n。

调用函数

函数名,已知【参数1】为 值1,...【参数n】为 值n。

字面量

“字符串”
114514
阴/阳

定义函数

使用关键字来返回。

涵义【函数名】,需知 参数类型1【参数1】,...参数类型n【参数n】:
    语句1。
    ...
    语句n。

    求 结果。

条件运算符

代表==不是代表!=胜于代表>=不及代表<=代表!

流程控制

条件

倘若 条件1:
    语句。
再则 条件2:
    语句。
再则 条件n:
    语句。
否则:
    语句。

循环

当 条件:
    语句。

变量

声明

声明变量时,需要指定变量的类型。使用关键字,后跟类型和变量名。

令 变量类型【变量名】为 值。

赋值

对已声明的变量重新赋值时,不需要再次指定类型。

令 变量名 为 值。

使用

读取变量时直接使用变量名即可。

令 数字【甲】为 114514。
令 甲 为 甲 加 1。
曰,已知【文】为 甲。

作用域

  • 全局变量:在函数外部声明的变量,可在整个程序中访问。
  • 局部变量:在函数内部声明的变量,仅在函数内部有效。
  • 嵌套函数可以访问外部函数的变量。