Skip to content

Display multibyte e-expression headers #181

@zslayton

Description

@zslayton

Currently, inspect assumes all e-expressions will have a one-byte header:

fn inspect_eexp(&mut self, depth: usize, eexp: EExpression<AnyEncoding>) -> Result<()> {
let mut formatter = BytesFormatter::new(
BYTES_PER_ROW,
vec![
// TODO: Add methods to EExpression that allow nuanced access to its encoded spans
// TODO: Length-prefixed and multibyte e-expression addresses
IonBytes::new(BytesKind::MacroId, &eexp.span().bytes()[0..1]),
],
);

However, is only the case for invocations of user macros with an ID lower than 64.
Invocations of system macros are two bytes (0xEE 0x__), and invocations of macros with IDs >= 64 are at least two bytes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions