Metadata-Version: 2.4
Name: pygments-mvl
Version: 0.1.5
Summary: Pygments lexer for MVL (Maximum Verifiable Language)
Author-email: MVL Team <noreply@mvl-lang.org>
License-Expression: Apache-2.0
Project-URL: Homepage, https://mvl-lang.org
Project-URL: Repository, https://github.com/mvl-lang/mvl-spec
Project-URL: Changelog, https://github.com/mvl-lang/mvl-spec/blob/main/tools/pygments/CHANGELOG.md
Keywords: pygments,lexer,syntax-highlighting,mvl
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pygments>=2.17
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Dynamic: license-file

# pygments-mvl

Pygments lexer for MVL source code.

```bash
pip install pygments-mvl
pygmentize -l mvl example.mvl
```

Registers under the `mvl` alias and claims `*.mvl`, so ```` ```mvl ```` fences work
anywhere Pygments is installed.

## Structure

```
tools/pygments/
├── pyproject.toml           Package manifest — publishes as `pygments-mvl` to PyPI
├── README.md
├── LICENSE                  Apache-2.0
├── mvl_pygments/
│   ├── __init__.py
│   ├── lexer.py             RegexLexer subclass; keyword sets generated from
│   │                        ../../grammar/keywords.yaml
│   └── keywords.py          Generated file — do NOT edit by hand
└── tests/
    ├── test_lexer.py
    └── corpus/              MVL example files for visual smoke-testing
```

## Design notes

- Keyword sets come from `grammar/keywords.yaml` via `tools/generators/gen_pygments.py`.
- Handle effect syntax (`! Console + Net`), refinements (`where x > 0`), contracts (`requires`, `ensures`, `invariant`, `decreases`), capabilities (`iso`, `val`, `ref`), IFC labels (`Tainted[T]`, `Secret[T]`, and the capability labels `ConfigPath[T]` / `DbUrl[T]` / `ApiEndpoint[T]` / `AuditTarget[T]`). There is no `Public` label — unlabeled is public by default.
- String literals: single-line, triple-quoted, raw (`r"..."`), raw triple.
- Comments: `//` line, `///` doc.

## Publishing

```bash
git tag pygments-v0.1.5
git push --tags
```

`.github/workflows/publish-pygments.yml` builds and uploads via PyPI Trusted
Publishing (OIDC) — no API token. It refuses to publish unless
`mvl_pygments/keywords.py` carries the generated banner, so hand-written keyword
tables cannot reach PyPI.

## Downstream consumers

- [mvl-lang.org](https://mvl-lang.org) — swaps `` ```rust `` fences back to `` ```mvl `` once this ships (tracked in [mvl-lang.github.io#5](https://github.com/mvl-lang/mvl-lang.github.io/issues/5))
- Any static-site generator using Pygments (Sphinx, mkdocs, Hugo with Chroma)
- Jupyter notebook code blocks
