Permalink
Browse files

First crack at a Haml langauge grammar

git-svn-id: http://svn.textmate.org/trunk/Bundles/Haml.tmbundle@6461 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
0 parents commit ef61d4f02136074ecf0452f9c2ee553c1dacb5d7 @kballard kballard committed Jan 19, 2007
Showing with 195 additions and 0 deletions.
  1. +185 −0 Syntaxes/Haml.tmLanguage
  2. +10 −0 info.plist
@@ -0,0 +1,185 @@
+<?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">
+<plist version="1.0">
+<dict>
+ <key>fileTypes</key>
+ <array>
+ <string>haml</string>
+ </array>
+ <key>keyEquivalent</key>
+ <string>^~H</string>
+ <key>name</key>
+ <string>Haml</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.prolog.haml</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>^(!!!)($|\s.*)</string>
+ <key>name</key>
+ <string>meta.prolog.haml</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.comment.haml</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>^ *(/)\s*\S.*</string>
+ <key>name</key>
+ <string>comment.line.haml</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>^( *)(/)\s*$</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.comment.haml</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>^(?!\1 )</string>
+ <key>name</key>
+ <string>comment.block.haml</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>^\s*(?:((%)(\w+))|(?=\.|#))</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>meta.tag.haml</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.haml</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.haml</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>$|(?!\.|#|\{|=|-|~|/)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\.[\w-]+</string>
+ <key>name</key>
+ <string>entity.name.tag.class.haml</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>#[\w-]+</string>
+ <key>name</key>
+ <string>entity.name.tag.id.haml</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>\{</string>
+ <key>end</key>
+ <string>\}</string>
+ <key>name</key>
+ <string>meta.section.attributes.haml</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.ruby</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#rubyline</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>/</string>
+ <key>name</key>
+ <string>punctuation.terminator.tag.haml</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\|$</string>
+ <key>name</key>
+ <string>punctuation.terminator.line.continuation.haml</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>meta.escape.haml</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>^\s*(\\.)</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#rubyline</string>
+ </dict>
+ </array>
+ <key>repository</key>
+ <dict>
+ <key>rubyline</key>
+ <dict>
+ <key>begin</key>
+ <string>=|-|~</string>
+ <key>contentName</key>
+ <string>source.ruby.embedded.haml</string>
+ <key>end</key>
+ <string>((do|\{)( |[^|]+|)?)$|$</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>source.ruby.embedded.html</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.ruby.start-block</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>meta.line.ruby.haml</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.ruby</string>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ <key>scopeName</key>
+ <string>text.haml</string>
+ <key>uuid</key>
+ <string>3D727049-DD05-45DF-92A5-D50EA36FD035</string>
+</dict>
+</plist>
@@ -0,0 +1,10 @@
+<?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">
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>Haml</string>
+ <key>uuid</key>
+ <string>4618480A-F4C3-40FE-8719-DE54CBDFB92A</string>
+</dict>
+</plist>

0 comments on commit ef61d4f

Please sign in to comment.