Adding a new lexer to scintilla / scite (... and eventually wxPython StyledTextCtrl)

Have any of you successfully added lexer to scintilla?

I followed the short instructions at http://www.scintilla.org/SciTELexer.html - and even discovered secret additional instructions at http://www.scintilla.org/ScintillaDoc.html#BuildingScintilla (Changing the Set of Lexers)

Everything compiles, and I can add lexer to SciTE just fine, but my ColouriseMapfileDoc method just isn't called (printf doesn't print the result). If I add the same code, for example. ColoriseLuaDoc lexer, everything is fine (printf concludes).

In particular, I have

  • In scintilla/include/Scintilla.ifaceaddedval SCLEX_MAPFILE=99
  • And any lexical class identifiers
  • In the scintilla / include directory, run HFacer.pyand confirm that the file SciLexer.hhas changed.
  • Created LexMapfile.cxxusing functionColouriseMapfileDoc
  • At the end of the file associated with the identifier and name lexer, using the function:

    LexerModule lmMapfile (SCLEX_MAPFILE, ColorMapfileDoc, "mapfile");

  • Run LexGen.pyto generate all makefiles (according to secret instructions)

  • Created a new SciTE properties file by cloning scite/src/others.properties
  • Customize some styles
  • In scite/src/SciTEGlobal.propertiesadded $(filter.conf)to the definition open.filter.
  • This language has been added to the SciTE Language menu,
  • Built by both Scintilla and SciTE.
  • Grunts and curses.

What am I doing wrong except step 12?

+3
source share
3

- , import yourformat SciTEGlobal.properties. 9b.

+3

- , yourformat SciTEGlobal.properties. 9b.

. 3.2.2, *. .

+3

I wring one lexer directly into scintilla/lexer/LexOthers.cxx, as described in http://www.scintilla.org/SciTELexer.html . For scite 3.2.3, the missing step 5b is what you need to add LINK_LEXER(lmYouLexerMod);to scintilla/src/Catalogue.cxx.

+2
source

Source: https://habr.com/ru/post/1755693/


All Articles