portgen

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package portgen builds the Dart generator's copies of the TypeScript generator's language-neutral helpers.

The Dart generator must name fields, key operations and decide table rows exactly as the TypeScript generator does, or the parity test compares two decisions instead of two renderings of one. So those helpers are never written by hand: this package copies the named declarations, doc comments included, applies a short list of renames and a few asserted edits, and the dart package's port_test fails when a committed copy differs from what Generate produces now. A change to the TypeScript original therefore surfaces as a failing test, not as silent drift.

Every edit that is not a rename is asserted: if its anchor is missing or matches the wrong number of times, Generate returns an error rather than skipping the edit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(tsDir string) (map[string]string, error)

Generate builds every ported file from the TypeScript sources in tsDir and returns the formatted contents keyed by file name.

func Write

func Write(tsDir, dartDir string) error

Write generates the ported files and writes them into dartDir.

Types

This section is empty.

Jump to

Keyboard shortcuts

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