DefinedWords class final

The defined words of a text being read, one line at a time: each line is given to rewrite with its indent, and the lines it stands for come back (itself, moved into the slot of a use it is under, or a use's expansion). finish gives what is still open at the end.

Constructors

DefinedWords(Map<String, List<NotationDefinition>> definitions, {required bool open, void record(String kind, String word, String on, String? value, int column, [String? say])?, void issue(int column, String message)?, void used(NotationDefinition definition, LineParts parts, String node, int column)?, void slot(NotationDefinition definition, String word, int column)?, bool ours(String word)?, Set<String>? component(String word)?, Map<String, int>? counts, Map<String, Set<String>>? scoped, String? context, List<String> within = const [], Map<String, List<NotationDefinition>>? page, bool variable(String word)?, bool textVariable(String word)?, bool eachItem(String word)?, void internal(String name)?, void bindsVariable(String name, int column, String? start)?, String? builtIn(String word, bool primitive)?, Map<String, Object?> theme = const {}})

Properties

bindsVariable → void Function(String name, int column, String? start)?
A variable of the page a use binds (Stepper @servings), at its column, with what a state line for it would start at (as written).
final
builtIn → String? Function(String word, bool primitive)?
What is said of a definition of a word the notation already has (notationBuiltInDefinition), or null: such a definition read as the text arrives is not used, and this is said.
final
component → Set<String>? Function(String word)?
The names a component of the design system takes (its props, its events, @ when it keeps a value), when word is one; null when it is not. A component's word may take further meanings from definitions that name theirs (Stepper#steps): a use is read as one of them only when it fits it better than the component (docs/design/20 section 5).
final
context → String?
Inside a definition's body: where it is written (StickyNote.txt:3). What is wrong there is an issue that says so, whatever open is.
final
counts → Map<String, int>
How many uses of each word have taken an id of their own so far.
final
definitions → Map<String, List<NotationDefinition>>
The definitions by word.
final
eachItem → bool Function(String word)?
Whether name is the item of an each around the line.
final
hashCode → int
The hash code for this object.
no setterinherited
internal → void Function(String name)?
A variable the expansion makes for a use that binds none of its own (value_stepper1): the use's own, declared by no state line.
final
issue → void Function(int column, String message)?
A problem, at a column of the line being read.
final
open → bool
With the open vocabulary a word a use writes that its definition does not have is recorded (record); without it, it is an issue.
final
ours → bool Function(String word)?
The words that are the notation's own (a core type, a catalog type, a page word, a component): never a defined word's.
final
page → Map<String, List<NotationDefinition>>
The words the text itself defines (define Word …), over definitions: a page's own definition of a word the design system defines wins there. Shared with the overlays written after the page.
final
record → void Function(String kind, String word, String on, String? value, int column, [String? say])?
A word on a use its definition does not have (kind parameter, flag, event, variant, children, missing), as a stand-in's would be. (With what the reader says of it, when it can say what to write.)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scoped → Map<String, Set<String>>
Each id written inside a defined word, with the ids its uses made of it (search: search_filterBar1): what a focus or a scroll of the page that names the written id reaches when one is on the page.
final
slot → void Function(NotationDefinition definition, String word, int column)?
A line under a use naming one of its slots (Front): a word of the definition, not drawn.
final
textVariable → bool Function(String word)?
Whether name is a text variable of the page's state (not an each's item): where a parameter is a name (an icon's, a page's), a bare word that is also one could mean either, and the use says so.
final
theme → Map<String, Object?>
What a body reads as theme.<name> (docs/design/20 section 16): the looks the page words read, by name, as they write them (notationThemeReads).
final
used → void Function(NotationDefinition definition, LineParts parts, String node, int column)?
A use, read as definition, whose root is the node node.
final
variable → bool Function(String word)?
Whether name is a variable of the page (its state, or the item of an each around the line): a use's bpm=bpm gives the value, not a word.
final
within → List<String>
The words being expanded around this one (a word inside its own body is refused).
final

Methods

finish() → List<DefinedLine>
What is still open at the end of the text.
has(String word) → bool
Whether word is a defined word here (a definition, or a define read in the text so far). A word of the notation's own is not, except a design system's component that the page's own definition names with no meaning of its own (define Counter …): on that page the definition replaces the component (docs/design/20 section 6). The core's words, the catalog's and the page words are never replaced.
meanings(String word) → List<NotationDefinition>
The meanings of word a use may be read with: all of a defined word's, or the named ones a component's word has (empty: none).
namesAThing(NotationDefinition d, String name, [int depth = 0]) → bool
Whether the parameter name of d is a name where its body reads it: an icon's (Icon "{icon}", icon={icon}), a page's (go {to}), or such a parameter of a defined word its body calls. A bare word given to it is that name, as it is on a line of the notation's own.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preread(Map<String, List<NotationDefinition>> words, {Iterable<String> signatures = const []}) → void
words (from readPageDefinitions of the whole text, or of the other screens of an answer) as the text's own, from its first line.
rewrite(int indent, String text, {String? from, int? line}) → List<DefinedLine>
The lines text at indent stands for. from is where it is written when it is not the page's own line.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited