diff --git a/grammars/MagicPython.cson b/grammars/MagicPython.cson index 526b2873..fd0f567d 100644 --- a/grammars/MagicPython.cson +++ b/grammars/MagicPython.cson @@ -1473,7 +1473,7 @@ repository: begin: ''' (?x) ^\\s* - (@) \\s* (?=[[:alpha:]_]\\w*) + ((@)) \\s* (?=[[:alpha:]_]\\w*) ''' end: ''' @@ -1487,6 +1487,8 @@ repository: beginCaptures: "1": name: "entity.name.function.decorator.python" + "2": + name: "punctuation.definition.decorator.python" endCaptures: "1": name: "punctuation.definition.arguments.end.python" @@ -1512,9 +1514,12 @@ repository: name: "entity.name.function.decorator.python" match: ''' (?x) - ([[:alpha:]_]\\w*) | \\. + ([[:alpha:]_]\\w*) | (\\.) ''' + captures: + "2": + name: "punctuation.separator.period.python" } { include: "#line-continuation" diff --git a/grammars/MagicPython.tmLanguage b/grammars/MagicPython.tmLanguage index ae03ed0e..82707d8a 100644 --- a/grammars/MagicPython.tmLanguage +++ b/grammars/MagicPython.tmLanguage @@ -2314,7 +2314,7 @@ begin (?x) ^\s* - (@) \s* (?=[[:alpha:]_]\w*) + ((@)) \s* (?=[[:alpha:]_]\w*) end (?x) @@ -2330,6 +2330,11 @@ name entity.name.function.decorator.python + 2 + + name + punctuation.definition.decorator.python + endCaptures @@ -2373,8 +2378,16 @@ entity.name.function.decorator.python match (?x) - ([[:alpha:]_]\w*) | \. + ([[:alpha:]_]\w*) | (\.) + captures + + 2 + + name + punctuation.separator.period.python + + include diff --git a/grammars/src/MagicPython.syntax.yaml b/grammars/src/MagicPython.syntax.yaml index 43009579..4e4c5d2a 100644 --- a/grammars/src/MagicPython.syntax.yaml +++ b/grammars/src/MagicPython.syntax.yaml @@ -1123,7 +1123,7 @@ repository: begin: | (?x) ^\s* - (@) \s* (?=[[:alpha:]_]\w*) + ((@)) \s* (?=[[:alpha:]_]\w*) end: | (?x) ( \) ) @@ -1132,6 +1132,7 @@ repository: | (?=\n|\#) beginCaptures: '1': {name: entity.name.function.decorator.python} + '2': {name: punctuation.definition.decorator.python} endCaptures: '1': {name: punctuation.definition.arguments.end.python} '2': {name: invalid.illegal.decorator.python} @@ -1147,7 +1148,9 @@ repository: - name: entity.name.function.decorator.python match: | (?x) - ([[:alpha:]_]\w*) | \. + ([[:alpha:]_]\w*) | (\.) + captures: + '2': {name: punctuation.separator.period.python} - include: '#line-continuation' - name: invalid.illegal.decorator.python match: | diff --git a/misc/scopes b/misc/scopes index 128a673c..f36758cc 100644 --- a/misc/scopes +++ b/misc/scopes @@ -82,6 +82,7 @@ punctuation.comment.end.regexp punctuation.definition.arguments.begin.python punctuation.definition.arguments.end.python punctuation.definition.comment.python +punctuation.definition.decorator.python punctuation.definition.dict.begin.python punctuation.definition.dict.end.python punctuation.definition.inheritance.begin.python diff --git a/test/atom-spec/python-spec.js b/test/atom-spec/python-spec.js index c0d65218..31a5ac34 100644 --- a/test/atom-spec/python-spec.js +++ b/test/atom-spec/python-spec.js @@ -1336,7 +1336,7 @@ describe("Grammar Tests", function() { expect(tokens[1][0].value).toBe(" "); expect(tokens[1][0].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[1][1].value).toBe("@"); - expect(tokens[1][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[1][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[1][2].value).toBe("classmethod"); expect(tokens[1][2].scopes).toEqual(["source.python","meta.function.decorator.python","support.type.python"]); expect(tokens[2][0].value).toBe(" "); @@ -1655,7 +1655,7 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@dec\n# Bar.name=... is not legal, but the test is for highlighter not breaking badly\nclass Spam(Foo.Bar, Bar.name={'very': 'odd'}):\n pass") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe("dec"); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[1][0].value).toBe("#"); @@ -4868,7 +4868,7 @@ describe("Grammar Tests", function() { expect(tokens[1][0].value).toBe(" "); expect(tokens[1][0].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[1][1].value).toBe("@"); - expect(tokens[1][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[1][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[1][2].value).toBe("asd"); expect(tokens[1][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[2][0].value).toBe(" "); @@ -7674,7 +7674,7 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@foo\nasync def foo():\n a = 1\n async for a, b, c in b:\n async with b as d, c:\n await func(a, b=1)") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe("foo"); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[1][0].value).toBe("async"); @@ -8775,7 +8775,7 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@some_decorator # with comment\n@some.class.decorator\n@some_decorator(1)\n@some.decorator (1, 3)\n@some_decorator(a=2, b={'q': 42}, **kwargs)\n@classmethod\ndef decorated(a): pass") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe("some_decorator"); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[0][2].value).toBe(" "); @@ -8785,19 +8785,19 @@ describe("Grammar Tests", function() { expect(tokens[0][4].value).toBe(" with comment"); expect(tokens[0][4].scopes).toEqual(["source.python","comment.line.number-sign.python"]); expect(tokens[1][0].value).toBe("@"); - expect(tokens[1][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[1][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[1][1].value).toBe("some"); expect(tokens[1][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[1][2].value).toBe("."); - expect(tokens[1][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[1][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[1][3].value).toBe("class"); expect(tokens[1][3].scopes).toEqual(["source.python","meta.function.decorator.python","keyword.control.flow.python"]); expect(tokens[1][4].value).toBe("."); - expect(tokens[1][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[1][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[1][5].value).toBe("decorator"); expect(tokens[1][5].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[2][0].value).toBe("@"); - expect(tokens[2][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[2][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[2][1].value).toBe("some_decorator"); expect(tokens[2][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[2][2].value).toBe("("); @@ -8807,11 +8807,11 @@ describe("Grammar Tests", function() { expect(tokens[2][4].value).toBe(")"); expect(tokens[2][4].scopes).toEqual(["source.python","meta.function.decorator.python","punctuation.definition.arguments.end.python"]); expect(tokens[3][0].value).toBe("@"); - expect(tokens[3][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[3][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[3][1].value).toBe("some"); expect(tokens[3][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[3][2].value).toBe("."); - expect(tokens[3][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[3][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[3][3].value).toBe("decorator"); expect(tokens[3][3].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[3][4].value).toBe(" "); @@ -8829,7 +8829,7 @@ describe("Grammar Tests", function() { expect(tokens[3][10].value).toBe(")"); expect(tokens[3][10].scopes).toEqual(["source.python","meta.function.decorator.python","punctuation.definition.arguments.end.python"]); expect(tokens[4][0].value).toBe("@"); - expect(tokens[4][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[4][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[4][1].value).toBe("some_decorator"); expect(tokens[4][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[4][2].value).toBe("("); @@ -8875,7 +8875,7 @@ describe("Grammar Tests", function() { expect(tokens[4][22].value).toBe(")"); expect(tokens[4][22].scopes).toEqual(["source.python","meta.function.decorator.python","punctuation.definition.arguments.end.python"]); expect(tokens[5][0].value).toBe("@"); - expect(tokens[5][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[5][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[5][1].value).toBe("classmethod"); expect(tokens[5][1].scopes).toEqual(["source.python","meta.function.decorator.python","support.type.python"]); expect(tokens[6][0].value).toBe("def"); @@ -8902,7 +8902,7 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@ f . bar . a . b\ndef foo(): pass") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe(" "); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][2].value).toBe("f"); @@ -8910,7 +8910,7 @@ describe("Grammar Tests", function() { expect(tokens[0][3].value).toBe(" "); expect(tokens[0][3].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][4].value).toBe("."); - expect(tokens[0][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][5].value).toBe(" "); expect(tokens[0][5].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][6].value).toBe("bar"); @@ -8918,7 +8918,7 @@ describe("Grammar Tests", function() { expect(tokens[0][7].value).toBe(" "); expect(tokens[0][7].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][8].value).toBe("."); - expect(tokens[0][8].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][8].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][9].value).toBe(" "); expect(tokens[0][9].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][10].value).toBe("a"); @@ -8926,7 +8926,7 @@ describe("Grammar Tests", function() { expect(tokens[0][11].value).toBe(" "); expect(tokens[0][11].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][12].value).toBe("."); - expect(tokens[0][12].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][12].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][13].value).toBe(" "); expect(tokens[0][13].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][14].value).toBe("b"); @@ -8953,7 +8953,7 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@ f . bar (baz = 1)\ndef foo(): pass") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe(" "); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][2].value).toBe("f"); @@ -8961,7 +8961,7 @@ describe("Grammar Tests", function() { expect(tokens[0][3].value).toBe(" "); expect(tokens[0][3].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][4].value).toBe("."); - expect(tokens[0][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][5].value).toBe(" "); expect(tokens[0][5].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][6].value).toBe("bar"); @@ -9004,23 +9004,23 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@a.b.c.None.z\ndef foo(): pass") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe("a"); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[0][2].value).toBe("."); - expect(tokens[0][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][3].value).toBe("b"); expect(tokens[0][3].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[0][4].value).toBe("."); - expect(tokens[0][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][5].value).toBe("c"); expect(tokens[0][5].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[0][6].value).toBe("."); - expect(tokens[0][6].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][6].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][7].value).toBe("None"); expect(tokens[0][7].scopes).toEqual(["source.python","meta.function.decorator.python","keyword.illegal.name.python"]); expect(tokens[0][8].value).toBe("."); - expect(tokens[0][8].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][8].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][9].value).toBe("z"); expect(tokens[0][9].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[1][0].value).toBe("def"); @@ -9045,11 +9045,11 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@a. \\\n b . \\\n c.None.z \\\n baz(q=1)\n@foo.ok\ndef foo(): pass") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe("a"); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[0][2].value).toBe("."); - expect(tokens[0][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][3].value).toBe(" "); expect(tokens[0][3].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][4].value).toBe("\\"); @@ -9063,7 +9063,7 @@ describe("Grammar Tests", function() { expect(tokens[1][2].value).toBe(" "); expect(tokens[1][2].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[1][3].value).toBe("."); - expect(tokens[1][3].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[1][3].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[1][4].value).toBe(" "); expect(tokens[1][4].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[1][5].value).toBe("\\"); @@ -9075,11 +9075,11 @@ describe("Grammar Tests", function() { expect(tokens[2][1].value).toBe("c"); expect(tokens[2][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[2][2].value).toBe("."); - expect(tokens[2][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[2][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[2][3].value).toBe("None"); expect(tokens[2][3].scopes).toEqual(["source.python","meta.function.decorator.python","keyword.illegal.name.python"]); expect(tokens[2][4].value).toBe("."); - expect(tokens[2][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[2][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[2][5].value).toBe("z"); expect(tokens[2][5].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[2][6].value).toBe(" "); @@ -9103,11 +9103,11 @@ describe("Grammar Tests", function() { expect(tokens[3][6].value).toBe(")"); expect(tokens[3][6].scopes).toEqual(["source.python","meta.function.decorator.python","punctuation.definition.arguments.end.python"]); expect(tokens[4][0].value).toBe("@"); - expect(tokens[4][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[4][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[4][1].value).toBe("foo"); expect(tokens[4][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[4][2].value).toBe("."); - expect(tokens[4][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[4][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[4][3].value).toBe("ok"); expect(tokens[4][3].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[5][0].value).toBe("def"); @@ -9132,11 +9132,11 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@a. b . \\\n c.None.z(foo=BAR). \\\n baz[1:2]\n@foo.class.bar[]\n@foo.ok '''\ndef foo(): pass") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe("a"); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[0][2].value).toBe("."); - expect(tokens[0][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][3].value).toBe(" "); expect(tokens[0][3].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][4].value).toBe("b"); @@ -9144,7 +9144,7 @@ describe("Grammar Tests", function() { expect(tokens[0][5].value).toBe(" "); expect(tokens[0][5].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][6].value).toBe("."); - expect(tokens[0][6].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][6].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[0][7].value).toBe(" "); expect(tokens[0][7].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[0][8].value).toBe("\\"); @@ -9156,11 +9156,11 @@ describe("Grammar Tests", function() { expect(tokens[1][1].value).toBe("c"); expect(tokens[1][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[1][2].value).toBe("."); - expect(tokens[1][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[1][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[1][3].value).toBe("None"); expect(tokens[1][3].scopes).toEqual(["source.python","meta.function.decorator.python","keyword.illegal.name.python"]); expect(tokens[1][4].value).toBe("."); - expect(tokens[1][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[1][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[1][5].value).toBe("z"); expect(tokens[1][5].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[1][6].value).toBe("("); @@ -9190,25 +9190,25 @@ describe("Grammar Tests", function() { expect(tokens[2][6].value).toBe("]"); expect(tokens[2][6].scopes).toEqual(["source.python","meta.item-access.python","punctuation.definition.arguments.end.python"]); expect(tokens[3][0].value).toBe("@"); - expect(tokens[3][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[3][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[3][1].value).toBe("foo"); expect(tokens[3][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[3][2].value).toBe("."); - expect(tokens[3][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[3][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[3][3].value).toBe("class"); expect(tokens[3][3].scopes).toEqual(["source.python","meta.function.decorator.python","keyword.control.flow.python"]); expect(tokens[3][4].value).toBe("."); - expect(tokens[3][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[3][4].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[3][5].value).toBe("bar"); expect(tokens[3][5].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[3][6].value).toBe("[]"); expect(tokens[3][6].scopes).toEqual(["source.python","meta.function.decorator.python","invalid.illegal.decorator.python","invalid.illegal.decorator.python"]); expect(tokens[4][0].value).toBe("@"); - expect(tokens[4][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[4][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[4][1].value).toBe("foo"); expect(tokens[4][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[4][2].value).toBe("."); - expect(tokens[4][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[4][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.separator.period.python"]); expect(tokens[4][3].value).toBe("ok"); expect(tokens[4][3].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[4][4].value).toBe(" "); @@ -9245,13 +9245,13 @@ describe("Grammar Tests", function() { expect(tokens[1][1].value).toBe(" DO NOT DELETE TRAILING WHITESTAPCE IN THIS FILE"); expect(tokens[1][1].scopes).toEqual(["source.python","comment.line.number-sign.python"]); expect(tokens[2][0].value).toBe("@"); - expect(tokens[2][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[2][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[2][1].value).toBe("foo"); expect(tokens[2][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[2][2].value).toBe(" "); expect(tokens[2][2].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[3][0].value).toBe("@"); - expect(tokens[3][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[3][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[3][1].value).toBe("foo"); expect(tokens[3][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[3][2].value).toBe("("); @@ -9261,13 +9261,13 @@ describe("Grammar Tests", function() { expect(tokens[3][4].value).toBe(" "); expect(tokens[3][4].scopes).toEqual(["source.python"]); expect(tokens[4][0].value).toBe("@"); - expect(tokens[4][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[4][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[4][1].value).toBe("bar"); expect(tokens[4][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[4][2].value).toBe("\t"); expect(tokens[4][2].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[5][0].value).toBe("@"); - expect(tokens[5][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[5][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[5][1].value).toBe("bar"); expect(tokens[5][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[5][2].value).toBe("("); @@ -9277,7 +9277,7 @@ describe("Grammar Tests", function() { expect(tokens[5][4].value).toBe("\t"); expect(tokens[5][4].scopes).toEqual(["source.python"]); expect(tokens[6][0].value).toBe("@"); - expect(tokens[6][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[6][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[6][1].value).toBe("bar"); expect(tokens[6][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[6][2].value).toBe("("); @@ -9293,7 +9293,7 @@ describe("Grammar Tests", function() { expect(tokens[6][7].value).toBe(" legal"); expect(tokens[6][7].scopes).toEqual(["source.python","comment.line.number-sign.python"]); expect(tokens[7][0].value).toBe("@"); - expect(tokens[7][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[7][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[7][1].value).toBe("bar"); expect(tokens[7][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[7][2].value).toBe("("); @@ -9326,7 +9326,7 @@ describe("Grammar Tests", function() { function() { tokens = grammar.tokenizeLines("@deco().abc # SyntaxError: invalid syntax\ndef foo(): pass") expect(tokens[0][0].value).toBe("@"); - expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[0][0].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[0][1].value).toBe("deco"); expect(tokens[0][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[0][2].value).toBe("("); @@ -14128,7 +14128,7 @@ describe("Grammar Tests", function() { expect(tokens[2][0].value).toBe(" "); expect(tokens[2][0].scopes).toEqual(["source.python","meta.function.decorator.python"]); expect(tokens[2][1].value).toBe("@"); - expect(tokens[2][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); + expect(tokens[2][1].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python","punctuation.definition.decorator.python"]); expect(tokens[2][2].value).toBe("æaœ"); expect(tokens[2][2].scopes).toEqual(["source.python","meta.function.decorator.python","entity.name.function.decorator.python"]); expect(tokens[3][0].value).toBe(" "); diff --git a/test/classes/class12.py b/test/classes/class12.py index e8b69161..e0e7fb7d 100644 --- a/test/classes/class12.py +++ b/test/classes/class12.py @@ -17,7 +17,7 @@ class : meta.class.python, source.python, storage.type.class.python F : entity.name.type.class.python, meta.class.python, source.python : : meta.class.python, punctuation.section.class.begin.python, source.python : meta.function.decorator.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python classmethod : meta.function.decorator.python, source.python, support.type.python : meta.function.python, source.python def : meta.function.python, source.python, storage.type.function.python diff --git a/test/classes/class2.py b/test/classes/class2.py index 536f9258..32b5a2dc 100644 --- a/test/classes/class2.py +++ b/test/classes/class2.py @@ -5,7 +5,7 @@ class Spam(Foo.Bar, Bar.name={'very': 'odd'}): -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python dec : entity.name.function.decorator.python, meta.function.decorator.python, source.python # : comment.line.number-sign.python, punctuation.definition.comment.python, source.python Bar.name=... is not legal, but the test is for highlighter not breaking badly : comment.line.number-sign.python, source.python diff --git a/test/docstrings/regr1.py b/test/docstrings/regr1.py index 7d3d5dcc..8b5a65e9 100644 --- a/test/docstrings/regr1.py +++ b/test/docstrings/regr1.py @@ -8,7 +8,7 @@ def foo(): # : comment.line.number-sign.python, punctuation.definition.comment.python, source.python : : comment.line.number-sign.python, source.python : meta.function.decorator.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python asd : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.python, source.python def : meta.function.python, source.python, storage.type.function.python diff --git a/test/functions/async1.py b/test/functions/async1.py index cb6fd70e..d6a5546b 100644 --- a/test/functions/async1.py +++ b/test/functions/async1.py @@ -7,7 +7,7 @@ async def foo(): -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python foo : entity.name.function.decorator.python, meta.function.decorator.python, source.python async : meta.function.python, source.python, storage.type.function.async.python : meta.function.python, source.python diff --git a/test/functions/decorators1.py b/test/functions/decorators1.py index 6fc61aea..bf03fad0 100644 --- a/test/functions/decorators1.py +++ b/test/functions/decorators1.py @@ -8,25 +8,25 @@ def decorated(a): pass -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python some_decorator : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python # : comment.line.number-sign.python, punctuation.definition.comment.python, source.python with comment : comment.line.number-sign.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python some : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python class : keyword.control.flow.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python decorator : entity.name.function.decorator.python, meta.function.decorator.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python some_decorator : entity.name.function.decorator.python, meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python 1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function.decorator.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python some : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python decorator : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python @@ -35,7 +35,7 @@ class : keyword.control.flow.python, meta.function.decorator.python, sou : meta.function-call.arguments.python, meta.function.decorator.python, source.python 3 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function.decorator.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python some_decorator : entity.name.function.decorator.python, meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python a : meta.function-call.arguments.python, meta.function.decorator.python, source.python, variable.parameter.function-call.python @@ -58,7 +58,7 @@ class : keyword.control.flow.python, meta.function.decorator.python, sou ** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function.decorator.python, source.python kwargs : meta.function-call.arguments.python, meta.function.decorator.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python classmethod : meta.function.decorator.python, source.python, support.type.python def : meta.function.python, source.python, storage.type.function.python : meta.function.python, source.python diff --git a/test/functions/decorators2.py b/test/functions/decorators2.py index af5d7170..0b129649 100644 --- a/test/functions/decorators2.py +++ b/test/functions/decorators2.py @@ -3,19 +3,19 @@ def foo(): pass -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python : meta.function.decorator.python, source.python f : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python : meta.function.decorator.python, source.python bar : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python : meta.function.decorator.python, source.python a : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python : meta.function.decorator.python, source.python b : entity.name.function.decorator.python, meta.function.decorator.python, source.python def : meta.function.python, source.python, storage.type.function.python diff --git a/test/functions/decorators3.py b/test/functions/decorators3.py index 0cfe7a4f..24e7a58f 100644 --- a/test/functions/decorators3.py +++ b/test/functions/decorators3.py @@ -3,11 +3,11 @@ def foo(): pass -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python : meta.function.decorator.python, source.python f : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python : meta.function.decorator.python, source.python bar : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python diff --git a/test/functions/decorators4.py b/test/functions/decorators4.py index f2aab448..ba7df7bd 100644 --- a/test/functions/decorators4.py +++ b/test/functions/decorators4.py @@ -3,15 +3,15 @@ def foo(): pass -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python a : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python b : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python c : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python None : keyword.illegal.name.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python z : entity.name.function.decorator.python, meta.function.decorator.python, source.python def : meta.function.python, source.python, storage.type.function.python : meta.function.python, source.python diff --git a/test/functions/decorators5.py b/test/functions/decorators5.py index 412747ae..436d1a4b 100644 --- a/test/functions/decorators5.py +++ b/test/functions/decorators5.py @@ -7,24 +7,24 @@ def foo(): pass -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python a : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python : meta.function.decorator.python, source.python \ : meta.function.decorator.python, punctuation.separator.continuation.line.python, source.python : meta.function.decorator.python, source.python : meta.function.decorator.python, source.python b : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python : meta.function.decorator.python, source.python \ : meta.function.decorator.python, punctuation.separator.continuation.line.python, source.python : meta.function.decorator.python, source.python : meta.function.decorator.python, source.python c : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python None : keyword.illegal.name.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python z : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python \ : meta.function.decorator.python, punctuation.separator.continuation.line.python, source.python @@ -36,9 +36,9 @@ def foo(): pass = : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function.decorator.python, source.python 1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function.decorator.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python foo : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python ok : entity.name.function.decorator.python, meta.function.decorator.python, source.python def : meta.function.python, source.python, storage.type.function.python : meta.function.python, source.python diff --git a/test/functions/decorators6.py b/test/functions/decorators6.py index 53264a2e..8a167cad 100644 --- a/test/functions/decorators6.py +++ b/test/functions/decorators6.py @@ -6,21 +6,21 @@ def foo(): pass -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python a : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python : meta.function.decorator.python, source.python b : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python : meta.function.decorator.python, source.python \ : meta.function.decorator.python, punctuation.separator.continuation.line.python, source.python : meta.function.decorator.python, source.python : meta.function.decorator.python, source.python c : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python None : keyword.illegal.name.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python z : entity.name.function.decorator.python, meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python foo : meta.function-call.arguments.python, meta.function.decorator.python, source.python, variable.parameter.function-call.python @@ -35,16 +35,16 @@ def foo(): pass : : meta.item-access.arguments.python, meta.item-access.python, punctuation.separator.slice.python, source.python 2 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python ] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python foo : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python class : keyword.control.flow.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python bar : entity.name.function.decorator.python, meta.function.decorator.python, source.python [] : invalid.illegal.decorator.python, meta.function.decorator.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python foo : entity.name.function.decorator.python, meta.function.decorator.python, source.python -. : entity.name.function.decorator.python, meta.function.decorator.python, source.python +. : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.separator.period.python, source.python ok : entity.name.function.decorator.python, meta.function.decorator.python, source.python : invalid.illegal.decorator.python, meta.function.decorator.python, source.python ''' : invalid.illegal.decorator.python, meta.function.decorator.python, source.python diff --git a/test/functions/decorators7.py b/test/functions/decorators7.py index 19d3f3bd..c604f818 100644 --- a/test/functions/decorators7.py +++ b/test/functions/decorators7.py @@ -16,23 +16,23 @@ def baz(): pass this is testing trailing whitespace after the decorator : comment.line.number-sign.python, source.python # : comment.line.number-sign.python, punctuation.definition.comment.python, source.python DO NOT DELETE TRAILING WHITESTAPCE IN THIS FILE : comment.line.number-sign.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python foo : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python foo : entity.name.function.decorator.python, meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python : source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python bar : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.decorator.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python bar : entity.name.function.decorator.python, meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python : source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python bar : entity.name.function.decorator.python, meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python @@ -40,7 +40,7 @@ def baz(): pass : source.python # : comment.line.number-sign.python, punctuation.definition.comment.python, source.python legal : comment.line.number-sign.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python bar : entity.name.function.decorator.python, meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python diff --git a/test/functions/decorators8.py b/test/functions/decorators8.py index f3898789..aeb2454e 100644 --- a/test/functions/decorators8.py +++ b/test/functions/decorators8.py @@ -3,7 +3,7 @@ def foo(): pass -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python deco : entity.name.function.decorator.python, meta.function.decorator.python, source.python ( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python ) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python diff --git a/test/unicode/unicode1.py b/test/unicode/unicode1.py index 9d853df6..795a2645 100644 --- a/test/unicode/unicode1.py +++ b/test/unicode/unicode1.py @@ -24,7 +24,7 @@ class : meta.class.python, source.python, storage.type.class.python Ń : source.python, string.quoted.docstring.single.python ' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python : meta.function.decorator.python, source.python -@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python +@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python æaœ : entity.name.function.decorator.python, meta.function.decorator.python, source.python : meta.function.python, source.python def : meta.function.python, source.python, storage.type.function.python