From 215e051e588219ec41341a27bb87793732cccd88 Mon Sep 17 00:00:00 2001 From: mitchell Date: Sat, 4 Jan 2020 13:50:52 -0500 Subject: 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. --- lexers/LexVisualProlog.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lexers/LexVisualProlog.cxx') diff --git a/lexers/LexVisualProlog.cxx b/lexers/LexVisualProlog.cxx index 460ecfab8..4aae79332 100644 --- a/lexers/LexVisualProlog.cxx +++ b/lexers/LexVisualProlog.cxx @@ -71,7 +71,7 @@ class LexerVisualProlog : public DefaultLexer { OptionsVisualProlog options; OptionSetVisualProlog osVisualProlog; public: - LexerVisualProlog() { + LexerVisualProlog() : DefaultLexer("visualprolog", SCLEX_VISUALPROLOG) { } virtual ~LexerVisualProlog() { } @@ -79,7 +79,7 @@ public: delete this; } int SCI_METHOD Version() const override { - return lvOriginal; + return lvIdentity; } const char * SCI_METHOD PropertyNames() override { return osVisualProlog.PropertyNames(); @@ -91,6 +91,9 @@ public: return osVisualProlog.DescribeProperty(name); } Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; + const char * SCI_METHOD PropertyGet(const char *key) override { + return osVisualProlog.PropertyGet(key); + } const char * SCI_METHOD DescribeWordListSets() override { return osVisualProlog.DescribeWordListSets(); } -- cgit v1.2.3