Skip to main content

A statically typed programming language runtime and toolchain

Project description

Kval

Kval is a statically typed programming language runtime and toolchain implemented in Python.

Quick Start

Requirements:

  • Python 3.10+

Run a .kval file:

python -m Kval run path/to/file.kval

Compile a .kval file:

python -m Kval compile path/to/file.kval

Project Structure

  • Core/ parser, type checker, runtime, VM
  • Doc/ language documentation
  • Lib/ standard modules and include search path
  • PyModules/ Python bridge modules
  • tests/ grammar and behavior tests
  • Supports/Kval-language-support/ VS Code language extension

Language Docs

  • Chinese grammar: Doc/Grammar(zh-cn).md
  • English grammar: Doc/Grammar(en).md
  • Chinese standard library: Doc/StdLib(zh-cn).md
  • English standard library: Doc/StdLib(en).md
  • Chinese stdlib quick reference: Doc/StdLib-QuickRef(zh-cn).md
  • English stdlib quick reference: Doc/StdLib-QuickRef(en).md
  • Engineering guide: Doc/Engineering.md

VS Code Extension

Extension source is in Supports/Kval-language-support/.

Build:

npm run compile

Package:

npm run vsix

CI

This repository includes GitHub Actions CI in .github/workflows/ci.yml.

It runs checks on push and pull requests, and only runs jobs when related files change:

  • Python quality (Core/, tests/, CLI/tooling files):
    • ruff check Core tests cli.py __main__.py
    • black --check Core tests cli.py __main__.py
    • pytest
  • VS Code extension quality (Supports/Kval-language-support/**):
    • npm install
    • npm run lint
    • npm run format:check
    • npm run compile

Other CI details:

  • Concurrency is enabled to cancel older in-progress runs on the same branch.
  • Python quality runs on Python 3.10 and 3.11.

To reproduce locally:

ruff check Core tests cli.py __main__.py
black --check Core tests cli.py __main__.py
pytest
cd Supports/Kval-language-support
npm install
npm run lint
npm run format:check
npm run compile

License

MIT License. See 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

kval_lang-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

kval_lang-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file kval_lang-0.1.0.tar.gz.

File metadata

  • Download URL: kval_lang-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kval_lang-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d26790c0f103b5f0b9f6fc3566535eecb8534ff58b09a2df8bc365d1f6e294a
MD5 99aea74d633448840efc8922c11049e3
BLAKE2b-256 f945a5c725b56735fd2bf068516a3516ef061d9cd0a3e665ff8e92b509e74b4d

See more details on using hashes here.

File details

Details for the file kval_lang-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kval_lang-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kval_lang-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7625af22d48270640d223f09360fb3e5dfab7ef37d6cbb5a13c460705dc65f7
MD5 18ced32ab0a2517b05d13a6ff3baf89e
BLAKE2b-256 085475d1943bfb16d3abb530202d4dfa7a158375f4d3d4fda68ffe58b0e8973b

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