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/LexPython.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/LexPython.cxx')
-rw-r--r-- | lexers/LexPython.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lexers/LexPython.cxx b/lexers/LexPython.cxx index f325ca360..24a11e3b0 100644 --- a/lexers/LexPython.cxx +++ b/lexers/LexPython.cxx @@ -344,7 +344,7 @@ class LexerPython : public DefaultLexer { std::map<Sci_Position, std::vector<SingleFStringExpState> > ftripleStateAtEol; public: explicit LexerPython() : - DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)), + DefaultLexer("python", SCLEX_PYTHON, lexicalClasses, ELEMENTS(lexicalClasses)), subStyles(styleSubable, 0x80, 0x40, 0) { } ~LexerPython() override { @@ -353,7 +353,7 @@ public: delete this; } int SCI_METHOD Version() const override { - return lvRelease4; + return lvRelease5; } const char *SCI_METHOD PropertyNames() override { return osPython.PropertyNames(); @@ -365,6 +365,9 @@ public: return osPython.DescribeProperty(name); } Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + const char * SCI_METHOD PropertyGet(const char *key) override { + return osPython.PropertyGet(key); + } const char *SCI_METHOD DescribeWordListSets() override { return osPython.DescribeWordListSets(); } @@ -409,7 +412,7 @@ public: return styleSubable; } - static ILexer4 *LexerFactoryPython() { + static ILexer5 *LexerFactoryPython() { return new LexerPython(); } |