#862 coffeescript lexer

Completed
closed
Neil Hodgson
Scintilla (356)
3
2011-12-08
2011-11-10
Josh
No

Looking to make a lexer for coffeescript. Website is here: http://coffeescript.org/ , with annotated source for coffeescript's own lexer: http://coffeescript.org/documentation/docs/lexer.html , (keywords are here: http://coffeescript.org/documentation/docs/lexer.html#section-38 ). I know there's more information here: http://www.scintilla.org/Lexer.txt (linking so I have these links all in one place), and there's even a coffeescript lexer in lua lexer here: http://code.google.com/p/scintillua/source/browse/lexers/coffeescript.lua . I guess my questions are these: can we use a lua lexer in scintilla? If not, I'll post on this thread when I start making progress (probably starting in December some time)

Discussion

1 2 > >> (Page 1 of 2)
  • Neil Hodgson
    Neil Hodgson
    2011-11-11

    You can use a Lua lexer with scintillua which includes Lua. The standard installation of Scintilla does not include Lua so can not use Lua lexers.

     
  • Neil Hodgson
    Neil Hodgson
    2011-11-11

    • assigned_to: nobody --> nyamatongwe
    • priority: 5 --> 3
     
  • Josh
    Josh
    2011-11-11

    So writing a new lexer isn't desired in this case?

     
  • Neil Hodgson
    Neil Hodgson
    2011-11-11

    If the users of Coffeescript think that using a current lexer such as the C++ lexer is fine then there is no need for a new lexer.

     
  • Philippe
    Philippe
    2011-11-16

    Got mixed results:
    - cpp lexer: no multiline comments support (### ... ###)
    - lua lexer: not comments coloring at all

     
  • Josh
    Josh
    2011-11-17

    Thanks for checking on that. So would a new (C++) lexer be welcome? if so I'll start work on it (hopefully) in December and post a link here when I've started

     
  • Eric Promislow
    Eric Promislow
    2011-11-17

    I tried modifying the C++ lexer for CoffeeScript, but it became unwieldy, so I wrote
    a separate lexer. It uses the SCE_C_* stylespace, with the addition of three extra
    styles for CoffeeScript comment blocks, verbose regexes, and verbose regex
    comments.

    There were more differences in the Folder than the core lexer, but I was
    happier with the result when I split it off.

    We're fine with contributing it.

     
  • Neil Hodgson
    Neil Hodgson
    2011-11-17

    I'd like to see the CoffeeScript lexer contributed.

     
  • Josh
    Josh
    2011-11-25

    Me too, I can (try to) help if needed :)

     
  • Neil Hodgson
    Neil Hodgson
    2011-11-29

    • milestone: --> Completed
     
1 2 > >> (Page 1 of 2)