Skip to main content

HPL (H Programming Language) 是一种基于 YAML 格式的面向对象编程语言

Project description

HPL Runtime

PyPI version License: MIT Python 3.7+

HPL(H Programming Language)运行时 - 一种基于 YAML 格式的面向对象编程语言解释器。

特性

  • 📝 YAML 语法 - 使用人类可读的 YAML 格式编写代码
  • 🏗️ 面向对象 - 支持类、继承和对象实例化
  • 🔄 动态类型 - 无需显式类型声明
  • 📦 模块系统 - 文件包含和标准库导入
  • 🛠️ 标准库 - 内置 math、io、json、os、time 等模块
  • 🐛 调试工具 - 内置错误分析和调试功能

安装

pip install hpl-runtime

快速开始

创建 hello.hpl 文件:

main: () => {
    echo "Hello, HPL!"
  }

call: main()

运行程序:

hpl hello.hpl

完整示例

classes:
  Calculator:
    add: (a, b) => {
        return a + b
      }

objects:
  calc: Calculator()

main: () => {
    result = calc.add(10, 20)
    echo "Result: " + result
  }

call: main()

使用标准库

imports:
  - math
  - io

main: () => {
    echo "PI: " + math.PI
    echo "sqrt(16): " + math.sqrt(16)
    io.write_file("test.txt", "Hello from HPL!")
  }

call: main()

文档

项目链接

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hpl_runtime-1.1.2.tar.gz (132.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hpl_runtime-1.1.2-py3-none-any.whl (99.4 kB view details)

Uploaded Python 3

File details

Details for the file hpl_runtime-1.1.2.tar.gz.

File metadata

  • Download URL: hpl_runtime-1.1.2.tar.gz
  • Upload date:
  • Size: 132.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for hpl_runtime-1.1.2.tar.gz
Algorithm Hash digest
SHA256 71aa8e8504ccbe2122a80c761539b88ceca7197412e59010a95d5f6848bf9f9f
MD5 dc59bd924d0fec587a1c55c9c3528ac2
BLAKE2b-256 5d3c648920ab61b6dc5071ed2e8fb82efc8e3b741c9c7ad745ef3975a7054a6f

See more details on using hashes here.

File details

Details for the file hpl_runtime-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: hpl_runtime-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 99.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for hpl_runtime-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 56d193f4cc9cc04c4f2cff0b0857008fb5daad8432ec922d38e9934a78b0690c
MD5 1196f1a0a62691ce3dc22e9d0b8aee49
BLAKE2b-256 9ad0a3d5cb51b5a21a4a105e69775152006c13700665b5db2d47a0d0f03e07ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page