From 949e26cc06e5bcf6f469ebcfe933399d46387905 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Thu, 8 Jun 2017 22:52:08 -0400 Subject: [PATCH] Remove meta scope that doesn't exist in any other language We don't have anything called "select scope" anyway. --- grammars/php.cson | 3 --- spec/php-spec.coffee | 10 +++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/grammars/php.cson b/grammars/php.cson index ef470ff1..1083e706 100644 --- a/grammars/php.cson +++ b/grammars/php.cson @@ -2239,8 +2239,6 @@ 'beginCaptures': '0': 'name': 'punctuation.definition.string.begin.php' - # This contentName is just to allow the usage of "select scope" to select the string contents first, then the string with quotes - 'contentName': 'meta.string-contents.quoted.double.php' 'end': '"' 'endCaptures': '0': @@ -2256,7 +2254,6 @@ 'beginCaptures': '0': 'name': 'punctuation.definition.string.begin.php' - 'contentName': 'meta.string-contents.quoted.single.php' 'end': '\'' 'endCaptures': '0': diff --git a/spec/php-spec.coffee b/spec/php-spec.coffee index a84963ea..c1360d14 100644 --- a/spec/php-spec.coffee +++ b/spec/php-spec.coffee @@ -297,7 +297,7 @@ describe 'PHP grammar', -> expect(tokens[1][14]).toEqual value: '2', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'meta.function.php', 'meta.function.arguments.php', 'meta.function.argument.array.php', 'constant.numeric.php'] expect(tokens[1][15]).toEqual value: ',', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'meta.function.php', 'meta.function.arguments.php', 'meta.function.argument.array.php'] expect(tokens[1][16]).toEqual value: '\'', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'meta.function.php', 'meta.function.arguments.php', 'meta.function.argument.array.php', 'string.quoted.single.php', 'punctuation.definition.string.begin.php'] - expect(tokens[1][17]).toEqual value: '3', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'meta.function.php', 'meta.function.arguments.php', 'meta.function.argument.array.php', 'string.quoted.single.php', 'meta.string-contents.quoted.single.php'] + expect(tokens[1][17]).toEqual value: '3', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'meta.function.php', 'meta.function.arguments.php', 'meta.function.argument.array.php', 'string.quoted.single.php'] expect(tokens[1][18]).toEqual value: '\'', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'meta.function.php', 'meta.function.arguments.php', 'meta.function.argument.array.php', 'string.quoted.single.php', 'punctuation.definition.string.end.php'] expect(tokens[1][19]).toEqual value: ']', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'meta.function.php', 'meta.function.arguments.php', 'meta.function.argument.array.php', 'punctuation.section.array.end.php'] @@ -396,9 +396,9 @@ describe 'PHP grammar', -> tokens = grammar.tokenizeLines " expect(tokens[1][0]).toEqual value: 'echo', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'support.function.construct.output.php'] expect(tokens[1][1]).toEqual value: ' ', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php'] expect(tokens[1][2]).toEqual value: '\'', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'string.quoted.single.php', 'punctuation.definition.string.begin.php'] - expect(tokens[1][3]).toEqual value: 'test', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'string.quoted.single.php', 'meta.string-contents.quoted.single.php'] + expect(tokens[1][3]).toEqual value: 'test', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'string.quoted.single.php'] expect(tokens[1][4]).toEqual value: '\'', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'string.quoted.single.php', 'punctuation.definition.string.end.php'] expect(tokens[1][5]).toEqual value: ';', scopes: ['text.html.php', 'meta.embedded.block.php', 'source.php', 'punctuation.terminator.expression.php']