pvl / abap.tmbundle

TextMate support for ABAP
21 stars 9 forks source link

Expressions inside string templates #97

Open mbtools opened 1 year ago

mbtools commented 1 year ago

Highlighting of formatting options inside string templates does not work.

test = |Hello { sy-uname ALIGN = RIGHT }. Today is { sy-datum DATE = ISO }|.

https://help.sap.com/doc/abapdocu_756_index_htm/7.56/en-US/index.htm?file=abapcompute_string_format_options.htm

Here are the missing parts but I'm not sure how to integrate them into the grammar 🤷

    <dict>
        <key>match</key>
        <string>(?ix)(?&lt;=\s)(align|alpha|case|country|currency|date|decimals|exponent|number|pad|sign|style|time|timestamp|timezone|width|xsd|zero)(?=\s|=)</string>
        <key>name</key>
        <string>name.property.stringtemplate.abap</string>
    </dict>
    <dict>
        <key>match</key>
        <string>(?ix)(?&lt;=\s)(center|engineering|environment|in|iso|left|leftplus|leftspace|lower|no|out|raw|right|rightplus|rightspace|scale_preserving|scale_preserving_scientific|scientific|scientific_with_leading_zero|sign_as_postfix|simple|space|upper|user|yes)(?=\s)</string>
        <key>name</key>
        <string>value.property.stringtemplate.abap</string>
    </dict>