From 43d4aa05901e45a626a59917b352da0eb11f1742 Mon Sep 17 00:00:00 2001 From: chbk Date: Fri, 16 Mar 2018 17:03:01 +0100 Subject: [PATCH] Change comma scope name --- grammars/ruby.cson | 6 +++--- spec/ruby-spec.coffee | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/grammars/ruby.cson b/grammars/ruby.cson index ff438f3..f6740ba 100644 --- a/grammars/ruby.cson +++ b/grammars/ruby.cson @@ -317,7 +317,7 @@ } { 'match': ',' - 'name': 'punctuation.separator.object.ruby' + 'name': 'punctuation.separator.delimiter.ruby' } ] } @@ -376,7 +376,7 @@ } { 'match': ',' - 'name': 'punctuation.separator.object.ruby' + 'name': 'punctuation.separator.delimiter.ruby' } ] } @@ -2308,7 +2308,7 @@ } { 'match': ',' - 'name': 'punctuation.separator.object.ruby' + 'name': 'punctuation.separator.delimiter.ruby' } { 'match': '(::)(?=\\s*[A-Z])' diff --git a/spec/ruby-spec.coffee b/spec/ruby-spec.coffee index 5ca7b49..37b6b53 100644 --- a/spec/ruby-spec.coffee +++ b/spec/ruby-spec.coffee @@ -226,7 +226,7 @@ describe "TextMate Ruby grammar", -> expect(tokens[8]).toEqual value: '\'', scopes: ['source.ruby', 'string.quoted.single.ruby', 'punctuation.definition.string.begin.ruby'] expect(tokens[9]).toEqual value: 'one', scopes: ['source.ruby', 'string.quoted.single.ruby'] expect(tokens[10]).toEqual value: '\'', scopes: ['source.ruby', 'string.quoted.single.ruby', 'punctuation.definition.string.end.ruby'] - expect(tokens[11]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[11]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.delimiter.ruby'] expect(tokens[13]).toEqual value: '2', scopes: ['source.ruby', 'constant.numeric.ruby'] expect(tokens[15]).toEqual value: '=>', scopes: ['source.ruby', 'punctuation.separator.key-value.ruby'] expect(tokens[17]).toEqual value: '\'', scopes: ['source.ruby', 'string.quoted.single.ruby', 'punctuation.definition.string.begin.ruby'] @@ -238,7 +238,7 @@ describe "TextMate Ruby grammar", -> expect(tokens[0]).toEqual value: 'method', scopes: ['source.ruby'] expect(tokens[1]).toEqual value: '(', scopes: ['source.ruby', 'punctuation.section.function.ruby'] expect(tokens[2]).toEqual value: 'a', scopes: ['source.ruby'] - expect(tokens[3]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[3]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.delimiter.ruby'] expect(tokens[4]).toEqual value: 'b', scopes: ['source.ruby'] expect(tokens[5]).toEqual value: ')', scopes: ['source.ruby', 'punctuation.section.function.ruby'] @@ -377,7 +377,7 @@ describe "TextMate Ruby grammar", -> expect(tokens[1]).toEqual value: '/', scopes: ['source.ruby', 'string.regexp.interpolated.ruby', 'punctuation.section.regexp.ruby'] expect(tokens[2]).toEqual value: 'test', scopes: ['source.ruby', 'string.regexp.interpolated.ruby'] expect(tokens[3]).toEqual value: '/', scopes: ['source.ruby', 'string.regexp.interpolated.ruby', 'punctuation.section.regexp.ruby'] - expect(tokens[4]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[4]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.delimiter.ruby'] {tokens} = grammar.tokenizeLine('[/test/]') @@ -831,13 +831,13 @@ describe "TextMate Ruby grammar", -> expect(tokens[8]).toEqual value: '(', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] expect(tokens[9]).toEqual value: '2', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.numeric.ruby'] expect(tokens[10]).toEqual value: ')', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] - expect(tokens[11]).toEqual value: ',', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[11]).toEqual value: ',', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.separator.delimiter.ruby'] expect(tokens[13]).toEqual value: 'green', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.other.symbol.hashkey.parameter.function.ruby'] expect(tokens[16]).toEqual value: 'rand', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'support.function.kernel.ruby'] expect(tokens[17]).toEqual value: '(', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] expect(tokens[18]).toEqual value: '3', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.numeric.ruby'] expect(tokens[19]).toEqual value: ')', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] - expect(tokens[20]).toEqual value: ',', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[20]).toEqual value: ',', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.separator.delimiter.ruby'] expect(tokens[22]).toEqual value: 'blue', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.other.symbol.hashkey.parameter.function.ruby'] expect(tokens[25]).toEqual value: 'rand', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'support.function.kernel.ruby'] expect(tokens[26]).toEqual value: '(', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] @@ -853,13 +853,13 @@ describe "TextMate Ruby grammar", -> expect(tokens[8]).toEqual value: '(', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] expect(tokens[9]).toEqual value: '2', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.numeric.ruby'] expect(tokens[10]).toEqual value: ')', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] - expect(tokens[11]).toEqual value: ',', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[11]).toEqual value: ',', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.separator.delimiter.ruby'] expect(tokens[13]).toEqual value: 'green', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.other.symbol.hashkey.parameter.function.ruby'] expect(tokens[16]).toEqual value: 'rand', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'support.function.kernel.ruby'] expect(tokens[17]).toEqual value: '(', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] expect(tokens[18]).toEqual value: '3', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.numeric.ruby'] expect(tokens[19]).toEqual value: ')', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] - expect(tokens[20]).toEqual value: ',', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[20]).toEqual value: ',', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.separator.delimiter.ruby'] expect(tokens[22]).toEqual value: 'blue', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.other.symbol.hashkey.parameter.function.ruby'] expect(tokens[25]).toEqual value: 'rand', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'support.function.kernel.ruby'] expect(tokens[26]).toEqual value: '(', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'punctuation.section.function.ruby'] @@ -888,11 +888,11 @@ describe "TextMate Ruby grammar", -> expect(tokens[10]).toEqual value: '||', scopes: ['source.ruby', 'keyword.operator.logical.ruby'] expect(tokens[12]).toEqual value: 'b', scopes: ['source.ruby', 'variable.other.block.ruby'] expect(tokens[13]).toEqual value: ')', scopes: ['source.ruby', 'punctuation.section.function.ruby'] - expect(tokens[14]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[14]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.delimiter.ruby'] expect(tokens[16]).toEqual value: 'hash', scopes: ['source.ruby', 'variable.other.block.ruby'] expect(tokens[18]).toEqual value: '=', scopes: ['source.ruby', 'keyword.operator.assignment.ruby'] expect(tokens[20]).toEqual value: 'config', scopes: ['source.ruby', 'variable.other.block.ruby'] - expect(tokens[21]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.object.ruby'] + expect(tokens[21]).toEqual value: ',', scopes: ['source.ruby', 'punctuation.separator.delimiter.ruby'] expect(tokens[23]).toEqual value: 'create', scopes: ['source.ruby', 'constant.other.symbol.hashkey.ruby'] expect(tokens[24]).toEqual value: ':', scopes: ['source.ruby', 'constant.other.symbol.hashkey.ruby', 'punctuation.definition.constant.hashkey.ruby'] expect(tokens[26]).toEqual value: 'false', scopes: ['source.ruby', 'constant.language.boolean.ruby']