Home Download Buy Blog Forum Support

Perl.tmLanguage - sintax fix

Perl.tmLanguage - sintax fix

Postby pcmind on Wed Nov 16, 2011 2:36 pm

In the Perl.tmLanguage I think you could alter the "format" sintax to something like:
Code: Select all
        <dict>
            <key>begin</key>
            <string>\b(format)\s+([A-Za-z_]+)?\s*=</string>
            <key>beginCaptures</key>
            <dict>
                <key>1</key>
                <dict>
                    <key>name</key>
                    <string>support.function.perl</string>
                </dict>
                <key>2</key>
                <dict>
                    <key>name</key>
                    <string>entity.name.function.format.perl</string>
                </dict>
            </dict>
            <key>end</key>
            <string>^\.[\s\t]*$</string>
            <key>name</key>
            <string>meta.format.perl</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>include</key>
                    <string>#line_comment</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#variable</string>
                </dict>
            </array>
        </dict>


because you can use a name with underscore and some other chars. the ending "." can come with tailing spaces and tab.
pcmind
 
Posts: 2
Joined: Tue Jun 14, 2011 11:40 pm

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 16 guests