mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Add numeric label support to assembler
This commit is contained in:
@ -35,6 +35,8 @@ public:
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case Terminal::NumLabFwd:
|
||||
case Terminal::NumLabBwd:
|
||||
case Terminal::Id:
|
||||
HighlightCurToken(HighlightFormat::Symbol);
|
||||
break;
|
||||
@ -119,6 +121,13 @@ public:
|
||||
m_formatting.emplace_back(len, off, HighlightFormat::Symbol);
|
||||
}
|
||||
|
||||
void OnNumericLabelDecl(std::string_view name, u32 parse_num) override
|
||||
{
|
||||
const int len = static_cast<int>(m_owner->lexer.LookaheadRef().token_val.length());
|
||||
const int off = static_cast<int>(m_owner->lexer.ColNumber());
|
||||
m_formatting.emplace_back(len, off, HighlightFormat::Symbol);
|
||||
}
|
||||
|
||||
void OnVarDecl(std::string_view name) override { OnLabelDecl(name); }
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user