Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1459 Improvements to Haskell Lexer

Bug
closed-fixed
Neil Hodgson
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 .. 3 4 5 6 7 8 > >> (Page 5 of 8)
  • Neil Hodgson
    Neil Hodgson
    2013-04-30

    I'd like to avoid many change sets appearing in the main repository particularly when some are just churning back and forth so will merge when it appears stable and I have some time.

     
    • kudah
      kudah
      2013-04-30

      I'd like to avoid many change sets appearing in the main repository particularly when some are just churning back and forth so will merge when it appears stable and I have some time.

      I didn't say for you to merge all that pile in one go, just 0001 should be in next release; Barring that you can revert https://sourceforge.net/p/scintilla/code/ci/3176ee2f4014c16509b742c1b304fa2b5dab60d9/ so at least the editor won't hang on specially formatted comments.

       
      Last edit: kudah 2013-04-30
      • Neil Hodgson
        Neil Hodgson
        2013-05-01

        Merged the two changesets as [527231].

         

        Related

        Commit: [527231]

  • kudah
    kudah
    2013-05-04

    Reformatted all fixes from last merged patch minus line ending changes.

    • Allow arbitrary amount of # suffixes in identifiers with lexer.haskell.allow.hash
    • Allow only one dot in base 10 numeric literals
    • Comments are now treated as whitespace by the folder
    • Fixed inconsistent folding at end of the file
     
    • Neil Hodgson
      Neil Hodgson
      2013-05-07

      Committed as [e25d77].

       

      Related

      Commit: [e25d77]

  • Neil Hodgson
    Neil Hodgson
    2013-05-07

    With Unicode classification, the patch is bulked out with a subset of the case conversion table and can be made shorter by dropping that data. A simple binary searchable look up table of character ranges that share a type should require less than 4000 entries each containing a 21 bit start character and a 5 bit type. Could either be accessed through an IDocument method if added to Scintilla or be a class in lexlib to be useful for DLL lexers.

     
    • kudah
      kudah
      2013-05-08

      Okay.

       
      • Neil Hodgson
        Neil Hodgson
        2013-05-09

        That was just a note for anyone in the future (possibly me) that wants to add character categorization. I'm not implying you should do it.

         
<< < 1 .. 3 4 5 6 7 8 > >> (Page 5 of 8)