Here are two bugs for server side comment <%-- ... --%> (maybe SCE_H_XCCOMMENT could be renamed? as it's not unique to XCode/JSP):
https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/aspnet/development/inline-expressions#--------server-side-comments-block
|
19, "SCE_H_VALUE", "literal string", "Unquoted values", |
|
20, "SCE_H_XCCOMMENT", "comment", "JSP Comment <%-- ... --%>", |
|
21, "SCE_H_SGML_DEFAULT", "default", "SGML tags <! ... >", |
|
# X-Code |
|
val SCE_H_XCCOMMENT=20 |
First bug is code folding, I think fold whole script block should be promoted before if (chNext2 == '@') {:
|
if (chNext2 == '@') { |
|
i += 2; // place as if it was the second next char treated |
|
visibleChars += 2; |
|
state = SCE_H_ASPAT; |
|
scriptLanguage = eScriptVBS; |
|
} else if ((chNext2 == '-') && (styler.SafeGetCharAt(i + 3) == '-')) { |
|
styler.ColourTo(i + 3, SCE_H_ASP); |
|
state = SCE_H_XCCOMMENT; |
|
scriptLanguage = eScriptVBS; |
|
continue; |
|
} else { |
|
if (chNext2 == '=') { |
|
i += 2; // place as if it was the second next char treated |
|
visibleChars += 2; |
|
} else { |
|
i++; // place as if it was the next char treated |
|
visibleChars++; |
|
} |
|
|
|
state = StateForScript(aspScript); |
|
scriptLanguage = aspScript; |
|
} |
|
styler.ColourTo(i, SCE_H_ASP); |
|
// fold whole script |
|
if (foldHTMLPreprocessor) |
|
levelCurrent++; |
Second bug is scriptLanguage lost on editing inside multiline comment block (e.g. press Enter before --%>), which cause comment block not terminated at handle the end of a pre-processor = Non-HTML. this is same for multiline SCE_H_ASPAT. Change ScriptOfState() to return eScriptVBS for SCE_H_XCCOMMENT and SCE_H_ASPAT fixed the problem. also ScriptOfState() likely has bug for SCE_HPHP_COMPLEX_VARIABLE.
Here are two bugs for server side comment
<%-- ... --%>(maybeSCE_H_XCCOMMENTcould be renamed? as it's not unique to XCode/JSP):https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/aspnet/development/inline-expressions#--------server-side-comments-block
lexilla/lexers/LexHTML.cxx
Lines 801 to 803 in 157f28e
lexilla/include/LexicalStyles.iface
Lines 287 to 288 in 157f28e
First bug is code folding, I think
fold whole scriptblock should be promoted beforeif (chNext2 == '@') {:lexilla/lexers/LexHTML.cxx
Lines 1516 to 1541 in 157f28e
Second bug is
scriptLanguagelost on editing inside multiline comment block (e.g. press Enter before--%>), which cause comment block not terminated athandle the end of a pre-processor = Non-HTML. this is same for multilineSCE_H_ASPAT. ChangeScriptOfState()to returneScriptVBSforSCE_H_XCCOMMENTandSCE_H_ASPATfixed the problem. alsoScriptOfState()likely has bug forSCE_HPHP_COMPLEX_VARIABLE.