Menu

#701 txt2tags lexer

Completed
closed
Scintilla (412)
3
2010-07-30
2010-06-20
Eric F.
No

I've made a txt2tags lexer, based on Jon Strait work for markdown.

You can find this lexer as attachment, and the only thing to add is in Scintilla.iface those parts:

val SCLEX_TXT2TAGS=99

# Lexical state for SCLEX_TXT2TAGS
lex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_
val SCE_TXT2TAGS_DEFAULT=0
val SCE_TXT2TAGS_LINE_BEGIN=1
val SCE_TXT2TAGS_STRONG1=2
val SCE_TXT2TAGS_STRONG2=3
val SCE_TXT2TAGS_EM1=4
val SCE_TXT2TAGS_EM2=5
val SCE_TXT2TAGS_HEADER1=6
val SCE_TXT2TAGS_HEADER2=7
val SCE_TXT2TAGS_HEADER3=8
val SCE_TXT2TAGS_HEADER4=9
val SCE_TXT2TAGS_HEADER5=10
val SCE_TXT2TAGS_HEADER6=11
val SCE_TXT2TAGS_PRECHAR=12
val SCE_TXT2TAGS_ULIST_ITEM=13
val SCE_TXT2TAGS_OLIST_ITEM=14
val SCE_TXT2TAGS_BLOCKQUOTE=15
val SCE_TXT2TAGS_STRIKEOUT=16
val SCE_TXT2TAGS_HRULE=17
val SCE_TXT2TAGS_LINK=18
val SCE_TXT2TAGS_CODE=19
val SCE_TXT2TAGS_CODE2=20
val SCE_TXT2TAGS_CODEBK=21
val SCE_TXT2TAGS_COMMENT=22
val SCE_TXT2TAGS_OPTION=23
val SCE_TXT2TAGS_PREPROC=24
val SCE_TXT2TAGS_POSTPROC=25

You'll find the scite highlights in an other feature request.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2010-06-21
    • assigned_to: nobody --> nyamatongwe
    • priority: 5 --> 3
     
  • Eric F.

    Eric F. - 2010-06-24

    updated lexer for txt2tags

     
  • Eric F.

    Eric F. - 2010-06-24

    updated Scintilla iface version

     
  • Eric F.

    Eric F. - 2010-06-24

    I've corrected the previous version, which was crashing when starting a line with a #.
    Now most of the txt2tags highlight is covered.

     
  • Neil Hodgson

    Neil Hodgson - 2010-06-26

    The interface between Scintilla and lexers is being changed greatly as explained at http://www.scintilla.org/nulex.html . New lexers will not be added to Scintilla until after this work is complete which may be a month or two.

     
  • Eric F.

    Eric F. - 2010-07-12

    Do you think existing Lexers will need massive rewrite so they could be compatible with the new interface, or will it be just a few fix? I've read the document but don't really understand the implications.

     
  • Neil Hodgson

    Neil Hodgson - 2010-07-12

    Eventually it should stabilize to just require a particular set of headers and maybe some minor editing for basic compatibility. Using the new features will require more work.

     
  • Neil Hodgson

    Neil Hodgson - 2010-07-17

    Committed to Mercurial repository with changes. Standard set of lexer headers used to match current system. Removed unused function SetStateAndZoom.

     
  • Neil Hodgson

    Neil Hodgson - 2010-07-17
    • milestone: --> Completed
     
  • Neil Hodgson

    Neil Hodgson - 2010-07-30
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB