DoxigAlpha

writeLiteral

Function parameters

Parameters

#
writer:anytype
literal:u8

Expressions can be evaluated in different contexts, each requiring its own set of inputs.

Types

#
Context
Expressions can be evaluated in different contexts, each requiring its own set of inputs.

A stack machine that can decode and run DWARF expressions.

Functions

#
StackMachine
A stack machine that can decode and run DWARF expressions.

Error sets in this namespace

Error Sets

#

Source

Implementation

#
pub fn writeLiteral(writer: anytype, literal: u8) !void {
    switch (literal) {
        0...31 => |n| try writer.writeByte(n + OP.lit0),
        else => return error.InvalidLiteral,
    }
}