Skip to content

Commit

Permalink
Debugger: Source view - Fix source view highlights for opcodes with a…
Browse files Browse the repository at this point in the history
… .l suffix
  • Loading branch information
SourMesen committed Dec 7, 2023
1 parent 7629f28 commit 0019f6b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions UI/Debugger/Disassembly/CodeHighlighting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ class CodeHighlighting
private static Regex _comment = new Regex("^;.*", RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static Regex _directive = new Regex("^([.][a-z0-9]+)([\\s]+|$)", RegexOptions.IgnoreCase | RegexOptions.Compiled);

//(.b|.w) is allowed to support assemblers (for source view) that use this syntax after the opcode to select between 8/16bit operations
private static Regex _opCode = new Regex("^([a-z0-9]{2,5}(.b|.w){0,1})([\\s]+|$)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
//(.[a-z]) is allowed after the ocode to support assemblers (for source view) that use
//e.g .b/.w/.l suffixes to select between 8/16bit operations, etc.
private static Regex _opCode = new Regex("^([a-z0-9]{2,5}(.[a-z]){0,1})([\\s]+|$)", RegexOptions.IgnoreCase | RegexOptions.Compiled);

private static Regex _syntax = new Regex("^[]([)!+,.|:<>]{1}", RegexOptions.Compiled);
private static Regex _operand = new Regex("^(([$][0-9a-f]*([.]\\d){0,1})|(#[$0-9][0-9a-f]*)|#|([@_a-z]([@_a-z0-9])*))", RegexOptions.IgnoreCase | RegexOptions.Compiled);
Expand Down

0 comments on commit 0019f6b

Please sign in to comment.