aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexLaTeX.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/LexLaTeX.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/LexLaTeX.cxx')
-rw-r--r--lexers/LexLaTeX.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/lexers/LexLaTeX.cxx b/lexers/LexLaTeX.cxx
index 391a36c5c..496d04177 100644
--- a/lexers/LexLaTeX.cxx
+++ b/lexers/LexLaTeX.cxx
@@ -26,6 +26,7 @@
#include "StyleContext.h"
#include "CharacterSet.h"
#include "LexerModule.h"
+#include "DefaultLexer.h"
#include "LexerBase.h"
using namespace Scintilla;
@@ -88,6 +89,14 @@ public:
}
void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;
void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;
+
+ // ILexerWithIdentity methods
+ const char * SCI_METHOD GetName() override {
+ return "latex";
+ }
+ int SCI_METHOD GetIdentifier() override {
+ return SCLEX_LATEX;
+ }
};
static bool latexIsSpecial(int ch) {