wz/

directory
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0

README

凹语言中文语法

凹语言的中文语法,简称"凹中文"或者wz。

与WaGo和英文语法一样,凹中文使用共同的ast,即wa/internal/ast包。 但凹中文使用独立的token、scanner和parser,以解析它特有的中文语法。

凹中文的源码文件后缀名为.wz

凹中文前端使用的代码loader、runtime和标准库均与凹英文前端一致。

包结构

  • wz - 凹中文的相关代码包
    • token - 中文的词符定义,如若...则...等中文关键字。
    • scanner - 解析中文词符的扫描器。
    • parser - 将中文词符解析为通用的WaGo AST。
    • util - 辅助工具。例如读取标准库函数时需要做英文名称到中文名称的转译。

Directories

Path Synopsis
Package parser implements a parser for Go source files.
Package parser implements a parser for Go source files.
Package scanner implements a scanner for Go source text.
Package scanner implements a scanner for Go source text.
Package token defines constants representing the lexical tokens of the Go programming language and basic operations on tokens (printing, predicates).
Package token defines constants representing the lexical tokens of the Go programming language and basic operations on tokens (printing, predicates).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL