Sort the instr defs

This commit is contained in:
0xd4d 2020-10-09 17:32:52 +02:00
parent d1b52cd6d9
commit 6cd00f6a8e
1 changed files with 1 additions and 0 deletions

View File

@ -154,6 +154,7 @@ namespace Generator.Tables {
}
if (defs.Count == 0)
Error(lines.Length, "No instruction definitions found");
defs.Sort((a, b) => a.def.Code.Value.CompareTo(b.def.Code.Value));
if (TryGetErrorString(out var errorMessage))
throw new InvalidOperationException(errorMessage);