summaryrefslogtreecommitdiff
path: root/src/lib_syntax.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib_syntax.zig')
-rw-r--r--src/lib_syntax.zig19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib_syntax.zig b/src/lib_syntax.zig
index 395a02f0..a25af884 100644
--- a/src/lib_syntax.zig
+++ b/src/lib_syntax.zig
@@ -51,6 +51,25 @@ pub const SourceAnalysis = syntax.SourceAnalysis;
pub const ContextDeclaration = syntax.ContextDeclaration;
pub const analyzeSource = syntax.analyzeSource;
+/// A unified diff as a language: `diff` walks one a line at a time
+/// (`Walk`: a line's kind, the file its section names, the hunk's line
+/// numbers) and says what a row of it points at (`targetAt`);
+/// `highlightDiff` is a style byte for each byte of `content[start..end]`,
+/// the caller's to free: headers as comments, `@@` lines as keywords, each
+/// hunk's code in the language of the file its section names (old and new
+/// side each parsed whole), and over that an added or removed line's
+/// grounds (`ground_add`, `ground_del`; its first byte `ground_emph`, the
+/// strong row). A byte's low bits (`syn_bits`) are a `Syn`; `Grounds` are
+/// a theme's colours for the rest.
+pub const diff = @import("diff.zig");
+pub const highlightDiff = syntax.highlightDiff;
+pub const syn_bits = syntax.syn_bits;
+pub const ground_add = syntax.ground_add;
+pub const ground_del = syntax.ground_del;
+pub const ground_emph = syntax.ground_emph;
+pub const ground_line = syntax.ground_line;
+pub const Grounds = colors.Grounds;
+
/// The tree-sitter bindings a tree is read through: `tree.rootNode()`, and
/// a node's `kind()`, `startByte()`, `endByte()`, `child(i)`, `parent()`.
pub const ts = syntax.ts;