这是代码,但是当我输入“;”时它会向其及其后面的所有事物添加绿色,但是当我输入EAX时,它不会突出显示(我当然没有在评论中输入EAX)。但是,将“布朗”设置为“标识符”时,每个文本都是褐色。
scintilla1.Lexer = Lexer.Asm;
scintilla1.Styles[Style.Default].Font = "Consolas";
scintilla1.Styles[Style.Default].Size = 15;
scintilla1.Styles[Style.Asm.Default].ForeColor = Color.Black;
scintilla1.Styles[Style.Asm.Comment].ForeColor = Color.FromArgb(0, 128, 0); // Green
scintilla1.Styles[Style.Asm.Number].ForeColor = Color.Olive;
scintilla1.Styles[Style.Asm.Register].ForeColor = Color.Blue;
scintilla1.Styles[Style.Asm.String].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla1.Styles[Style.Asm.StringEol].ForeColor = Color.FromArgb(163, 21, 21); // Red
scintilla1.Styles[Style.Asm.CpuInstruction].ForeColor = Color.Red;
scintilla1.Styles[Style.Asm.Directive].ForeColor = Color.Teal;
scintilla1.Styles[Style.Asm.ExtInstruction].ForeColor = Color.LightBlue;
scintilla1.Styles[Style.Asm.Operator].ForeColor = Color.Brown;