Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revamp grammar, add meta.embedded scopes.

  • Loading branch information...
commit 5815ab31a263472bf9d14abde5f750b976469b96 1 parent e313819
@infininight infininight authored
View
4 Preferences/Smart Typing Pairs.tmPreferences
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Smart Typing Pairs</string>
<key>scope</key>
- <string>meta.scope.output.cfm, string.quoted.double.cfm</string>
+ <string>meta.scope.tag.embedded.cfoutput.cfm - meta.tag.template.cfoutput.cfm, string.quoted.double.cfm</string>
<key>settings</key>
<dict>
<key>smartTypingPairs</key>
View
547 Syntaxes/ColdFusion.tmLanguage
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
@@ -8,127 +8,54 @@
<string>cfml</string>
<string>cfc</string>
</array>
- <key>keyEquivalent</key>
- <string>^~C</string>
- <key>name</key>
- <string>ColdFusion</string>
- <key>patterns</key>
- <array>
+ <key>injections</key>
+ <dict>
+ <key>meta.scope.tag.embedded.cfoutput.cfm - meta.tag.template.cfoutput.cfm</key>
<dict>
- <key>begin</key>
- <string>(?:^\s+)?&lt;((?i:cfoutput))\b(?![^&gt;]*/&gt;)</string>
- <key>captures</key>
- <dict>
- <key>1</key>
- <dict>
- <key>name</key>
- <string>entity.name.tag.cfoutput.cfm</string>
- </dict>
- </dict>
- <key>end</key>
- <string>&lt;/((?i:cfoutput))&gt;(?:\s*\n)?</string>
- <key>name</key>
- <string>meta.tag.cfoutput.cfm</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
- <string>#tag-stuff</string>
+ <string>#variable</string>
</dict>
<dict>
- <key>begin</key>
- <string>&gt;</string>
- <key>contentName</key>
- <string>meta.scope.output.cfm</string>
- <key>end</key>
- <string>(?=&lt;/(?i:cfoutput))</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>include</key>
- <string>$self</string>
- </dict>
- </array>
+ <key>include</key>
+ <string>#language</string>
</dict>
</array>
</dict>
+ <key>text.html.cfm - (meta.embedded.block | meta.embedded.line | meta.tag | comment)</key>
<dict>
- <key>begin</key>
- <string>(?:^\s+)?&lt;((?i:cfquery))\b(?![^&gt;]*/&gt;)</string>
- <key>captures</key>
- <dict>
- <key>1</key>
- <dict>
- <key>name</key>
- <string>entity.name.tag.cfquery.cfm</string>
- </dict>
- </dict>
- <key>end</key>
- <string>&lt;/((?i:cfquery))&gt;(?:\s*\n)?</string>
- <key>name</key>
- <string>meta.tag.cfquery.cfm</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
- <string>#tag-stuff</string>
- </dict>
- <dict>
- <key>begin</key>
- <string>(?&lt;=&gt;)</string>
- <key>end</key>
- <string>(?=&lt;/(?i:cfquery))</string>
- <key>name</key>
- <string>source.sql.embedded</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>include</key>
- <string>source.sql</string>
- </dict>
- </array>
+ <string>#language</string>
</dict>
</array>
</dict>
+ </dict>
+ <key>keyEquivalent</key>
+ <string>^~C</string>
+ <key>name</key>
+ <string>ColdFusion</string>
+ <key>patterns</key>
+ <array/>
+ <key>repository</key>
+ <dict>
+ <key>comment</key>
<dict>
<key>begin</key>
- <string>&lt;/?((?i:cf)([a-zA-Z0-9]+))(?=[^&gt;]*&gt;)</string>
- <key>beginCaptures</key>
+ <string>&lt;!---</string>
+ <key>captures</key>
<dict>
- <key>1</key>
+ <key>0</key>
<dict>
<key>name</key>
- <string>entity.name.tag.cfm</string>
+ <string>punctuation.definition.comment.cfm</string>
</dict>
</dict>
<key>end</key>
- <string>&gt;</string>
- <key>name</key>
- <string>meta.tag.any.cfm</string>
- <key>patterns</key>
- <array>
- <dict>
- <key>include</key>
- <string>#tag-stuff</string>
- </dict>
- </array>
- </dict>
- <dict>
- <key>include</key>
- <string>#coldfusion-comment</string>
- </dict>
- <dict>
- <key>include</key>
- <string>text.html.basic</string>
- </dict>
- </array>
- <key>repository</key>
- <dict>
- <key>coldfusion-comment</key>
- <dict>
- <key>begin</key>
- <string>&lt;!---</string>
- <key>end</key>
<string>---&gt;</string>
<key>name</key>
<string>comment.block.cfm</string>
@@ -136,103 +63,292 @@
<array>
<dict>
<key>include</key>
- <string>#coldfusion-comment</string>
+ <string>#comment</string>
</dict>
</array>
</dict>
- <key>embedded-code</key>
- <dict>
- <key>patterns</key>
- <array/>
- </dict>
- <key>entities</key>
+ <key>language</key>
<dict>
<key>patterns</key>
<array>
<dict>
- <key>match</key>
- <string>&amp;([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);</string>
- <key>name</key>
- <string>constant.character.entity.html</string>
+ <key>include</key>
+ <string>#comment</string>
</dict>
<dict>
- <key>match</key>
- <string>&amp;</string>
- <key>name</key>
- <string>invalid.illegal.bad-ampersand.html</string>
+ <key>include</key>
+ <string>#wrapper</string>
</dict>
- </array>
- </dict>
- <key>string-double-quoted</key>
- <dict>
- <key>begin</key>
- <string>"</string>
- <key>end</key>
- <string>"</string>
- <key>name</key>
- <string>string.quoted.double.cfm</string>
- <key>patterns</key>
- <array>
<dict>
<key>include</key>
- <string>#embedded-code</string>
+ <string>#tags</string>
</dict>
<dict>
<key>include</key>
- <string>#entities</string>
+ <string>text.html.basic</string>
</dict>
</array>
</dict>
- <key>string-single-quoted</key>
+ <key>tags</key>
<dict>
- <key>begin</key>
- <string>'</string>
- <key>end</key>
- <string>'</string>
- <key>name</key>
- <string>string.quoted.single.cfm</string>
<key>patterns</key>
<array>
<dict>
- <key>include</key>
- <string>#embedded-code</string>
+ <key>begin</key>
+ <string>(&lt;)((?i:cfquery))\b</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>meta.tag.template.cfquery.cfm</string>
+ </dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.begin.cfm</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfm</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>((&lt;/))((?i:cfquery))(&gt;)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>meta.tag.template.cfquery.cfm</string>
+ </dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>source.sql</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.begin.cfm</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfm</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfm</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.embedded.block.sql</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#tag_stuff</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(?!\G|&lt;/(?i:cfquery))</string>
+ <key>end</key>
+ <string>(?=&lt;/(?i:cfquery))</string>
+ <key>name</key>
+ <string>source.sql</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.sql</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
</dict>
<dict>
- <key>include</key>
- <string>#entities</string>
+ <key>begin</key>
+ <string>(&lt;)((?i:cfscript))\b</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>meta.tag.template.cfscript.cfm</string>
+ </dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.begin.cfm</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfm</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>((&lt;/))((?i:cfscript))(&gt;)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>meta.tag.template.cfscript.cfm</string>
+ </dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>source.sql</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.begin.cfm</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfm</string>
+ </dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfm</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.embedded.block.sql</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#tag_stuff</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(&lt;)((?i:cfoutput))\b</string>
+ <key>captures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>meta.tag.template.cfoutput.cfm</string>
+ </dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.begin.cfm</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfm</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfm</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(&lt;/)((?i:cfoutput))(&gt;)</string>
+ <key>name</key>
+ <string>meta.scope.tag.embedded.cfoutput.cfm</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>\G</string>
+ <key>end</key>
+ <string>&gt;</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfm</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.tag.template.cfoutput.cfm</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>(&lt;/?)((?i:cf)([a-zA-Z0-9]+))(?=[^&gt;]*&gt;)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.begin.cfm</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfm</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>/?&gt;</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfm</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.tag.template.cfm</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#string-double-quoted</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#string-single-quoted</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#tag-generic-attribute</string>
+ </dict>
+ </array>
</dict>
</array>
- </dict>
- <key>tag-generic-attribute</key>
- <dict>
- <key>match</key>
- <string>\b([a-zA-Z\-:]+)</string>
- <key>name</key>
- <string>entity.other.attribute-name.cfm</string>
- </dict>
- <key>tag-id-attribute</key>
- <dict>
- <key>begin</key>
- <string>\b(id)\b\s*=</string>
- <key>captures</key>
+ <key>repository</key>
<dict>
- <key>1</key>
+ <key>entities</key>
<dict>
- <key>name</key>
- <string>entity.other.attribute-name.id.html</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>&amp;([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);</string>
+ <key>name</key>
+ <string>constant.character.entity.html</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>&amp;</string>
+ <key>name</key>
+ <string>invalid.illegal.bad-ampersand.html</string>
+ </dict>
+ </array>
</dict>
- </dict>
- <key>end</key>
- <string>(?&lt;='|")</string>
- <key>name</key>
- <string>meta.attribute-with-value.id.cfm</string>
- <key>patterns</key>
- <array>
+ <key>string-double-quoted</key>
<dict>
<key>begin</key>
<string>"</string>
- <key>contentName</key>
- <string>meta.toc-list.id.cfm</string>
<key>end</key>
<string>"</string>
<key>name</key>
@@ -241,19 +357,14 @@
<array>
<dict>
<key>include</key>
- <string>#embedded-code</string>
- </dict>
- <dict>
- <key>include</key>
<string>#entities</string>
</dict>
</array>
</dict>
+ <key>string-single-quoted</key>
<dict>
<key>begin</key>
<string>'</string>
- <key>contentName</key>
- <string>meta.toc-list.id.cfm</string>
<key>end</key>
<string>'</string>
<key>name</key>
@@ -262,39 +373,95 @@
<array>
<dict>
<key>include</key>
- <string>#embedded-code</string>
+ <string>#entities</string>
</dict>
+ </array>
+ </dict>
+ <key>tag-generic-attribute</key>
+ <dict>
+ <key>match</key>
+ <string>\b([a-zA-Z\-:]+)</string>
+ <key>name</key>
+ <string>entity.other.attribute-name.cfm</string>
+ </dict>
+ <key>tag_stuff</key>
+ <dict>
+ <key>patterns</key>
+ <array>
<dict>
- <key>include</key>
- <string>#entities</string>
+ <key>begin</key>
+ <string>\G</string>
+ <key>end</key>
+ <string>&gt;</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfm</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.tag.template.cfquery.cfm</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#string-double-quoted</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#string-single-quoted</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#tag-generic-attribute</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>
- </array>
+ </dict>
+ </dict>
+ <key>variable</key>
+ <dict>
+ <key>match</key>
+ <string>#[^#\s]+#</string>
+ <key>name</key>
+ <string>variable.other.cfm</string>
</dict>
- <key>tag-stuff</key>
+ <key>wrapper</key>
<dict>
<key>patterns</key>
<array>
<dict>
- <key>include</key>
- <string>#tag-id-attribute</string>
- </dict>
- <dict>
- <key>include</key>
- <string>#tag-generic-attribute</string>
- </dict>
- <dict>
- <key>include</key>
- <string>#string-double-quoted</string>
- </dict>
- <dict>
- <key>include</key>
- <string>#string-single-quoted</string>
- </dict>
- <dict>
- <key>include</key>
- <string>#embedded-code</string>
+ <key>begin</key>
+ <string>(^\s*)(?=&lt;(?i:cfquery|cfscript))</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.whitespace.embedded.leading.cfm</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(?!\G)(\s*$\n)?</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.whitespace.embedded.trailing.cfm</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#tags</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>
Please sign in to comment.
Something went wrong with that request. Please try again.