diff options
| author | Neil <nyamatongwe@gmail.com> | 2019-12-22 22:36:51 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2019-12-22 22:36:51 +1100 | 
| commit | eed707bb9ad6da944af207a51e4a8d460d6c6846 (patch) | |
| tree | b504d202eea59088f3290d8c12d3307b17e88b93 /lexers/LexHTML.cxx | |
| parent | a4bd72249722211f08ffa3e65c664a9ccbbc7f84 (diff) | |
| download | scintilla-mirror-eed707bb9ad6da944af207a51e4a8d460d6c6846.tar.gz | |
Define ILexer5 with methods for retrieving name, ID, and property values.
Implement ILexer5 on object lexers.
Implement ILexer5 on LexerSimple wrapper for function lexers.
Diffstat (limited to 'lexers/LexHTML.cxx')
| -rw-r--r-- | lexers/LexHTML.cxx | 14 | 
1 files changed, 10 insertions, 4 deletions
| diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index 7519afeb2..c6042f2b6 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -861,7 +861,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_ ? std::size(lexicalClassesHTML) : std::size(lexicalClassesXML)),  		isXml(isXml_),  		isPHPScript(isPHPScript_), @@ -883,6 +886,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();  	} @@ -890,13 +896,13 @@ public:  	void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;  	// No Fold as all folding performs in Lex. -	static ILexer4 *LexerFactoryHTML() { +	static ILexer5 *LexerFactoryHTML() {  		return new LexerHTML(false, false);  	} -	static ILexer4 *LexerFactoryXML() { +	static ILexer5 *LexerFactoryXML() {  		return new LexerHTML(true, false);  	} -	static ILexer4 *LexerFactoryPHPScript() { +	static ILexer5 *LexerFactoryPHPScript() {  		return new LexerHTML(false, true);  	}  }; | 
