diff options
| author | mitchell <unknown> | 2020-01-04 13:50:52 -0500 |
|---|---|---|
| committer | mitchell <unknown> | 2020-01-04 13:50:52 -0500 |
| commit | 215e051e588219ec41341a27bb87793732cccd88 (patch) | |
| tree | bfcd76bec4252a214985c66da3d3d88c8123154a /lexers/LexPython.cxx | |
| parent | a64428dc77747caba268e25e4ec9d7d1db10eefa (diff) | |
| download | scintilla-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/LexPython.cxx')
| -rw-r--r-- | lexers/LexPython.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lexers/LexPython.cxx b/lexers/LexPython.cxx index 6cfb03b5e..836f76155 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 lvSubStyles; + return lvIdentity; } 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(); } |
