toolchain

package
v0.0.0-...-bbe2460 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package toolchain provides helpers that replicate the Selene CLI pipeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteFile

func ExecuteFile(rt *runtime.Runtime, filename string) error

ExecuteFile parses and runs a Selene source file within the provided runtime. It is a light wrapper around ParseFile and runtime.Run that ensures consistent error formatting across tooling entry points.

func LoadDependencies

func LoadDependencies(rt *runtime.Runtime, entry string) error

LoadDependencies wires vendored modules recorded in selene.toml/selene.lock into the provided runtime so that imports work when evaluating a standalone entry point. The logic mirrors the CLI implementation but is exposed as a reusable helper for tests and additional tooling commands.

func ParseFile

func ParseFile(filename string) (*ast.Program, string, error)

ParseFile reads, lexes, and parses a Selene source file into an AST program. It mirrors the CLI's behaviour so that other packages (tests, example runners, and auxiliary tooling) can reuse the same entry point without duplicating the lexing/parsing pipeline.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL