Grammar update

This commit is contained in:
Arfon Smith
2016-02-29 07:53:48 -07:00
parent f14ae8e51b
commit 8fea8a0b47
21 changed files with 855 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[Book $1 - ${2:Title}
]]></content>
<tabTrigger>book</tabTrigger>
<scope>source.Inform7</scope>
</snippet>

View File

@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[Chapter $1 - ${2:Title}
]]></content>
<tabTrigger>chapter</tabTrigger>
<scope>source.Inform7</scope>
</snippet>

View File

@@ -0,0 +1,7 @@
<snippet>
<content><![CDATA[
${1:DoorName} is a door. $1 is ${2:Direction} from ${3:Room}.
]]></content>
<tabTrigger>door</tabTrigger>
<scope>source.Inform7</scope>
</snippet>

View File

@@ -0,0 +1,34 @@
{ "name": "Inform7",
"scopeName": "source.Inform7",
"fileTypes": ["i7x"],
"patterns": [
{ "name": "keyword.control.Inform7",
"match": "\\b(Include|Release)\\b"
},
{ "name" : "comment.block.Inform7",
"begin" : "\\[",
"end" : "\\]",
"comment" : "All comments in Inform7 are delimited this way."
},
{ "name" : "string.quoted.double.Inform7",
"begin" : "\"",
"end" : "\"",
"patterns": [
{ "name" : "keyword.operator.Inform7",
"begin" : "\\[",
"end" : "\\]",
"comment" : "For logic inside of strings."
}
]
},
{ "name" : "storage.type.Inform7",
"match" : "(Volume|Book|Chapter|Part|Section|Table)\\s+\\d?\\s+-?\\s+((?:\\w|\\s|-)*)",
"comment": "Matches headings for major sections in Inform7"
},
{ "name": "constant.numeric.Inform7",
"match": "([0-9])+",
"comment":"Gotta call out the numbers!"
}
],
"uuid": "0c4cbdee-beb7-4ea6-af56-27246d479373"
}

View File

@@ -0,0 +1,74 @@
<?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>i7x</string>
<string>inform</string>
<string>ni</string>
</array>
<key>name</key>
<string>Inform7</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(Include|Release)\b</string>
<key>name</key>
<string>keyword.control.Inform7</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>comment</key>
<string>All comments in Inform7 are delimited this way.</string>
<key>end</key>
<string>\]</string>
<key>name</key>
<string>comment.block.Inform7</string>
</dict>
<dict>
<key>begin</key>
<string>"</string>
<key>end</key>
<string>"</string>
<key>name</key>
<string>string.quoted.double.Inform7</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\[</string>
<key>comment</key>
<string>For logic inside of strings.</string>
<key>end</key>
<string>\]</string>
<key>name</key>
<string>keyword.operator.Inform7</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>Matches headings for major sections in Inform7</string>
<key>match</key>
<string>(Volume|Book|Chapter|Part|Section|Table)\s+\d?\s+-?\s+((?:\w|\s|-)*)</string>
<key>name</key>
<string>storage.type.Inform7</string>
</dict>
<dict>
<key>comment</key>
<string>Gotta call out the numbers!</string>
<key>match</key>
<string>([0-9])+</string>
<key>name</key>
<string>constant.numeric.Inform7</string>
</dict>
</array>
<key>scopeName</key>
<string>source.Inform7</string>
<key>uuid</key>
<string>0c4cbdee-beb7-4ea6-af56-27246d479373</string>
</dict>
</plist>

View File

@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
$1 is a portable thing in ${2:Room} ${3:ShortDescription}
The description of $1 is ${4:Description}
]]></content>
<tabTrigger>object</tabTrigger>
<scope>source.Inform7</scope>
</snippet>

View File

@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[Part $1 - ${2:Title}
]]></content>
<tabTrigger>part</tabTrigger>
<scope>source.Inform7</scope>
</snippet>

View File

@@ -0,0 +1,7 @@
<snippet>
<content><![CDATA[
${1:RoomName} is a room in ${2:Region}. "${3:Description}"
]]></content>
<tabTrigger>room</tabTrigger>
<scope>source.Inform7</scope>
</snippet>

View File

@@ -0,0 +1,11 @@
<snippet>
<content><![CDATA[
${1:SceneName} is a Scene.
$1 begins when $2 .
$1 ends when $3 .
When $1 begins: $4 .
When $1 ends: $5 .
]]></content>
<tabTrigger>scene</tabTrigger>
<scope>source.Inform7</scope>
</snippet>

View File

@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[Section $1 - ${2:Title}
]]></content>
<tabTrigger>section</tabTrigger>
<scope>source.Inform7</scope>
</snippet>

View File

@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[Volume $1 - ${2:Title}
]]></content>
<tabTrigger>volume</tabTrigger>
<scope>source.Inform7</scope>
</snippet>