diff options
| author | 2023-07-25 23:10:19 +0800 | |
|---|---|---|
| committer | 2023-07-25 23:10:19 +0800 | |
| commit | a3709d1ec5596e3413e0320d882ecebfc00afba7 (patch) | |
| tree | e135de428da23ab2a9249a2560487477af1a4ed0 /docs | |
| parent | 70908b2d0571278597f97bcae7bc2a1bc9773906 (diff) | |
| download | TRPGNivis-a3709d1ec5596e3413e0320d882ecebfc00afba7.tar.gz TRPGNivis-a3709d1ec5596e3413e0320d882ecebfc00afba7.zip | |
charge index
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/docs/index.md | 70 | ||||
| -rw-r--r-- | docs/mkdocs.yml | 38 |
2 files changed, 36 insertions, 72 deletions
diff --git a/docs/docs/index.md b/docs/docs/index.md index e07e102..246dd18 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -2,58 +2,42 @@ hide: - path - navigation + - toc --- +<div align="center"> + <h1><font color="#002fa7">P</font>si CLI</h1> -Psi CLI 语言 -======================== + <q>Psi 是一个函数式编程语言,同时也是一个CLI语言,旨在通过人机交互实现指定的功能。该语言的设计目标是简单、易用、易学,同时也是一个多范式语言,支持函数式、命令式、面向对象、面向过程等多种编程范式。</q><br /> + <b>它是骰主以及插件或模型作者入门水系的关键。</b> -Psi is a new programming language designed with simplicity, flexibility, and performance in mind. It provides a clean and intuitive syntax that is easy to read and write, making it an excellent choice for both beginners and experienced programmers. +</div> +::cards:: cols=2 -Features --------- +- title: 词法分析器模块 + content: | + 词法分析器模块负责将源代码转换为一系列标记(tokens)。它识别语言的基本元素,如标识符、关键字、运算符和字面量。 + <!-- `['OPERATOR', 'IDENTIFIER', 'SEPARATOR', 'SEPARATOR', 'CONTROL', 'IDENTIFIER', 'OPERATOR', 'INTEGER', 'SEPARATOR', 'IDENTIFIER', 'SEPARATOR', 'IDENTIFIER', 'OPERATOR', 'IDENTIFIER', 'SEPARATOR', 'IDENTIFIER', 'SEPARATOR', 'EOF']` --> +- title: 语法分析器模块 + content: | + 语法分析器模块接收词法分析器模块生成的标记序列,并将其转换为抽象语法树(AST)。AST是一种类似树状的数据结构,以更接近编程语言的语法结构的方式表示源代码。 +- title: 内置类型模块 + content: | + 此模块定义了Psi语言的内置类型,如列表和字典。它提供了用于创建和操作这些类型实例的函数。 +- title: 错误处理模块 + content: | + 此模块提供了在运行时捕获和处理错误的机制。它定义了一组异常类和用于抛出和捕获这些异常的函数。 +- title: 执行环境模块 + content: | + 此模块定义了Psi语言的执行环境,包括变量的作用域和生命周期。它提供了用于在执行环境中定义和查找变量的函数。 +- title: 解释器模块 + content: | + 此模块的主要任务是遍历AST并在执行环境中执行相应的操作。 -- `Lexer Module`_: The lexer module is responsible for converting the source code into a sequence of tokens. It recognizes the basic elements of the language such as identifiers, keywords, operators, and literals. ``['OPERATOR', 'IDENTIFIER', 'SEPARATOR', 'SEPARATOR', 'CONTROL', 'IDENTIFIER', 'OPERATOR', 'INTEGER', 'SEPARATOR', 'IDENTIFIER', 'SEPARATOR', 'IDENTIFIER', 'OPERATOR', 'IDENTIFIER', 'SEPARATOR', 'IDENTIFIER', 'SEPARATOR', 'EOF']`` - -- `Parser Module`_: The parser module takes the sequence of tokens generated by the lexer module and transforms it into an Abstract Syntax Tree (AST). The AST is a tree-like data structure that represents the source code in a way that is closer to the syntactic structure of the programming language. - -- `Built-in Types Module`_: This module defines the built-in types of the Psi language, such as lists and dictionaries. It provides functions for creating and manipulating instances of these types. - -- `Error Handling Module`_: This module provides a mechanism for catching and handling errors during runtime. It defines a set of exception classes and functions for throwing and catching these exceptions. - -- `Execution Environment Module`_: This module defines the execution environment of the Psi language, including the scope and lifecycle of variables. It provides functions for defining and looking up variables in the execution environment. - -- `Interpreter Module`_: The main task of this module is to traverse the AST and perform the corresponding operations in the execution environment. - -- `Mathematics Foundation Module`_: This module provides basic mathematical functions and constants, such as addition, subtraction, multiplication, and division. - -- `Documentation Module`_: This module uses reStructuredText and Sphinx to build the documentation, providing API interface descriptions and usage examples. +::/cards:: <!-- <object data="/res/main.pdf" type="application/pdf" style="width: 40%; height: 200px"> <embed src="/res/main.pdf" type="application/pdf" style="width: 40%; height: 40%;"/> </object> --> - -Getting Started ---------------- - -To get started with Psi, you can clone the repository and follow the instructions in the README file. The repository includes a comprehensive set of examples that demonstrate the various features of the language. - - -Contributing ------------- - -Contributions to the Psi project are welcome. If you have a feature request, bug report, or proposal for improvement, please open an issue on the project's GitHub page. If you wish to contribute code, please fork the repository and submit a pull request. - -How to build docs - - git clone https://github.com/HydroRoll-Team/psi.git - cd psi/psi/docs - sphinx-build -b html . _build/html - - -License -------- - -Psi is open-source software, licensed under the MIT license. This means you are free to use, modify, and distribute it under the terms of this license. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 086b8e4..260b4d4 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,15 +1,15 @@ -site_name: Psi Docs (Draft) +site_name: Psi 文档 (草案) repo_url: https://github.com/HydroRoll-Team/psi repo_name: HydroRoll-Team/psi edit_uri: edit/main/docs/docs/ site_author: Hsiang Nianian site_description: >- - Psi is a new programming language designed with simplicity, flexibility, and performance in mind. - It provides a clean and intuitive syntax that is easy to read and write, making it an excellent choice for both beginners and experienced programmers. - + Psi 是一个函数式编程语言,同时也是一个CLI语言,旨在通过人机交互实现指定的功能。 + 该语言的设计目标是简单、易用、易学,同时也是一个多范式语言,支持函数式、命令式、面向对象、面向过程等多种编程范式。 + theme: name: material - language: en + language: zh icon: logo: material/library-outline repo: fontawesome/brands/git-alt @@ -53,9 +53,6 @@ theme: name: Switch to system preference extra: - version: - provider: mike - default: stable homepage: https://psi.retrofor.space alternate: # - name: English @@ -65,12 +62,9 @@ extra: link: / lang: zh consent: - title: Cookie consent + title: Cookie 偏好设置 description: >- - We use cookies to recognize your repeated visits and preferences, as well - as to measure the effectiveness of our documentation and whether users - find what they're searching for. With your consent, you're helping us to - make our documentation better. + 我们使用Cookie来识别您的重复访问和偏好,以及衡量我们的文档的有效性和用户是否找到他们搜索的内容。在您的同意下,这将帮助我们改善我们的文档。 actions: - accept - manage @@ -81,21 +75,7 @@ extra: github: name: GitHub checked: true - analytics: - feedback: - title: Was this page helpful? - ratings: - - icon: material/emoticon-happy-outline - name: This page was helpful - data: 1 - note: >- - Thanks for your feedback! - - icon: material/emoticon-sad-outline - name: This page could be improved - data: 0 - note: >- - Thanks for your feedback! Help us improve this page by - using our <a href="..." target="_blank" rel="noopener">feedback form</a>. + social: - icon: fontawesome/brands/github link: https://github.com/HydroRoll-Team @@ -109,7 +89,7 @@ extra_javascript: copyright: > Copyright © 2013 - PRESENT. <a href="https://github.com/HydroRoll-Team">HydroRoll-Team</a> – - <a href="#__consent">Change cookie settings</a> + <a href="#__consent">管理Cookie</a> markdown_extensions: - neoteroi.timeline |
