syntax_test_accessor.cpp (717B)
1 // SYNTAX TEST "Packages/C++/C++.sublime-syntax" 2 3 namespace N { 4 5 class X 6 { 7 public: 8 int a; 9 int b; 10 }; 11 12 class Y : public X 13 { 14 public: 15 int c; 16 } 17 18 } // namespace N 19 20 int main() 21 { 22 N:: 23 // ^^ punctuation.accessor 24 } 25 26 int main() 27 { 28 N::X x; 29 x. 30 // ^ punctuation.accessor 31 } 32 33 int main() 34 { 35 N::X x; 36 x.. 37 // ^^ - punctuation.accessor 38 } 39 40 int main() 41 { 42 N::X x; 43 x... 44 // ^^^ keyword - punctuation.accessor 45 } 46 47 int main() 48 { 49 N::X* x = new X(); 50 x-> 51 // ^^ punctuation.accessor 52 } 53 54 int main() 55 { 56 N::Y y; 57 y.X:: 58 // ^ punctuation.accessor 59 // ^^ punctuation.accessor 60 } 61 62 int main() 63 { 64 N::Y* y = new Y(); 65 y->X:: 66 // ^^ punctuation.accessor 67 // ^^ punctuation.accessor 68 }