From af7f6ec886570a9193b45cc18704c68b3a5c11d5 Mon Sep 17 00:00:00 2001 From: Gerard Roche Date: Tue, 10 Feb 2015 21:00:21 +0000 Subject: [PATCH] :bug: fix #6 short array syntax scope --- PHP.tmLanguage | 6 +- .../issue6_short_array_syntax_test.php | 70 +++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 test/language/issue6_short_array_syntax_test.php diff --git a/PHP.tmLanguage b/PHP.tmLanguage index c08e965..1955364 100644 --- a/PHP.tmLanguage +++ b/PHP.tmLanguage @@ -2109,7 +2109,7 @@ 0 name - punctuation.section.array.begin.php + punctuation.definition.array.begin.php end @@ -2119,9 +2119,11 @@ 0 name - punctuation.section.array.end.php + punctuation.definition.array.end.php + name + meta.array.php patterns diff --git a/test/language/issue6_short_array_syntax_test.php b/test/language/issue6_short_array_syntax_test.php new file mode 100644 index 0000000..e06fd5e --- /dev/null +++ b/test/language/issue6_short_array_syntax_test.php @@ -0,0 +1,70 @@ +--TEST-- +Short array syntax as of 5.4 +--FILE-- + +--EXPECT-- +match:2:5:meta.array.empty.php support.function.construct.php +match:2:6:meta.array.empty.php support.function.construct.php +match:2:7:meta.array.empty.php support.function.construct.php +match:2:8:meta.array.empty.php support.function.construct.php +match:2:9:meta.array.empty.php support.function.construct.php +match:2:10:meta.array.empty.php punctuation.definition.array.begin.php +match:2:11:meta.array.empty.php punctuation.definition.array.end.php +match:3:5:meta.array.php punctuation.definition.array.begin.php +match:3:6:meta.array.php punctuation.definition.array.end.php + +match:5:5:meta.array.php support.function.construct.php +match:5:6:meta.array.php support.function.construct.php +match:5:7:meta.array.php support.function.construct.php +match:5:8:meta.array.php support.function.construct.php +match:5:9:meta.array.php support.function.construct.php +match:5:10:meta.array.php punctuation.definition.array.begin.php +match:5:11:meta.array.php +match:5:12:meta.array.php punctuation.definition.array.end.php +match:6:5:meta.array.php punctuation.definition.array.begin.php +match:6:6:meta.array.php +match:6:7:meta.array.php punctuation.definition.array.end.php + +match:8:5:meta.array.php support.function.construct.php +match:8:6:meta.array.php support.function.construct.php +match:8:7:meta.array.php support.function.construct.php +match:8:8:meta.array.php support.function.construct.php +match:8:9:meta.array.php support.function.construct.php +match:8:10:meta.array.php punctuation.definition.array.begin.php +match:8:11:meta.array.php +match:9:0:meta.array.php +match:9:1:meta.array.php +match:9:2:meta.array.php +match:9:3:meta.array.php +match:9:4:meta.array.php string.quoted.single.php punctuation.definition.string.begin.php +match:9:5:meta.array.php string.quoted.single.php meta.string-contents.quoted.single.php +match:9:6:meta.array.php string.quoted.single.php punctuation.definition.string.end.php +match:9:7:meta.array.php + +match:10:0:meta.array.php punctuation.definition.array.end.php +match:11:5:meta.array.php punctuation.definition.array.begin.php +match:11:6:meta.array.php +match:12:0:meta.array.php +match:12:1:meta.array.php +match:12:2:meta.array.php +match:12:3:meta.array.php +match:12:4:meta.array.php string.quoted.single.php punctuation.definition.string.begin.php +match:12:5:meta.array.php string.quoted.single.php meta.string-contents.quoted.single.php +match:12:6:meta.array.php string.quoted.single.php punctuation.definition.string.end.php +match:12:7:meta.array.php +match:13:0:meta.array.php punctuation.definition.array.end.php