diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/docs/blog/index.md | 0 | ||||
| -rw-r--r-- | docs/docs/changelog/index.md | 0 | ||||
| -rw-r--r-- | docs/docs/index.md | 48 | ||||
| -rw-r--r-- | docs/mkdocs.yml | 117 |
4 files changed, 165 insertions, 0 deletions
diff --git a/docs/docs/blog/index.md b/docs/docs/blog/index.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/docs/docs/blog/index.md diff --git a/docs/docs/changelog/index.md b/docs/docs/changelog/index.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/docs/docs/changelog/index.md diff --git a/docs/docs/index.md b/docs/docs/index.md new file mode 100644 index 0000000..e3ade6a --- /dev/null +++ b/docs/docs/index.md @@ -0,0 +1,48 @@ +Psi CLI 语言 +======================== + +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. + + +Features +-------- + +- `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. + + +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 new file mode 100644 index 0000000..1273d5c --- /dev/null +++ b/docs/mkdocs.yml @@ -0,0 +1,117 @@ +site_name: Psi Docs (Draft) +repo_url: https://github.com/HydroRoll-Team/psi +repo_name: HydroRoll-Team/psi +edit_uri: edit/main/docs/ + + +theme: + name: material + language: en + icon: + logo: material/library-outline + repo: fontawesome/brands/git-alt + custom_dir: overrides + features: + - content.action.edit + - content.action.view + - navigation.footer + - navigation.tabs + # - navigation.tabs.sticky + - navigation.sections + - navigation.expand + - navigation.path + - navigation.indexes + - toc.follow + - navigation.top + - search.highlight + - search.suggest + - search.share + - header.autohide + - navigation.footer + palette: + # Palette toggle for automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode + + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to system preference + +extra: + version: + provider: mike + default: stable + homepage: https://psi.retrofor.space + alternate: + # - name: English + # link: /en/ + # lang: en + - name: 中文 + link: / + lang: zh + consent: + title: Cookie consent + 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. + actions: + - accept + - manage + cookies: + analytics: + name: Google Analytics + checked: true + 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 + +extra_css: + - stylesheets/extra.css + +extra_javascript: + - javascripts/extra.js + +copyright: > + Copyright © 2013 - PRESENT. <a href="https://github.com/HydroRoll-Team">HydroRoll-Team</a> – + <a href="#__consent">Change cookie settings</a> + +plugins: + - blog + - search + - git-authors + # - git-revision-date-localized + # - git-committers: + # repository: HydroRoll-Team/psi + # branch: main
\ No newline at end of file |
