Skip to main content

Module names

Module names 

Source
Expand description

A names table: every display name of a story (characters, places, factions, terms) by stable id, so a rename is one line. Text refers to a name with a token, {n:<id>} (or {N:<id>} for a capital first letter), filled in by Names::substitute when it is shown. As a format (ADR-0007): NamesRon.

Structs§

NameToken
A name token: the inside of {n:<id>} or {N:<id>}.
Names
Every display name, by name id.
NamesRon
A names table (names, .ron), checked as from_source says.

Functions§

from_source
Parses and validates names source, attributing errors to file: valid ids, each once; values non-empty, without braces or control characters (char_problem), each used once. Whether the font draws a name is checked with the rest of the text (undrawn). Reports every problem found.
is_name_id
Whether id is a valid name id: lowercase ASCII letters, digits, _ and ., not empty.
literal_form
What of display name name the literal-name check looks for: the name without a leading the , a or an (so the Old Mill is also found as Old Mill), or None for a name with no capital letter (breath, a vow: ordinary words the check would trip on).
name_token
The name token that token (the text between the braces) is, if it starts with n: or N:. The id may be anything; see is_name_id.
with_part
names (the table of file story) with the names of source added (a second file, the test files’ names, say). source is checked like a names file of its own, attributing errors to file; an id or a name that names has too is an error.