Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding 'include' keyword to TextMate grammar

adding indent patterns for tmBundle
  • Loading branch information...
commit 8eacf917049f085a00593eedb546101b8a891373 1 parent 3682f5b
@kassens kassens authored
View
8 Treetop.tmbundle/Preferences/Comments.tmPreferences
@@ -3,9 +3,15 @@
<plist version="1.0">
<dict>
<key>name</key>
- <string>Comments</string>
+ <string>Misc</string>
+ <key>scope</key>
+ <string>source.treetop</string>
<key>settings</key>
<dict>
+ <key>decreaseIndentPattern</key>
+ <string>^\s*end\s*$</string>
+ <key>increaseIndentPattern</key>
+ <string>^\s*(grammar|rule)\s+\w+\s*$</string>
<key>shellVariables</key>
<array>
<dict>
View
19 Treetop.tmbundle/Syntaxes/Treetop Grammar.tmLanguage
@@ -55,6 +55,25 @@
<string>#comment</string>
</dict>
<dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.include.treetop</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.include.treetop</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(include)\s+(\w+)</string>
+ <key>name</key>
+ <string>meta.include.treetop</string>
+ </dict>
+ <dict>
<key>begin</key>
<string>\b(rule)\b (\w+)</string>
<key>beginCaptures</key>
Please sign in to comment.
Something went wrong with that request. Please try again.