@@ -589,6 +589,57 @@ describe("Grammar Tests", function() {
589
589
expect(tokens[0][34].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.end.python"]);
590
590
});
591
591
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
+
592
643
it("test/calls/call2.py",
593
644
function() {
594
645
tokens = grammar.tokenizeLines("foo(from=1)")
@@ -702,7 +753,7 @@ describe("Grammar Tests", function() {
702
753
expect(tokens[0][1].value).toBe("(");
703
754
expect(tokens[0][1].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
704
755
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"]);
706
757
expect(tokens[0][3].value).toBe("a");
707
758
expect(tokens[0][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
708
759
expect(tokens[0][4].value).toBe(")");
@@ -712,7 +763,7 @@ describe("Grammar Tests", function() {
712
763
expect(tokens[1][1].value).toBe("(");
713
764
expect(tokens[1][1].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
714
765
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"]);
716
767
expect(tokens[1][3].value).toBe("a");
717
768
expect(tokens[1][3].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
718
769
expect(tokens[1][4].value).toBe(")");
@@ -727,9 +778,9 @@ describe("Grammar Tests", function() {
727
778
expect(tokens[0][1].value).toBe("(");
728
779
expect(tokens[0][1].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
729
780
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" ]);
731
782
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"]);
733
784
expect(tokens[0][4].value).toBe("a");
734
785
expect(tokens[0][4].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
735
786
expect(tokens[0][5].value).toBe(" ");
@@ -751,9 +802,9 @@ describe("Grammar Tests", function() {
751
802
expect(tokens[1][1].value).toBe("(");
752
803
expect(tokens[1][1].scopes).toEqual(["source.python","meta.function-call.python","punctuation.definition.arguments.begin.python"]);
753
804
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" ]);
755
806
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"]);
757
808
expect(tokens[1][4].value).toBe("a");
758
809
expect(tokens[1][4].scopes).toEqual(["source.python","meta.function-call.python","meta.function-call.arguments.python"]);
759
810
expect(tokens[1][5].value).toBe(" ");
0 commit comments