git @ Cat's Eye Technologies Lome / master src / lome / ast.py
master

Tree @master (Download .tar.gz)

ast.py @masterraw · history · blame

# Copyright (c) 2025-2026, Chris Pressey, Cat's Eye Technologies.
# This file is distributed under a 2-clause BSD license.  See LICENSES/ dir.
# SPDX-License-Identifier: LicenseRef-BSD-2-Clause-X-Lome

from dataclasses import dataclass
from typing import List, Optional

from .term import Ctor, Term


@dataclass
class Rule:
    lhs: Ctor
    rhs: Term


@dataclass
class Theorem:
    rule: Optional[Rule]
    terms: List[Term]


@dataclass
class Development:
    rules: List[Rule]
    theorems: List[Theorem]