aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexHTML.cxx
diff options
context:
space:
mode:
authormitchell <unknown>2020-01-04 13:50:52 -0500
committermitchell <unknown>2020-01-04 13:50:52 -0500
commit215e051e588219ec41341a27bb87793732cccd88 (patch)
treebfcd76bec4252a214985c66da3d3d88c8123154a /lexers/LexHTML.cxx
parenta64428dc77747caba268e25e4ec9d7d1db10eefa (diff)
downloadscintilla-mirror-215e051e588219ec41341a27bb87793732cccd88.tar.gz
Backport: Define ILexerWithIdentity with methods for retrieving name, ID, and property values.
Implement ILexerWithIdentity on object lexers. Implement ILexerWithIdentity on LexerSimple wrapper for function lexers. Backport of changeset 7870:6ffcbd42288c, but with a new interface compatible with ILexer, not ILexer5.
Diffstat (limited to 'lexers/LexHTML.cxx')
-rw-r--r--lexers/LexHTML.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx
index 6a769f67b..24e9215da 100644
--- a/lexers/LexHTML.cxx
+++ b/lexers/LexHTML.cxx
@@ -862,7 +862,10 @@ class LexerHTML : public DefaultLexer {
std::set<std::string> nonFoldingTags;
public:
explicit LexerHTML(bool isXml_, bool isPHPScript_) :
- DefaultLexer(isXml_ ? lexicalClassesHTML : lexicalClassesXML,
+ DefaultLexer(
+ isXml_ ? "xml" : (isPHPScript_ ? "phpscript" : "hypertext"),
+ isXml_ ? SCLEX_XML : (isPHPScript_ ? SCLEX_PHPSCRIPT : SCLEX_HTML),
+ isXml_ ? lexicalClassesHTML : lexicalClassesXML,
isXml_ ? ELEMENTS(lexicalClassesHTML) : ELEMENTS(lexicalClassesXML)),
isXml(isXml_),
isPHPScript(isPHPScript_),
@@ -884,6 +887,9 @@ public:
return osHTML.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
+ const char * SCI_METHOD PropertyGet(const char *key) override {
+ return osHTML.PropertyGet(key);
+ }
const char *SCI_METHOD DescribeWordListSets() override {
return osHTML.DescribeWordListSets();
}