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