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.
There's a comment convention (starting with "// property ") for new lexer-specific properties which allows containers to automatically set up documentation/UI. See LexPython.cxx for examples.
There is some strange stuff near the top of the .patch (the block that includes ++++++++++++++++++++++--------------) which ends up in the commit message.
Is "kudah" the correct name for credits lists? Unicode is fine for names.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's a comment convention (starting with "// property ") for new lexer-specific properties which allows containers to automatically set up documentation/UI. See LexPython.cxx for examples.
Okay, added a property comment in attachment.
There is some strange stuff near the top of the .patch (the block that includes ++++++++++++++++++++++--------------) which ends up in the commit message.
It's git commit summary.
Is "kudah" the correct name for credits lists? Unicode is fine for names.
It's a nickname. If a real name is obligatory, I'd rather just hand over copyright.
Last edit: xa 2013-04-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oops, my previous patch broke string escaping, fixed. Also fixed nested comments, which were a bit broken since the beginning, and completely broken since my first patch. Copied over python's Folder with adjustments; it's moderately useful as is, even though it doesn't yet handle NondecreasingIndentation, explicit braces, Haddock comments and group definitions.
The folder only recognizes "import" at line start although the doc doesn't say that. Its fine if you only want to recognize at line start although an arbitrary example program I downloaded had indented imports.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
an arbitrary example program I downloaded had indented imports.
Never seen an import being indented in real code. Imports obey module's layout rule, so the only way to indent an import further without also indenting everything in the module is to use explicit layout(e.g. put a semicolon at the end of previous declaration). You can't indent first import without affecting module's layout.
There's a warning from Clang:
../lexers/LexHaskell.cxx:175:17: warning: Value stored to 'ch' during its initialization is never read
int ch = styler.SafeGetCharAt(currentPos);
^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Comment block's style now circles between SCE_HA_COMMENTBLOCK and SCE_HA_COMMENTBLOCK3 depending on nesting. (Haskell seems to be the only language for which scintilla defines more than one COMMENTBLOCK style, why's that? INSTANCE/CLASS/DATA/IMPORT are useless too. (instances are anonymous, nothing to style, classes are types(CAPITAL), data&import are KEYWORDs)
Lowercase identifiers beginning with '?' are now colored as per ImplicitParams extension.(lexer.haskell.allow.questionmark)
Unicode support for Haskell lexer. I haven't noticed any functions to classify unicode chars in scintilla, so I simply copied general categories from GHC. Sorry if I missed anything.
There's a comment convention (starting with "// property ") for new lexer-specific properties which allows containers to automatically set up documentation/UI. See LexPython.cxx for examples.
There is some strange stuff near the top of the .patch (the block that includes ++++++++++++++++++++++--------------) which ends up in the commit message.
Is "kudah" the correct name for credits lists? Unicode is fine for names.
Okay, added a property comment in attachment.
It's git commit summary.
It's a nickname. If a real name is obligatory, I'd rather just hand over copyright.
Last edit: xa 2013-04-04
Reformatted as a single patch.
Last edit: xa 2013-04-04
Committed as [0b7306].
Related
Commit: [0b7306]
Thanks!
Fixed few things in haskell lexer
A.$bis not properly highlighted as an operator and an identifier, not just operator.g++ produces a warning:
../lexers/LexHaskell.cxx: In function 'void skipMagicHash(StyleContext&, bool, bool)':
../lexers/LexHaskell.cxx:90:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
Oops, my previous patch broke string escaping, fixed. Also fixed nested comments, which were a bit broken since the beginning, and completely broken since my first patch. Copied over python's Folder with adjustments; it's moderately useful as is, even though it doesn't yet handle NondecreasingIndentation, explicit braces, Haddock comments and group definitions.
There's one line that appears to have no effect, 506, with the result not used after it is set:
// Set up initial loop state
startPos = styler.LineStart(lineCurrent);
There's a dead assignment to importCurrent inside the folding loop.
Yeah.
Last edit: xa 2013-04-13
Committed as [7011e1], [5934ab], [65d39d] with dead assignment removed.
Related
Commit: [5934ab]
Commit: [65d39d]
Commit: [7011e1]
Oops, I thought you meant the other dead assignment.
Reserved space for import folding
The folder only recognizes "import" at line start although the doc doesn't say that. Its fine if you only want to recognize at line start although an arbitrary example program I downloaded had indented imports.
Never seen an import being indented in real code. Imports obey module's layout rule, so the only way to indent an import further without also indenting everything in the module is to use explicit layout(e.g. put a semicolon at the end of previous declaration). You can't indent first import without affecting module's layout.
This is the example I used: http://www.angelfire.com/tx4/cus/shapes/haskell98.html
There's a warning from Clang:
../lexers/LexHaskell.cxx:175:17: warning: Value stored to 'ch' during its initialization is never read
int ch = styler.SafeGetCharAt(currentPos);
^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Last edit: xa 2013-04-18
Committed as [e26609], [923af5], [90463b], [496aef].
Related
Commit: [496aef]
Commit: [90463b]
Commit: [923af5]
Commit: [e26609]
Committed as [3176ee].
Related
Commit: [3176ee]
Unicode support for Haskell lexer. I haven't noticed any functions to classify unicode chars in scintilla, so I simply copied general categories from GHC. Sorry if I missed anything.
Last edit: xa 2013-04-19
I'd prefer not to distribute large Unicode tables.