#1459 Improvements to Haskell Lexer

Bug
closed-fixed
3
2013-07-21
2013-04-03
kudah
No
  • Added support for MagicHash extension (lexer.haskell.allow.hash)
  • $ and # are now colored as operators.
  • .0 and -0 are now properly colored as operator and a number, not as just number.
  • Operators starting with double dash (e.g ---->) are properly colored as operators, not comments.
  • Added pragma highlighting.
  • Added basic C-preprocessor highlighting.
  • Qualified names (e.g. ABC.xyz) are now properly highlighted as identifiers, not types.
  • Qualified operators (e.g. ABC.<$>) are now properly highlighted as operators.
  • Operator . is now properly highlighted as an operator, not part of the identifier, when applied to a qualified and an unqualified value (e.g. Abc.xyz.yzx <- last one is an operator)
  • Operators starting with ':' are now properly highlighted as type constructors, not operators.
  • "family" after "data" is highlighted, as per TypeFamilies.
1 Attachments

Discussion

<< < 1 2 3 4 5 6 .. 8 > >> (Page 4 of 8)
  • Neil Hodgson

    Neil Hodgson - 2013-04-22

    By 3.2 do you mean 3.2.4 and earlier or 3.2.5 which is where support for the Unicode line end PS and LS characters was added.

     
    • kudah

      kudah - 2013-04-23

      Tested with 3.2.3. Current Scintilla doesn't trigger atLineEnd when line end is the last character in the file.

       
      Last edit: kudah 2013-04-23
  • Neil Hodgson

    Neil Hodgson - 2013-04-24

    This change may fix the line end issue
    http://www.scintilla.org/StyleContext.patch

     
    • kudah

      kudah - 2013-04-24

      It did fix the issue for me.

       
  • Neil Hodgson

    Neil Hodgson - 2013-04-25

    Line end detection can be written as

    (sc.atLineEnd || sc.ch == '\n' || sc.ch == '\r')
    

    but this often leads to different styles for the CR and LF in a Windows line end. Some current lexers do this and its been a recurring cause of problems, mostly when the lexer developer only works on one platform or the other. This is one of the reasons for implementing atLineEnd and why it is preferred.
    Difference LF vs CRLF

     
    • kudah

      kudah - 2013-04-25
       
      Last edit: kudah 2013-04-25
  • kudah

    kudah - 2013-04-28

    Fixed folder a bit
    - Fixed incoherent folding at end of the file
    - Comments are now folded with fold.compact
    - Comment blocks are now treated as whitespace by the folder

     
    Last edit: kudah 2013-04-28
<< < 1 2 3 4 5 6 .. 8 > >> (Page 4 of 8)

Log in to post a comment.