16 lines
508 B
Rust
16 lines
508 B
Rust
use crate::compiler::{CompileCtx, Compiler};
|
|
use oxide_parser::Expression;
|
|
|
|
mod array;
|
|
mod object_literal;
|
|
|
|
impl Compiler {
|
|
pub(crate) fn emit_object_domain(&self, expr: &Expression, ctx: &mut CompileCtx) -> Result<u8, String> {
|
|
match expr {
|
|
Expression::ObjectExpression(obj) => self.emit_object_expression(obj, ctx),
|
|
Expression::ArrayExpression(arr) => self.emit_array_expression(arr, ctx),
|
|
_ => self.emit_unsupported_expression(expr, ctx),
|
|
}
|
|
}
|
|
}
|