hcl/extras/grammar/HCLTemplate.tmLanguage

172 lines
4.5 KiB
Plaintext
Raw Normal View History

<?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>fileTypes</key>
<array>
<string>tmpl</string>
</array>
<key>name</key>
<string>HCL Template</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>[^\$]?(\$\{~?)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.tag.embedded.start.hcltemplate</string>
</dict>
</dict>
<key>comment</key>
<string>Interpolation Sequences</string>
<key>end</key>
<string>~?}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>entity.tag.embedded.end.hcltemplate</string>
</dict>
</dict>
<key>name</key>
<string>meta.interp.hcltemplate</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.hclexpr</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>[^\%]?(\%\{~?)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.tag.embedded.start.hcltemplate</string>
</dict>
</dict>
<key>comment</key>
<string>Control Sequences</string>
<key>end</key>
<string>~?}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>entity.tag.embedded.end.hcltemplate</string>
</dict>
</dict>
<key>name</key>
<string>meta.control.hcltemplate</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#templateif</string>
</dict>
<dict>
<key>include</key>
<string>#templatefor</string>
</dict>
<dict>
<key>include</key>
<string>#templatesimplekw</string>
</dict>
</array>
</dict>
</array>
<key>repository</key>
<dict>
<key>templatefor</key>
<dict>
<key>begin</key>
<string>(for)\s*(\w+)\s*(,\s*(\w+)\s*)?(in)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.hcltemplate</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>variable.other.hcl</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>variable.other.hcl</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.control.hcltemplate</string>
</dict>
</dict>
<key>end</key>
<string>(?=~?\})</string>
<key>name</key>
<string>meta.templatefor.hcltemplate</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.hclexpr</string>
</dict>
</array>
</dict>
<key>templateif</key>
<dict>
<key>begin</key>
<string>(if)\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.hcltemplate</string>
</dict>
</dict>
<key>end</key>
<string>(?=~?\})</string>
<key>name</key>
<string>meta.templateif.hcltemplate</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.hclexpr</string>
</dict>
</array>
</dict>
<key>templatesimplekw</key>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.hcl</string>
</dict>
</dict>
<key>match</key>
<string>(else|endif|endfor)</string>
</dict>
</dict>
<key>scopeName</key>
<string>source.hcltemplate</string>
<key>uuid</key>
<string>ac6be18e-d44f-4a73-bd8f-b973fd26df05</string>
</dict>
</plist>