Skip to main content

luaur_bytecode/methods/
bytecode_builder_get_bytecode.rs

1use crate::records::bytecode_builder::BytecodeBuilder;
2use luaur_common::macros::luau_assert::LUAU_ASSERT;
3
4impl BytecodeBuilder {
5    pub fn get_bytecode(&self) -> &alloc::string::String {
6        LUAU_ASSERT!(!self.bytecode.is_empty()); // did you forget to call finalize?
7        &self.bytecode
8    }
9}