Skip to documentation
SLOP

tiny.syn.Kind

Reference tiny.syn Kind

Defined in span.model.

The role of the text one span covers.

API (31)

Fields and members

Public fields and members.

No direct callersNo direct callsspan.modelKind
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/syn/src/span/model.zig:20

zig
/// The role of the text one span covers. A renderer switches on this role to pick a color or style/// for each span. Thirty-one roles serve every scanner, and each scanner uses the roles that fit/// its languages. The package attaches no color or style to any role.pub const Kind = enum {    /// A reserved word of the language, such as `if`, `return` or `const`, or a CSS rule that    /// starts with `@`, such as `@media`.    keyword,    /// A built-in type name, such as `u8`, `int` or `String`, marked by the generic scanner.    type,    /// A name followed by an opening parenthesis, marked by the generic scanner.    function,    /// A shell, PHP or Perl variable such as `$HOME`, or a Rust lifetime such as `'a`.    variable,    /// A name after a dot in code, a CSS property name inside a rule, or a command-line option such    /// as `--help` in shell.    property,    /// A quoted string, including a Python or TOML triple-quoted string that runs over more than    /// one line.    string,    /// A numeric literal, including hexadecimal and exponent forms, and a CSS number with its unit,    /// such as `1rem`.    number,    /// A named constant value, such as `true`, `false`, `null` or `None`.    literal,    /// A comment: a line comment to the end of the line, or a block comment up to its closing    /// delimiter, which can run over more than one line.    comment,    /// A bracket, brace, comma, colon, semicolon or dot, or an angle bracket around a markup tag.    punctuation,    /// A run of operator characters, such as `=`, `+=` or `->`, marked by the generic scanner.    operator,    /// An annotation such as `@Override` in Java, C#, Kotlin, Scala or Dart, or a Python decorator.    decorator,    /// A parenthesis in Lisp or Clojure code.    delimiter,    /// The first symbol after an opening parenthesis in Lisp or Clojure code, the position of the    /// operator in a list.    head,    /// A key in JSON or YAML before a colon, or a key in TOML before an equals sign.    key,    /// A TOML table header, such as `[server]`.    table,    /// A TOML date or date and time.    date,    /// A YAML anchor or alias, such as `&base` or `*base`.    anchor,    /// An element name in HTML, XML, Vue or Svelte, or a YAML tag such as `!!str`.    tag,    /// An attribute name inside a markup tag.    attribute,    /// A CSS name outside the property position of a rule, which covers selectors and also property    /// values.    selector,    /// The text of a Markdown heading after its `#` marks.    heading,    /// A Markdown structure mark: the `#` run of a heading, a `>` quote mark, or a list bullet or    /// number.    marker,    /// Markdown emphasis or strong emphasis, delimiters included, such as `*word*` or `__word__`.    emphasis,    /// Markdown strikethrough between `~~` marks.    strike,    /// Markdown inline code between backticks.    code,    /// A Markdown inline link, from its `[` through the `)` that closes its address.    link,    /// A whole diff header line, such as one starting with `diff `, `index `, `--- `, `+++ ` or    /// `rename from `.    header,    /// A whole diff hunk line, starting with `@@`.    hunk,    /// A whole diff line starting with `+`, other than a `+++ ` header.    addition,    /// A whole diff line starting with `-`, other than a `--- ` header.    deletion,};

Source: lib/syn/src/root.zig:44

zig
pub const Kind = span.Kind;

Also reachable as

span.Kind.

Audit

Definitions1
Public names3
Members31
Version26.7.0
Revisiondaab053ee433