<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>comment</key>
    <string>This tmLanguage file is used internally by ColdFusion and Component tmLanguage files</string>
    <key>fileTypes</key>
    <array/>
    <key>foldingStartMarker</key>
    <string>^.*\bfunction\s*(\w+\s*)?\([^\)]*\)(\s*\{[^\}]*)?\s*$</string>
    <key>foldingStopMarker</key>
    <string>^\s*\}</string>
    <key>name</key>
    <string>CFScript (do not use)</string>
    <key>patterns</key>
    <array>

        <dict>
            <key>include</key>
            <string>#comments</string>
        </dict>

        <dict>
            <key>include</key>
            <string>#cfscript</string>
        </dict>
    </array>

    <key>repository</key>
    <dict>

        <!-- functions -->
        <key>functions</key>
        <dict>
            <key>begin</key>
                <string>(?x)^\s*
                    (?:
                        (?: # optional access-control modifier and return-type
                            (?:(?i:\b(private|package|public|remote))\s+)+\s* # access-control.modifier
                            (?i:\b
                                (void)
                                |
                                (any|array|binary|boolean|component|date|guid|numeric|query|string|struct|xml|uuid) # return-type.primitive
                                |
                                ([A-Za-z0-9_\.$]+) #return-type component/object (may need additional tokens)
                            )?
                        )?
                    )
                    \s*
                    (?i:(function)) # storage.function
                    \s+
                    (?:
                        (init) # entity.name.function.contructor
                        |
                        (\w+) # entity.name.function
                    )
                </string>
            <key>beginCaptures</key>
            <dict>
                <key>1</key>
                <dict>
                    <key>name</key>
                    <string>storage.modifier.access-control.cfscript</string>
                </dict>
                <key>2</key>
                 <dict>
                    <key>name</key>
                    <string>storage.type.return-type.void.cfscript</string>
                </dict>
                <key>3</key>
                <dict>
                    <key>name</key>
                    <string>storage.type.return-type.primitive.cfscript</string>
                </dict>
                <key>4</key>
                 <dict>
                    <key>name</key>
                    <string>storage.type.return-type.object.cfscript</string>
                </dict>
                <key>5</key>
                <dict>
                    <key>name</key>
                    <string>storage.type.function.cfscript</string>
                </dict>
                <key>6</key>
                <dict>
                    <key>name</key>
                    <string>entity.name.function.constructor.cfscript</string>
                </dict>
                <key>7</key>
                <dict>
                    <key>name</key>
                    <string>entity.name.function.cfscript</string>
                </dict>
                <!-- <key>8</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.function-parameters.begin.cfscript</string>
                </dict> -->
            </dict>
            <key>end</key>
            <string>(?=\()</string>
            <key>endCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.function-parameters.end.cfscript</string>
                </dict>
            </dict>
            <key>name</key>
            <string>meta.definition.function.cfscript</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>,</string>
                    <key>name</key>
                    <string>punctuation.definition.seperator.parameter.cfscript</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#cfscript-code</string>
                </dict>
            </array>
        </dict>
        <!-- /functions -->


        <!-- tag-operators -->
        <key>tag-operators</key>
        <dict>
            <key>patterns</key>
            <array>
                <!-- other: can also be a fn -->
                <dict>
                    <key>match</key>
                    <string>\b(?i:return)\b</string>
                    <key>name</key>
                    <string>entity.name.tag.operator.other.cfscript</string>
                </dict>
                <dict>
                    <key>begin</key>
                    <string>(?x)
                        \b
                        (?i:
                        (lock)|(transaction)|(thread)|(component)|(abort)
                        |(exit)|(include)|(param)|(thread)|(import)
                        |(rethrow|throw)|(property)|(interface)|(location)
                        |(break|exit)
                        )
                        \s+
                    </string>
                    <key>beginCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.lock.cfscript</string>
                        </dict>
                        <key>2</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.transaction.cfscript</string>
                        </dict>
                        <key>3</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.thread.cfscript</string>
                        </dict>
                        <key>4</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.component.cfscript</string>
                        </dict>
                        <key>5</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.abort.cfscript</string>
                        </dict>
                        <key>6</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.exit.cfscript</string>
                        </dict>
                        <key>7</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.include.cfscript</string>
                        </dict>
                        <key>8</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.param.cfscript</string>
                        </dict>
                        <key>9</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.thread.cfscript</string>
                        </dict>
                        <key>10</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.import.cfscript</string>
                        </dict>
                        <key>11</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.catch-exception.cfscript</string>
                        </dict>
                        <key>12</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.property.cfscript</string>
                        </dict>
                        <key>13</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.interface.cfscript</string>
                        </dict>
                        <key>14</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.location.cfscript</string>
                        </dict>
                        <key>15</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.control.cfscript</string>
                        </dict>
                    </dict>
                    <key>end</key>
                    <string>(?=;)|(?={)</string>
                    <key>name</key>
                    <string>meta.tag.operator.cfscript</string>
                    <key>patterns</key>
                    <array>
                        <dict>
                            <key>match</key>
                            <string>(?i:(\w+)\s*(?=\=))</string>
                            <key>name</key>
                            <string>entity.tag.name.operator-attribute.cfscript</string>
                        </dict>
                        <dict>
                            <key>include</key>
                            <string>#cfscript-code</string>
                        </dict>
                    </array>
                </dict>
            </array>
        </dict>



        <key>cfscript</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>include</key>
                    <string>#functions</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#cfscript-code</string>
                </dict>
            </array>
        </dict>

        <key>cfscript-code</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>include</key>
                    <string>#tag-operators</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#sql-code</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#keywords</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#function-call</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#storage-types</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#constants</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#variables</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#strings</string>
                </dict>
            </array>
        </dict>
        <!-- storage types -->
        <key>storage-types</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>\b(?i:var)\b</string>
                    <key>name</key>
                    <string>storage.modifier.var.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(function|string|date|struct|array|void|binary|numeric|boolean|query|xml|uuid|any))\b</string>
                    <key>name</key>
                    <string>storage.type.primitive.cfscript</string>
                </dict>
            </array>
        </dict>
        <!-- constants -->
        <key>constants</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>(?x)(
                            (\b[0-9]+)
                            |
                            (\.[0-9]+[0-9\.]*) # decimals
                            |
                            (0(x|X)[0-9a-fA-F]+) # hex
                            # matches really large double/floats
                            |(\.[0-9]+)((e|E)(\+|-)?[0-9]+)?([LlFfUuDd]|UL|ul)?
                            )\b
                        </string>
                    <key>name</key>
                    <string>constant.numeric.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(true|false|null))\b</string>
                    <key>name</key>
                    <string>constant.language.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b_?([A-Z][A-Z0-9_]+)\b</string>
                    <key>name</key>
                    <string>constant.other.cfscript</string>
                </dict>
            </array>
        </dict>
        <!-- comments -->
        <key>comments</key>
        <dict>
            <key>patterns</key>
            <array>
                <!-- comment block /** -->
                <dict>
                    <key>captures</key>
                    <dict>
                        <key>0</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.definition.comment.cfscript</string>
                        </dict>
                    </dict>
                    <key>match</key>
                    <string>/\*\*/</string>
                    <key>name</key>
                    <string>comment.block.empty.cfscript</string>
                </dict>
                <!-- as javadoc for cfscript annotations -->
                <dict>
                    <key>include</key>
                    <string>text.html.javadoc</string>
                </dict>
                <!-- block comments (bellow) -->
                <dict>
                    <key>include</key>
                    <string>#comment-block</string>
                </dict>
                <!-- double-slash comment -->
                <dict>
                    <key>captures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.definition.comment.cfscript</string>
                        </dict>
                    </dict>
                    <key>match</key>
                    <string>(//).*$\n?</string>
                    <key>name</key>
                    <string>comment.line.double-slash.cfscript</string>
                </dict>
            </array>
        </dict>
        <!-- comment-block /* -->
        <key>comment-block</key>
        <dict>
            <key>begin</key>
            <string>/\*</string>
            <key>captures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.comment.cfscript</string>
                </dict>
            </dict>
            <key>end</key>
            <string>\*/</string>
            <key>name</key>
            <string>comment.block.cfscript</string>
        </dict>
        <!-- /comments -->
        <!-- strings -->
        <key>strings</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>include</key>
                    <string>#string-quoted-double</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#string-quoted-single</string>
                </dict>
            </array>
        </dict>
        <key>string-quoted-double</key>
        <dict>
            <key>begin</key>
            <string>"</string>
            <key>beginCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.begin.cfscript</string>
                </dict>
            </dict>
            <key>end</key>
            <string>"(?!")</string>
            <key>endCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.end.cfscript</string>
                </dict>
            </dict>
            <key>name</key>
            <string>string.quoted.double.cfscript</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>("")</string>
                    <key>name</key>
                    <string>constant.character.escape.quoted.double.cfscript</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#nest_hash</string>
                </dict>
            </array>
        </dict>
        <key>string-quoted-single</key>
        <dict>
            <key>begin</key>
            <string>'</string>
            <key>beginCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.begin.cfscript</string>
                </dict>
            </dict>
            <key>end</key>
            <string>'(?!')</string>
            <key>endCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.end.cfscript</string>
                </dict>
            </dict>
            <key>name</key>
            <string>string.quoted.single.cfscript</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>('')</string>
                    <key>name</key>
                    <string>constant.character.escape.quoted.single.cfscript</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#nest_hash</string>
                </dict>
            </array>
        </dict>
        <!-- /strings -->

        <!-- keywords -->
        <key>keywords</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>\b(?i:new)\b</string>
                    <key>name</key>
                    <string>keyword.other.new.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:required)\b</string>
                    <key>name</key>
                    <string>keyword.other.required.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(try|catch))\b</string>
                    <key>name</key>
                    <string>keyword.control.catch-exception.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(?x)
                        \b(?i:(case|default|continue|if|else|elseif|finally
                            |for|in|do|while|switch|trace))\b</string>
                    <key>name</key>
                    <string>keyword.control.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(==|!=|&lt;=|&gt;=|&lt;|&gt;)</string>
                    <key>name</key>
                    <string>keyword.operator.comparison.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(GREATER|LESS|THAN|EQUAL\s+TO|DOES|CONTAINS|EQUAL|EQ|NEQ|LT|LTE|GT|GTE|AND|IS))\b</string>
                    <key>name</key>
                    <string>keyword.operator.decision.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(\-\-|\+\+)</string>
                    <key>name</key>
                    <string>keyword.operator.increment-decrement.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(?i:(\^|\-|\+|\*|\/|\\|%|\-=|\+=|\*=|\/=|%=|\bMOD\b))</string>
                    <key>name</key>
                    <string>keyword.operator.arithmetic.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(&amp;|&amp;=)</string>
                    <key>name</key>
                    <string>keyword.operator.concat.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(=)</string>
                    <key>name</key>
                    <string>keyword.operator.assignment.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(NOT|!|AND|&amp;&amp;|OR|\|\||XOR|EQV|IMP))\b</string>
                    <key>name</key>
                    <string>keyword.operator.logical.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(\?|:)</string>
                    <key>name</key>
                    <string>keyword.operator.ternary.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>;</string>
                    <key>name</key>
                    <string>punctuation.terminator.cfscript</string>
                </dict>
            </array>
        </dict>
        <!-- / keywords -->

        <!-- function-call -->
        <!-- TODO: add all language functions -->
        <key>function-call</key>
        <dict>
            <key>begin</key>
            <string>(?x)
                (?i:
                    (directoryExists|structKeyExists)
                    |
                    (\w+)
                )
                \s*
                (\()
            </string>
            <key>beginCaptures</key>
            <dict>
                <key>1</key>
                <dict>
                    <key>name</key>
                    <string>support.function.cfscript</string>
                </dict>
                <key>2</key>
                <dict>
                    <key>name</key>
                    <!-- may possibly need renaming -->
                    <string>support.function.cfscript</string>
                </dict>
                <key>3</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.function-parameters.begin.cfscript</string>
                </dict>
            </dict>
            <key>end</key>
            <string>\)</string>
            <key>endCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.function-parameters.end.cfscript</string>
                </dict>
            </dict>
            <key>name</key>
            <string>meta.function-call.cfscript</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>,</string>
                    <key>name</key>
                    <string>punctuation.definition.seperator.parameter.cfscript</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#cfscript-code</string>
                </dict>
            </array>
        </dict>
        <!-- /function-call -->
        <!-- nest_hash -->
        <key>nest_hash</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>##</string>
                    <key>name</key>
                    <string>string.escaped.hash.cfscript</string>
                </dict>
                <dict>
                    <key>begin</key>
                    <string>(#)</string>
                    <key>beginCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.definition.hash.begin.cfscript</string>
                        </dict>
                    </dict>
                    <key>end</key>
                    <string>(#)</string>
                    <key>endCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.definition.hash.end.cfscript</string>
                        </dict>
                    </dict>
                    <key>name</key>
                    <string>source.cfscript.embedded.cfscript, meta.inline.hash.cfscript</string>
                    <key>patterns</key>
                    <array>
                        <dict>
                            <key>include</key>
                            <string>#cfscript-code</string>
                        </dict>
                    </array>
                </dict>
            </array>
        </dict>
        <!-- /nest_hash -->
        <!-- variables -->
        <key>variables</key>
        <dict>
            <key>patterns</key>
            <array>
                <!-- matches single character // this should be improved it's lazy -->
                <dict>
                    <key>match</key>
                    <string>\b(\w)\b</string>
                    <key>name</key>
                    <string>storage.language.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(this|key))(?!\.)</string>
                    <key>name</key>
                    <string>variable.language.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(\.)</string>
                    <key>name</key>
                    <string>punctuation.definition.seperator.variable.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(?x)
                    (?i:
                        \b
                        (application|arguments|attributes|caller|cgi|client|
                            cookie|flash|form|local|request|server|session|
                            this|thistag|thread|thread local|url|variables|
                            super|self)
                        \b
                        |
                        (\w+)
                    )</string>
                    <key>captures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>variable.language.cfscript</string>
                        </dict>
                        <key>2</key>
                        <dict>
                            <key>name</key>
                            <string>variable.other.cfscript</string>
                        </dict>
                    </dict>
                </dict>
            </array>
        </dict>
        <!-- /variables -->

        <!-- sql -->
        <key>sql-code</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>begin</key>
                    <string>([\w+\.]+)\.((?i:setsql))\(\s*["|']</string>
                    <key>beginCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.function.query.cfscript, meta.toc-list.query.cfscript</string>
                        </dict>
                        <key>2</key>
                        <dict>
                            <key>name</key>
                            <string>support.function.cfscript</string>
                        </dict>
                    </dict>
                    <key>end</key>
                    <string>(["|']\s*\))</string>
                    <key>endCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.parenthesis.end.cfscript</string>
                        </dict>
                    </dict>
                    <key>name</key>
                    <!-- could add meta block (optional)
                        meta.block.function.query.cfscript -->
                    <string>source.sql.embedded.cfscript</string>
                    <key>patterns</key>
                    <array>
                        <dict>
                            <key>include</key>
                            <string>#nest_hash</string>
                        </dict>
                        <dict>
                            <key>include</key>
                            <string>source.sql</string>
                        </dict>
                    </array>

                </dict>
            </array>
        </dict>
        <!-- /sql-code -->


    </dict>

    <key>scopeName</key>
    <string>source.cfscript</string>
    <key>uuid</key>
    <string>D5324EE0-4226-11E1-B86C-0800200C9A66</string>
</dict>
</plist>
<commit_msg>fixes #18 #19 prevents certain keywords matching as tag-operators. (posting these issues really helps a lot to improve the language files - thanks!)<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>comment</key>
    <string>This tmLanguage file is used internally by ColdFusion and Component tmLanguage files</string>
    <key>fileTypes</key>
    <array/>
    <key>foldingStartMarker</key>
    <string>^.*\bfunction\s*(\w+\s*)?\([^\)]*\)(\s*\{[^\}]*)?\s*$</string>
    <key>foldingStopMarker</key>
    <string>^\s*\}</string>
    <key>name</key>
    <string>CFScript (do not use)</string>
    <key>patterns</key>
    <array>

        <dict>
            <key>include</key>
            <string>#comments</string>
        </dict>

        <dict>
            <key>include</key>
            <string>#cfscript</string>
        </dict>
    </array>

    <key>repository</key>
    <dict>

        <!-- functions -->
        <key>functions</key>
        <dict>
            <key>begin</key>
                <string>(?x)^\s*
                    (?:
                        (?: # optional access-control modifier and return-type
                            (?:(?i:\b(private|package|public|remote))\s+)+\s* # access-control.modifier
                            (?i:\b
                                (void)
                                |
                                (any|array|binary|boolean|component|date|guid|numeric|query|string|struct|xml|uuid) # return-type.primitive
                                |
                                ([A-Za-z0-9_\.$]+) #return-type component/object (may need additional tokens)
                            )?
                        )?
                    )
                    \s*
                    (?i:(function)) # storage.function
                    \s+
                    (?:
                        (init) # entity.name.function.contructor
                        |
                        (\w+) # entity.name.function
                    )
                </string>
            <key>beginCaptures</key>
            <dict>
                <key>1</key>
                <dict>
                    <key>name</key>
                    <string>storage.modifier.access-control.cfscript</string>
                </dict>
                <key>2</key>
                 <dict>
                    <key>name</key>
                    <string>storage.type.return-type.void.cfscript</string>
                </dict>
                <key>3</key>
                <dict>
                    <key>name</key>
                    <string>storage.type.return-type.primitive.cfscript</string>
                </dict>
                <key>4</key>
                 <dict>
                    <key>name</key>
                    <string>storage.type.return-type.object.cfscript</string>
                </dict>
                <key>5</key>
                <dict>
                    <key>name</key>
                    <string>storage.type.function.cfscript</string>
                </dict>
                <key>6</key>
                <dict>
                    <key>name</key>
                    <string>entity.name.function.constructor.cfscript</string>
                </dict>
                <key>7</key>
                <dict>
                    <key>name</key>
                    <string>entity.name.function.cfscript</string>
                </dict>
                <!-- <key>8</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.function-parameters.begin.cfscript</string>
                </dict> -->
            </dict>
            <key>end</key>
            <string>(?=\()</string>
            <key>endCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.function-parameters.end.cfscript</string>
                </dict>
            </dict>
            <key>name</key>
            <string>meta.definition.function.cfscript</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>,</string>
                    <key>name</key>
                    <string>punctuation.definition.seperator.parameter.cfscript</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#cfscript-code</string>
                </dict>
            </array>
        </dict>
        <!-- /functions -->


        <!-- tag-operators -->
        <key>tag-operators</key>
        <dict>
            <key>patterns</key>
            <array>
                <!-- other: can also be a fn -->
                <dict>
                    <key>match</key>
                    <string>\b(?i:return)\b</string>
                    <key>name</key>
                    <string>entity.name.tag.operator.other.cfscript</string>
                </dict>
                <dict>
                    <key>begin</key>
                    <string>(?x)
                        \b
                        (?i:
                        (lock)|(transaction)|(thread)|(component)|(abort)
                        |(exit)|(include)|(param)|(thread)|(import)
                        |(rethrow|throw)|(property)|(interface)|(location)
                        |(break|exit)
                        )
                        /b
                        (?!(\=)|(\,))
                    </string>
                    <key>beginCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.lock.cfscript</string>
                        </dict>
                        <key>2</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.transaction.cfscript</string>
                        </dict>
                        <key>3</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.thread.cfscript</string>
                        </dict>
                        <key>4</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.component.cfscript</string>
                        </dict>
                        <key>5</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.abort.cfscript</string>
                        </dict>
                        <key>6</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.exit.cfscript</string>
                        </dict>
                        <key>7</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.include.cfscript</string>
                        </dict>
                        <key>8</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.param.cfscript</string>
                        </dict>
                        <key>9</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.thread.cfscript</string>
                        </dict>
                        <key>10</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.import.cfscript</string>
                        </dict>
                        <key>11</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.catch-exception.cfscript</string>
                        </dict>
                        <key>12</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.property.cfscript</string>
                        </dict>
                        <key>13</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.interface.cfscript</string>
                        </dict>
                        <key>14</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.location.cfscript</string>
                        </dict>
                        <key>15</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.tag.operator.control.cfscript</string>
                        </dict>
                    </dict>
                    <key>end</key>
                    <string>(?=;)|(?={)</string>
                    <key>name</key>
                    <string>meta.tag.operator.cfscript</string>
                    <key>patterns</key>
                    <array>
                        <dict>
                            <key>match</key>
                            <string>(?i:(\w+)\s*(?=\=))</string>
                            <key>name</key>
                            <string>entity.tag.name.operator-attribute.cfscript</string>
                        </dict>
                        <dict>
                            <key>include</key>
                            <string>#cfscript-code</string>
                        </dict>
                    </array>
                </dict>
            </array>
        </dict>



        <key>cfscript</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>include</key>
                    <string>#functions</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#cfscript-code</string>
                </dict>
            </array>
        </dict>

        <key>cfscript-code</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>include</key>
                    <string>#tag-operators</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#sql-code</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#keywords</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#function-call</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#storage-types</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#constants</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#variables</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#strings</string>
                </dict>
            </array>
        </dict>
        <!-- storage types -->
        <key>storage-types</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>\b(?i:var)\b</string>
                    <key>name</key>
                    <string>storage.modifier.var.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(function|string|date|struct|array|void|binary|numeric|boolean|query|xml|uuid|any))\b</string>
                    <key>name</key>
                    <string>storage.type.primitive.cfscript</string>
                </dict>
            </array>
        </dict>
        <!-- constants -->
        <key>constants</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>(?x)(
                            (\b[0-9]+)
                            |
                            (\.[0-9]+[0-9\.]*) # decimals
                            |
                            (0(x|X)[0-9a-fA-F]+) # hex
                            # matches really large double/floats
                            |(\.[0-9]+)((e|E)(\+|-)?[0-9]+)?([LlFfUuDd]|UL|ul)?
                            )\b
                        </string>
                    <key>name</key>
                    <string>constant.numeric.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(true|false|null))\b</string>
                    <key>name</key>
                    <string>constant.language.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b_?([A-Z][A-Z0-9_]+)\b</string>
                    <key>name</key>
                    <string>constant.other.cfscript</string>
                </dict>
            </array>
        </dict>
        <!-- comments -->
        <key>comments</key>
        <dict>
            <key>patterns</key>
            <array>
                <!-- comment block /** -->
                <dict>
                    <key>captures</key>
                    <dict>
                        <key>0</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.definition.comment.cfscript</string>
                        </dict>
                    </dict>
                    <key>match</key>
                    <string>/\*\*/</string>
                    <key>name</key>
                    <string>comment.block.empty.cfscript</string>
                </dict>
                <!-- as javadoc for cfscript annotations -->
                <dict>
                    <key>include</key>
                    <string>text.html.javadoc</string>
                </dict>
                <!-- block comments (bellow) -->
                <dict>
                    <key>include</key>
                    <string>#comment-block</string>
                </dict>
                <!-- double-slash comment -->
                <dict>
                    <key>captures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.definition.comment.cfscript</string>
                        </dict>
                    </dict>
                    <key>match</key>
                    <string>(//).*$\n?</string>
                    <key>name</key>
                    <string>comment.line.double-slash.cfscript</string>
                </dict>
            </array>
        </dict>
        <!-- comment-block /* -->
        <key>comment-block</key>
        <dict>
            <key>begin</key>
            <string>/\*</string>
            <key>captures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.comment.cfscript</string>
                </dict>
            </dict>
            <key>end</key>
            <string>\*/</string>
            <key>name</key>
            <string>comment.block.cfscript</string>
        </dict>
        <!-- /comments -->
        <!-- strings -->
        <key>strings</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>include</key>
                    <string>#string-quoted-double</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#string-quoted-single</string>
                </dict>
            </array>
        </dict>
        <key>string-quoted-double</key>
        <dict>
            <key>begin</key>
            <string>"</string>
            <key>beginCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.begin.cfscript</string>
                </dict>
            </dict>
            <key>end</key>
            <string>"(?!")</string>
            <key>endCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.end.cfscript</string>
                </dict>
            </dict>
            <key>name</key>
            <string>string.quoted.double.cfscript</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>("")</string>
                    <key>name</key>
                    <string>constant.character.escape.quoted.double.cfscript</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#nest_hash</string>
                </dict>
            </array>
        </dict>
        <key>string-quoted-single</key>
        <dict>
            <key>begin</key>
            <string>'</string>
            <key>beginCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.begin.cfscript</string>
                </dict>
            </dict>
            <key>end</key>
            <string>'(?!')</string>
            <key>endCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.string.end.cfscript</string>
                </dict>
            </dict>
            <key>name</key>
            <string>string.quoted.single.cfscript</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>('')</string>
                    <key>name</key>
                    <string>constant.character.escape.quoted.single.cfscript</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#nest_hash</string>
                </dict>
            </array>
        </dict>
        <!-- /strings -->

        <!-- keywords -->
        <key>keywords</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>\b(?i:new)\b</string>
                    <key>name</key>
                    <string>keyword.other.new.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:required)\b</string>
                    <key>name</key>
                    <string>keyword.other.required.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(try|catch))\b</string>
                    <key>name</key>
                    <string>keyword.control.catch-exception.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(?x)
                        \b(?i:(case|default|continue|if|else|elseif|finally
                            |for|in|do|while|switch|trace))\b</string>
                    <key>name</key>
                    <string>keyword.control.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(==|!=|&lt;=|&gt;=|&lt;|&gt;)</string>
                    <key>name</key>
                    <string>keyword.operator.comparison.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(GREATER|LESS|THAN|EQUAL\s+TO|DOES|CONTAINS|EQUAL|EQ|NEQ|LT|LTE|GT|GTE|AND|IS))\b</string>
                    <key>name</key>
                    <string>keyword.operator.decision.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(\-\-|\+\+)</string>
                    <key>name</key>
                    <string>keyword.operator.increment-decrement.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(?i:(\^|\-|\+|\*|\/|\\|%|\-=|\+=|\*=|\/=|%=|\bMOD\b))</string>
                    <key>name</key>
                    <string>keyword.operator.arithmetic.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(&amp;|&amp;=)</string>
                    <key>name</key>
                    <string>keyword.operator.concat.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(=)</string>
                    <key>name</key>
                    <string>keyword.operator.assignment.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(NOT|!|AND|&amp;&amp;|OR|\|\||XOR|EQV|IMP))\b</string>
                    <key>name</key>
                    <string>keyword.operator.logical.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(\?|:)</string>
                    <key>name</key>
                    <string>keyword.operator.ternary.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>;</string>
                    <key>name</key>
                    <string>punctuation.terminator.cfscript</string>
                </dict>
            </array>
        </dict>
        <!-- / keywords -->

        <!-- function-call -->
        <!-- TODO: add all language functions -->
        <key>function-call</key>
        <dict>
            <key>begin</key>
            <string>(?x)
                (?i:
                    (directoryExists|structKeyExists)
                    |
                    (\w+)
                )
                \s*
                (\()
            </string>
            <key>beginCaptures</key>
            <dict>
                <key>1</key>
                <dict>
                    <key>name</key>
                    <string>support.function.cfscript</string>
                </dict>
                <key>2</key>
                <dict>
                    <key>name</key>
                    <!-- may possibly need renaming -->
                    <string>support.function.cfscript</string>
                </dict>
                <key>3</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.function-parameters.begin.cfscript</string>
                </dict>
            </dict>
            <key>end</key>
            <string>\)</string>
            <key>endCaptures</key>
            <dict>
                <key>0</key>
                <dict>
                    <key>name</key>
                    <string>punctuation.definition.function-parameters.end.cfscript</string>
                </dict>
            </dict>
            <key>name</key>
            <string>meta.function-call.cfscript</string>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>,</string>
                    <key>name</key>
                    <string>punctuation.definition.seperator.parameter.cfscript</string>
                </dict>
                <dict>
                    <key>include</key>
                    <string>#cfscript-code</string>
                </dict>
            </array>
        </dict>
        <!-- /function-call -->
        <!-- nest_hash -->
        <key>nest_hash</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>match</key>
                    <string>##</string>
                    <key>name</key>
                    <string>string.escaped.hash.cfscript</string>
                </dict>
                <dict>
                    <key>begin</key>
                    <string>(#)</string>
                    <key>beginCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.definition.hash.begin.cfscript</string>
                        </dict>
                    </dict>
                    <key>end</key>
                    <string>(#)</string>
                    <key>endCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.definition.hash.end.cfscript</string>
                        </dict>
                    </dict>
                    <key>name</key>
                    <string>source.cfscript.embedded.cfscript, meta.inline.hash.cfscript</string>
                    <key>patterns</key>
                    <array>
                        <dict>
                            <key>include</key>
                            <string>#cfscript-code</string>
                        </dict>
                    </array>
                </dict>
            </array>
        </dict>
        <!-- /nest_hash -->
        <!-- variables -->
        <key>variables</key>
        <dict>
            <key>patterns</key>
            <array>
                <!-- matches single character // this should be improved it's lazy -->
                <dict>
                    <key>match</key>
                    <string>\b(\w)\b</string>
                    <key>name</key>
                    <string>storage.language.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>\b(?i:(this|key))(?!\.)</string>
                    <key>name</key>
                    <string>variable.language.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(\.)</string>
                    <key>name</key>
                    <string>punctuation.definition.seperator.variable.cfscript</string>
                </dict>
                <dict>
                    <key>match</key>
                    <string>(?x)
                    (?i:
                        \b
                        (application|arguments|attributes|caller|cgi|client|
                            cookie|flash|form|local|request|server|session|
                            this|thistag|thread|thread local|url|variables|
                            super|self)
                        \b
                        |
                        (\w+)
                    )</string>
                    <key>captures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>variable.language.cfscript</string>
                        </dict>
                        <key>2</key>
                        <dict>
                            <key>name</key>
                            <string>variable.other.cfscript</string>
                        </dict>
                    </dict>
                </dict>
            </array>
        </dict>
        <!-- /variables -->

        <!-- sql -->
        <key>sql-code</key>
        <dict>
            <key>patterns</key>
            <array>
                <dict>
                    <key>begin</key>
                    <string>([\w+\.]+)\.((?i:setsql))\(\s*["|']</string>
                    <key>beginCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>entity.name.function.query.cfscript, meta.toc-list.query.cfscript</string>
                        </dict>
                        <key>2</key>
                        <dict>
                            <key>name</key>
                            <string>support.function.cfscript</string>
                        </dict>
                    </dict>
                    <key>end</key>
                    <string>(["|']\s*\))</string>
                    <key>endCaptures</key>
                    <dict>
                        <key>1</key>
                        <dict>
                            <key>name</key>
                            <string>punctuation.parenthesis.end.cfscript</string>
                        </dict>
                    </dict>
                    <key>name</key>
                    <!-- could add meta block (optional)
                        meta.block.function.query.cfscript -->
                    <string>source.sql.embedded.cfscript</string>
                    <key>patterns</key>
                    <array>
                        <dict>
                            <key>include</key>
                            <string>#nest_hash</string>
                        </dict>
                        <dict>
                            <key>include</key>
                            <string>source.sql</string>
                        </dict>
                    </array>

                </dict>
            </array>
        </dict>
        <!-- /sql-code -->


    </dict>

    <key>scopeName</key>
    <string>source.cfscript</string>
    <key>uuid</key>
    <string>D5324EE0-4226-11E1-B86C-0800200C9A66</string>
</dict>
</plist>

{'fraction_non_alphanumeric': 0.13860996259106123, 'fraction_numerical': 0.0032814858567959573, 'mean_word_length': 0.8245472234695405, 'pattern_counts': {'":': 0, '<': 2329, '<?xml version=': 2, '>': 2329, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1158234', 'n_tokens_mistral': 16267, 'n_tokens_neox': 14955, 'n_words': 1771}