valua-codegen 0.1.0

Lua 5.1 code emitter for the valua transpiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Code generator error type.

use thiserror::Error;
use valua_diagnostics::Span;

/// Errors produced by the Lua 5.1 code emitter.
#[derive(Debug, Error)]
pub enum CodeGenError {
    #[error("AST node at {span:?} cannot be represented in Lua {target}: {detail}")]
    UnsupportedNode {
        target: &'static str,
        detail: String,
        span: Span,
    },

    #[error("internal emitter error: {detail}")]
    Internal { detail: String },
}