Add FuncRef and SigRef entity references.
These refer to external functions and function signatures declared in the preamble. Since we're already using the type names 'Signature' and 'Function', these entity references don't folow the usual EntityData / Entity naming convention.
This commit is contained in:
@@ -34,6 +34,8 @@ pub enum Token<'a> {
|
||||
Ebb(Ebb), // ebb3
|
||||
StackSlot(u32), // ss3
|
||||
JumpTable(u32), // jt2
|
||||
FuncRef(u32), // fn2
|
||||
SigRef(u32), // sig2
|
||||
Identifier(&'a str), // Unrecognized identifier (opcode, enumerator, ...)
|
||||
}
|
||||
|
||||
@@ -285,6 +287,8 @@ impl<'a> Lexer<'a> {
|
||||
"ebb" => Ebb::with_number(number).map(|ebb| Token::Ebb(ebb)),
|
||||
"ss" => Some(Token::StackSlot(number)),
|
||||
"jt" => Some(Token::JumpTable(number)),
|
||||
"fn" => Some(Token::FuncRef(number)),
|
||||
"sig" => Some(Token::SigRef(number)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user