Skip to content

Commit

Permalink
Remove variable.other
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmarinovic committed Oct 16, 2016
1 parent 51a2ff0 commit b3033b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions grammars/elixir.cson
Original file line number Diff line number Diff line change
Expand Up @@ -1465,11 +1465,11 @@
}
{
'match': '\\b_([\\w]+[?!]?)'
'name': 'variable.other.unused.comment.elixir'
'name': 'unused.comment.elixir'
}
{
'match': '\\b_\\b'
'name': 'variable.other.wildcard.comment.elixir'
'name': 'wildcard.comment.elixir'
}
{
'comment': """
Expand Down
8 changes: 4 additions & 4 deletions spec/elixir-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ describe "Elixir grammar", ->

it "tokenizes underscore variables as comments", ->
{tokens} = grammar.tokenizeLine('_some_variable?')
expect(tokens[0]).toEqual value: '_some_variable?', scopes: ['source.elixir', 'variable.other.unused.comment.elixir']
expect(tokens[0]).toEqual value: '_some_variable?', scopes: ['source.elixir', 'unused.comment.elixir']

{tokens} = grammar.tokenizeLine('some_variable')
expect(tokens[0]).toEqual value: 'some_variable', scopes: ['source.elixir']

it "tokenizes underscore as wildcard variable", ->
{tokens} = grammar.tokenizeLine('this _ other_thing')
expect(tokens[0]).not.toEqual value: 'this ', scopes: ['source.elixir', 'variable.other.wildcard.comment.elixir']
expect(tokens[1]).toEqual value: '_', scopes: ['source.elixir', 'variable.other.wildcard.comment.elixir']
expect(tokens[2]).not.toEqual value: ' other_thing', scopes: ['source.elixir', 'variable.other.wildcard.comment.elixir']
expect(tokens[0]).not.toEqual value: 'this ', scopes: ['source.elixir', 'wildcard.comment.elixir']
expect(tokens[1]).toEqual value: '_', scopes: ['source.elixir', 'wildcard.comment.elixir']
expect(tokens[2]).not.toEqual value: ' other_thing', scopes: ['source.elixir', 'wildcard.comment.elixir']

{tokens} = grammar.tokenizeLine('some_variable')
expect(tokens[0]).toEqual value: 'some_variable', scopes: ['source.elixir']
Expand Down

0 comments on commit b3033b6

Please sign in to comment.