Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#464 Missing state for VBScript operators in LexHTML

Cosmetic
open
Neil Hodgson
Scintilla (790)
3
2006-08-06
2006-08-04
Nicola Civran
No

LexHTML does not define any specific state for
operators inside a VBScript section (i.e. something
like SCE_HJ_SYMBOLS and SCE_HJA_SYMBOLS).
For that purpose, I have added two more states
(SCE_HB_OPERATOR and SCE_HBA_OPERATOR).
In the attached zip, you can see the files I have
changed from release 1.70.

Discussion

  • Neil Hodgson
    Neil Hodgson
    2006-08-06

    • priority: 5 --> 3
    • assigned_to: nobody --> nyamatongwe
     
  • Neil Hodgson
    Neil Hodgson
    2006-08-07

    Logged In: YES
    user_id=12579

    Currently operators are in the default style for that
    language which is mostly shared with white space and so is
    mostly individually settable unless you want a different
    background colour to that used for white space. Style values
    in the HTML lexer are a finite resource and there are
    conflicting needs (for expanded CSS styling, PHP smarty
    templates). Is distinguishing operators from white space
    important enough to use those elements.

     
  • Nicola Civran
    Nicola Civran
    2006-08-28

    Logged In: YES
    user_id=709854

    I'm sorry for the delay, I was on vacation :-)
    If I understand correctly, your suggestion is to change the
    foreground color associated with SCE_HB_DEFAULT style, for
    this does not affect white spaces appearance. But, this way,
    I get coloured as operators even characters that are NOT
    operators (e.g. EOL indicators, or stressed vowels in
    italian keyboard).
    Honestly, I was not aware that adding two new styles
    conflicted with other needs. I simply noticed that for other
    script languages (java, python, php) operators have their
    own style, so I added it in VB for the sake of simmetry.

     
  • Neil Hodgson
    Neil Hodgson
    2006-08-30

    Logged In: YES
    user_id=12579

    The stressed Italian vowels should probably be treated as an
    error when found in operator locations so could actually
    terminate VB mode or show some other indication of error.

     
  • Nicola Civran
    Nicola Civran
    2006-08-30

    Logged In: YES
    user_id=709854

    I agree with you: stressed vowels are not a great example :-(
    [I never used them in my code, but I just discovered that
    they are LEGAL(!) identifier characters in JavaScript and VB
    (at least). This, potentially, leads to problems when lexing
    code like:
    UnitàDiMisura = "kg";
    because 'à' is not recognized as a part of an identifier,
    but I'm not interested in solving that, at the moment...]
    Anyway, using the same style for both operators and white
    spaces forbids to use different fonts for them; if font is
    not a matter, one may use SCI_SETWHITESPACEFORE to change
    the color of visible white spaces back to "default" color,
    but this does not change color of control characters.
    So, it seems to me that there is always something (stupid)
    not coloured as desired in embedded VBScript, while the
    "standalone" VBScript lexer works as expected (as well as
    other embedded scripts).