mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ fix: possible busy-loop in Kotlin and Dard Lexer
This commit is contained in:
parent
dc834e4011
commit
5335074072
@ -409,7 +409,7 @@ void SCI_METHOD LexerDart::Lex(Sci_PositionU startPos, Sci_Position length, int
|
||||
}
|
||||
else {
|
||||
//?const int chNext = GetNextNSChar();
|
||||
while (IsASpace(sc.ch)){ sc.Forward(); };
|
||||
while (IsASpace(sc.ch) && sc.More()){ sc.Forward(); };
|
||||
if (sc.ch == '(') {
|
||||
sc.ChangeState(SCE_DART_FUNCTION);
|
||||
}
|
||||
|
||||
@ -418,7 +418,7 @@ void SCI_METHOD LexerKotlin::Lex(Sci_PositionU startPos, Sci_Position length, in
|
||||
if (kwType != SCE_KOTLIN_DEFAULT)
|
||||
{
|
||||
//?const int chNext = sc.GetNextNSChar();
|
||||
while (IsASpace(sc.ch)) { sc.Forward(); };
|
||||
while (IsASpace(sc.ch) && sc.More()) { sc.Forward(); };
|
||||
if (!((kwType == SCE_KOTLIN_LABEL && sc.ch == '@') || (kwType != SCE_KOTLIN_LABEL && IsIdentifierStart(sc.ch))))
|
||||
{
|
||||
kwType = SCE_KOTLIN_DEFAULT;
|
||||
@ -450,7 +450,7 @@ void SCI_METHOD LexerKotlin::Lex(Sci_PositionU startPos, Sci_Position length, in
|
||||
}
|
||||
else
|
||||
{
|
||||
while (IsASpace(sc.ch)) { sc.Forward(); };
|
||||
while (IsASpace(sc.ch) && sc.More()) { sc.Forward(); };
|
||||
if (sc.ch == '(') {
|
||||
sc.ChangeState(SCE_KOTLIN_FUNCTION);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user