add more keywords for asm syntaxer
This commit is contained in:
parent
ff86213aee
commit
a6cae34a99
|
@ -1620,13 +1620,17 @@ int QSynEdit::calcIndentSpaces(int line, const QString& lineText, bool addIndent
|
|||
SyntaxState rangeAfterFirstToken = mSyntaxer->getState();
|
||||
QString firstToken = mSyntaxer->getToken();
|
||||
PTokenAttribute attr = mSyntaxer->getTokenAttribute();
|
||||
if (attr->tokenType() == TokenType::Keyword
|
||||
&& lineText.endsWith(':')
|
||||
if (
|
||||
( (attr->tokenType() == TokenType::Keyword
|
||||
&& (
|
||||
firstToken == "public" || firstToken == "private"
|
||||
|| firstToken == "protected" || firstToken == "case"
|
||||
|| firstToken == "default"
|
||||
)) {
|
||||
)
|
||||
)
|
||||
|| (attr->tokenType() == TokenType::Identifier))
|
||||
&& lineText.endsWith(':')
|
||||
) {
|
||||
// public: private: protecte: case: should indents like it's parent statement
|
||||
mSyntaxer->setState(rangePreceeding);
|
||||
mSyntaxer->setLine("}",line-1);
|
||||
|
|
|
@ -98,6 +98,7 @@ const QSet<QString> ASMSyntaxer::Directives {
|
|||
"section","global","extern","segment",
|
||||
"db","dw","dd","dq","dt","do","dy","dz",
|
||||
"resb","resw","resd","resq","rest","reso","resy","resz",
|
||||
"equ","times","word","dword","byte","tword"
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue