tiny.syn.highlight
Defined in scan.line.
Marks up one line from a fresh continuation state.
Source
Source: lib/syn/src/scan/line.zig:44
zig
/// Marks up one line from a fresh continuation state. A caller with one line on its own, such as a/// snippet or the README example, marks it up without keeping anything between calls. The function/// behaves as `highlightLine` with a new `State` that is dropped after the call, so a comment or/// string the line leaves open is forgotten. The call replaces the spans the storage held for the/// previous line. The storage must be activated before the call, and the call allocates nothing./// The call returns `.complete` when the spans were kept and `.discarded` when the line was longer/// than the text limit.pub fn highlight( language: Language, text: []const u8, spans: *SpanStorage,) syn.SpanMaterialization { var state: State = .{}; return highlightLine(language, text, &state, spans);}Source: lib/syn/src/root.zig:58
zig
pub const highlight = scan.highlight;Also reachable as
Audit
| Definitions | 1 |
|---|---|
| Public names | 3 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |