@@ -589,6 +589,57 @@ describe("Grammar Tests", function() {
589589 expect(tokens[0][34].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.end.python"]);
590590 });
591591
592+ it("test/calls/call10.py",
593+ function() {
594+ tokens = grammar.tokenizeLines("x = foo(True,\n 3 * 4,\n *a,\n **bar)")
595+ expect(tokens[0][0].value).toBe("x");
596+ expect(tokens[0][0].scopes).toEqual(["source.python"]);
597+ expect(tokens[0][1].value).toBe(" ");
598+ expect(tokens[0][1].scopes).toEqual(["source.python"]);
599+ expect(tokens[0][2].value).toBe("=");
600+ expect(tokens[0][2].scopes).toEqual(["source.python","keyword.operator.assignment.python"]);
601+ expect(tokens[0][3].value).toBe(" ");
602+ expect(tokens[0][3].scopes).toEqual(["source.python"]);
603+ expect(tokens[0][4].value).toBe("foo");
604+ expect(tokens[0][4].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.generic.python"]);
605+ expect(tokens[0][5].value).toBe("(");
606+ expect(tokens[0][5].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
607+ expect(tokens[0][6].value).toBe("True");
608+ expect(tokens[0][6].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","constant.language.python"]);
609+ expect(tokens[0][7].value).toBe(",");
610+ expect(tokens[0][7].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","punctuation.separator.arguments.python"]);
611+ expect(tokens[1][0].value).toBe(" ");
612+ expect(tokens[1][0].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
613+ expect(tokens[1][1].value).toBe("3");
614+ expect(tokens[1][1].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","constant.numeric.dec.python"]);
615+ expect(tokens[1][2].value).toBe(" ");
616+ expect(tokens[1][2].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
617+ expect(tokens[1][3].value).toBe("*");
618+ expect(tokens[1][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","keyword.operator.arithmetic.python"]);
619+ expect(tokens[1][4].value).toBe(" ");
620+ expect(tokens[1][4].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
621+ expect(tokens[1][5].value).toBe("4");
622+ expect(tokens[1][5].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","constant.numeric.dec.python"]);
623+ expect(tokens[1][6].value).toBe(",");
624+ expect(tokens[1][6].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","punctuation.separator.arguments.python"]);
625+ expect(tokens[2][0].value).toBe(" ");
626+ expect(tokens[2][0].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
627+ expect(tokens[2][1].value).toBe("*");
628+ expect(tokens[2][1].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","keyword.operator.unpacking.arguments.python"]);
629+ expect(tokens[2][2].value).toBe("a");
630+ expect(tokens[2][2].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
631+ expect(tokens[2][3].value).toBe(",");
632+ expect(tokens[2][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","punctuation.separator.arguments.python"]);
633+ expect(tokens[3][0].value).toBe(" ");
634+ expect(tokens[3][0].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
635+ expect(tokens[3][1].value).toBe("**");
636+ expect(tokens[3][1].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python","keyword.operator.unpacking.arguments.python"]);
637+ expect(tokens[3][2].value).toBe("bar");
638+ expect(tokens[3][2].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
639+ expect(tokens[3][3].value).toBe(")");
640+ expect(tokens[3][3].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.end.python"]);
641+ });
642+
592643 it("test/calls/call2.py",
593644 function() {
594645 tokens = grammar.tokenizeLines("foo(from=1)")
@@ -702,7 +753,7 @@ describe("Grammar Tests", function() {
702753 expect(tokens[0][1].value).toBe("(");
703754 expect(tokens[0][1].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
704755 expect(tokens[0][2].value).toBe("*");
705- expect(tokens[0][2].scopes).toEqual(["source.python","meta.function-call.python","keyword.operator.unpacking.arguments.python"]);
756+ expect(tokens[0][2].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"," keyword.operator.unpacking.arguments.python"]);
706757 expect(tokens[0][3].value).toBe("a");
707758 expect(tokens[0][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
708759 expect(tokens[0][4].value).toBe(")");
@@ -712,7 +763,7 @@ describe("Grammar Tests", function() {
712763 expect(tokens[1][1].value).toBe("(");
713764 expect(tokens[1][1].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
714765 expect(tokens[1][2].value).toBe("**");
715- expect(tokens[1][2].scopes).toEqual(["source.python","meta.function-call.python","keyword.operator.unpacking.arguments.python"]);
766+ expect(tokens[1][2].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"," keyword.operator.unpacking.arguments.python"]);
716767 expect(tokens[1][3].value).toBe("a");
717768 expect(tokens[1][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
718769 expect(tokens[1][4].value).toBe(")");
@@ -727,9 +778,9 @@ describe("Grammar Tests", function() {
727778 expect(tokens[0][1].value).toBe("(");
728779 expect(tokens[0][1].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
729780 expect(tokens[0][2].value).toBe(" ");
730- expect(tokens[0][2].scopes).toEqual(["source.python","meta.function-call.python"]);
781+ expect(tokens[0][2].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python" ]);
731782 expect(tokens[0][3].value).toBe("*");
732- expect(tokens[0][3].scopes).toEqual(["source.python","meta.function-call.python","keyword.operator.unpacking.arguments.python"]);
783+ expect(tokens[0][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"," keyword.operator.unpacking.arguments.python"]);
733784 expect(tokens[0][4].value).toBe("a");
734785 expect(tokens[0][4].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
735786 expect(tokens[0][5].value).toBe(" ");
@@ -751,9 +802,9 @@ describe("Grammar Tests", function() {
751802 expect(tokens[1][1].value).toBe("(");
752803 expect(tokens[1][1].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
753804 expect(tokens[1][2].value).toBe(" ");
754- expect(tokens[1][2].scopes).toEqual(["source.python","meta.function-call.python"]);
805+ expect(tokens[1][2].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python" ]);
755806 expect(tokens[1][3].value).toBe("**");
756- expect(tokens[1][3].scopes).toEqual(["source.python","meta.function-call.python","keyword.operator.unpacking.arguments.python"]);
807+ expect(tokens[1][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"," keyword.operator.unpacking.arguments.python"]);
757808 expect(tokens[1][4].value).toBe("a");
758809 expect(tokens[1][4].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
759810 expect(tokens[1][5].value).toBe(" ");
0 commit comments