Skip to content

Commit

Permalink
Merge pull request #2717 from meatballhat/supercollider-grammar
Browse files Browse the repository at this point in the history
Add SuperCollider grammar
  • Loading branch information
arfon committed Nov 10, 2015
2 parents 5765f1f + d7b2826 commit 34abe5b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
[submodule "vendor/grammars/language-shellscript"]
path = vendor/grammars/language-shellscript
url = https://github.com/atom/language-shellscript
[submodule "vendor/grammars/language-supercollider"]
path = vendor/grammars/language-supercollider
url = https://github.com/supercollider/language-supercollider
[submodule "vendor/grammars/language-yaml"]
path = vendor/grammars/language-yaml
url = https://github.com/atom/language-yaml
Expand Down
2 changes: 2 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ vendor/grammars/language-python:
vendor/grammars/language-shellscript:
- source.shell
- text.shell-session
vendor/grammars/language-supercollider:
- source.supercollider
vendor/grammars/language-xbase:
- source.harbour
vendor/grammars/language-yaml:
Expand Down
7 changes: 5 additions & 2 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3336,9 +3336,12 @@ SuperCollider:
type: programming
color: "#46390b"
extensions:
- .scd
- .sc
tm_scope: none
- .scd
interpreters:
- sclang
- scsynth
tm_scope: source.supercollider
ace_mode: text

Swift:
Expand Down
8 changes: 7 additions & 1 deletion test/test_language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_find_by_alias
assert_equal Language['Shell'], Language.find_by_alias('sh')
assert_equal Language['Shell'], Language.find_by_alias('shell')
assert_equal Language['Shell'], Language.find_by_alias('zsh')
assert_equal Language['SuperCollider'], Language.find_by_alias('supercollider')
assert_equal Language['TeX'], Language.find_by_alias('tex')
assert_equal Language['TypeScript'], Language.find_by_alias('ts')
assert_equal Language['VimL'], Language.find_by_alias('vim')
Expand Down Expand Up @@ -119,6 +120,7 @@ def test_search_term
assert_equal 'vim', Language['VimL'].search_term
assert_equal 'jsp', Language['Java Server Pages'].search_term
assert_equal 'rst', Language['reStructuredText'].search_term
assert_equal 'supercollider', Language['SuperCollider'].search_term
end

def test_popular
Expand All @@ -138,6 +140,7 @@ def test_programming
assert_equal :programming, Language['Ruby'].type
assert_equal :programming, Language['TypeScript'].type
assert_equal :programming, Language['Makefile'].type
assert_equal :programming, Language['SuperCollider'].type
end

def test_markup
Expand Down Expand Up @@ -227,7 +230,8 @@ def test_find_by_interpreter
"python" => "Python",
"python2" => "Python",
"python3" => "Python",
"sbcl" => "Common Lisp"
"sbcl" => "Common Lisp",
"sclang" => "SuperCollider"
}.each do |interpreter, language|
assert_equal [Language[language]], Language.find_by_interpreter(interpreter)
end
Expand Down Expand Up @@ -339,6 +343,7 @@ def test_extensions
assert Language['Perl'].extensions.include?('.pl')
assert Language['Python'].extensions.include?('.py')
assert Language['Ruby'].extensions.include?('.rb')
assert Language['SuperCollider'].extensions.include?('.scd')
end

def test_primary_extension
Expand All @@ -349,6 +354,7 @@ def test_primary_extension
assert_equal '.coffee', Language['CoffeeScript'].primary_extension
assert_equal '.t', Language['Turing'].primary_extension
assert_equal '.ts', Language['TypeScript'].primary_extension
assert_equal '.sc', Language['SuperCollider'].primary_extension
end

def test_eql
Expand Down
1 change: 1 addition & 0 deletions vendor/grammars/language-supercollider
Submodule language-supercollider added at 2b1da2

0 comments on commit 34abe5b

Please sign in to comment.