-
-
Save Zednosius/c94c02b063d7ab8069101ae13ab7c596 to your computer and use it in GitHub Desktop.
Syntax file, theme and testfile for coloring of nesting blocks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%YAML 1.2 | |
--- | |
# See http://www.sublimetext.com/docs/3/syntax.html | |
file_extensions: | |
- test | |
scope: source.test | |
contexts: | |
main: | |
#Only Alpha and Beta can be base level | |
- match: (alpha)\s+=\s+({) | |
captures: | |
1: alpha | |
2: brace.open | |
push: alpha_block | |
- match: (beta)\s+=\s+({) | |
captures: | |
1: beta | |
2: brace.open | |
push: beta_block | |
#Alpha can only contain Beta | |
alpha_block: | |
- meta_scope: alpha.block | |
- match: 'beta' | |
push: beta_block | |
- include: end | |
- match: '\w' | |
push: invalid | |
#Beta can contain Alpha or Charlie | |
beta_block: | |
- meta_scope: beta.block | |
- match: (alpha)\s+=\s+({) | |
captures: | |
1: alpha | |
2: brace.open | |
push: alpha_block | |
- match: (charlie)\s+=\s+({) | |
captures: | |
1: charlie | |
2: brace.open | |
push: charlie_block | |
- include: end | |
- match: '\w' | |
push: invalid | |
#Charlie can only contain Beta | |
charlie_block: | |
- meta_scope: charlie.block | |
- match: (beta)\s+=\s+({) | |
captures: | |
1: beta | |
2: brace.open | |
push: beta_block | |
- include: end | |
- match: '\w' | |
push: invalid | |
end: | |
- match: '}' | |
pop: true | |
invalid: | |
- meta_scope: invalid | |
- include: end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alpha = { | |
beta = { | |
charlie = { | |
} | |
} | |
} | |
alpha = { | |
beta = { | |
alpha = { | |
beta = { | |
alpha = { | |
beta = { | |
charlie = { | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
alpha = { | |
alpha = { | |
} | |
} | |
alpha = { | |
charlie = { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>Testing Theme</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> | |
<!-- General editor color settings --> | |
<dict> | |
<key>background</key> | |
<string>#000000</string> | |
<key>caret</key> | |
<string>#A7A7A7</string> | |
<key>foreground</key> | |
<string>#F8F8F8</string> | |
<key>invisibles</key> | |
<string>#CAE2FB3D</string> | |
<key>lineHighlight</key> | |
<string>#FFFFFF0D</string> | |
<key>selection</key> | |
<string>#DDF0FF33</string> | |
</dict> | |
</dict> | |
<!-- Alpha --> | |
<dict> | |
<key>name</key> | |
<string>Alphas</string> | |
<key>scope</key> | |
<string>alpha</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#b732ff</string> | |
</dict> | |
</dict> | |
<!-- Beta --> | |
<dict> | |
<key>name</key> | |
<string>Betas</string> | |
<key>scope</key> | |
<string>beta</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#4a32ff</string> | |
</dict> | |
</dict> | |
<!-- Charlie --> | |
<dict> | |
<key>name</key> | |
<string>Charlies</string> | |
<key>scope</key> | |
<string>charlie</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#77f231</string> | |
</dict> | |
</dict> | |
<dict> | |
<key>name</key> | |
<string>Invalids</string> | |
<key>scope</key> | |
<string>invalid</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#ff0000</string> | |
</dict> | |
</dict> | |
</array> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment