pvl / abap.tmbundle

TextMate support for ABAP
21 stars 9 forks source link

Fixed issues related to whitespace in matches #34

Closed FreHu closed 5 years ago

FreHu commented 5 years ago

Whitespace should not be part of a token match - this causes issues because the next token expects to start with whitespace, which was consumed by the previous token and is therefore not highlighted. I changed instances of \s to lookaheads or lookbehinds which don't consume characters. There's probably a few more places where this needs to be done, but I don't want any unintended side effects.

IS was moved from logical operators to regular keywords to prevent IS INITIAL and similar from having different colors.

All short keywords were moved to regular keywords because:

code_2018-10-10_15-15-17

DATA(abc) = abap_false.
DATA(sum) = 2 + 3.
DATA(db_row) = SELECT * FROM itab.
IF abc IS BOUND.
    IF abap_true = abap_false.
        DATA: var1 type abap_bool value abap_true,
              var2 type abap_bool value abap_false.
    ENDIF.
ENDIF.

This should resolve the remaining issues in #3.