Use JSON for FFP tests
[hiphop-php.git] / hphp / hack / test / full_fidelity / cases / test_class_const_phpmode.php.json.exp
blob4f1209b6a6fc0c6f1d84a4250fd9ff12271f5d72
2 "parse_tree":{
3 "kind":"script",
4 "script_declarations":{
5 "kind":"list",
6 "elements":[
8 "kind":"markup_section",
9 "markup_text":{
10 "kind":"token",
11 "token":{
12 "kind":"markup",
13 "text":"",
14 "offset":0,
15 "leading_width":0,
16 "width":0,
17 "trailing_width":0,
18 "leading":[],
19 "trailing":[],
20 "line_number":1
23 "markup_suffix":{
24 "kind":"markup_suffix",
25 "markup_suffix_less_than_question":{
26 "kind":"token",
27 "token":{
28 "kind":"<?",
29 "text":"<?",
30 "offset":0,
31 "leading_width":0,
32 "width":2,
33 "trailing_width":0,
34 "leading":[],
35 "trailing":[],
36 "line_number":1
39 "markup_suffix_name":{
40 "kind":"token",
41 "token":{
42 "kind":"name",
43 "text":"php",
44 "offset":2,
45 "leading_width":0,
46 "width":3,
47 "trailing_width":1,
48 "leading":[],
49 "trailing":[{"kind":"end_of_line","text":"\n","offset":5,"width":1}],
50 "line_number":1
56 "kind":"classish_declaration",
57 "classish_attribute":{"kind":"missing"},
58 "classish_modifiers":{"kind":"missing"},
59 "classish_xhp":{"kind":"missing"},
60 "classish_keyword":{
61 "kind":"token",
62 "token":{
63 "kind":"class",
64 "text":"class",
65 "offset":6,
66 "leading_width":1,
67 "width":5,
68 "trailing_width":1,
69 "leading":[{"kind":"end_of_line","text":"\n","offset":6,"width":1}],
70 "trailing":[{"kind":"whitespace","text":" ","offset":12,"width":1}],
71 "line_number":3
74 "classish_name":{
75 "kind":"token",
76 "token":{
77 "kind":"name",
78 "text":"MyClassName",
79 "offset":13,
80 "leading_width":0,
81 "width":11,
82 "trailing_width":1,
83 "leading":[],
84 "trailing":[{"kind":"whitespace","text":" ","offset":24,"width":1}],
85 "line_number":3
88 "classish_type_parameters":{"kind":"missing"},
89 "classish_extends_keyword":{"kind":"missing"},
90 "classish_extends_list":{"kind":"missing"},
91 "classish_implements_keyword":{"kind":"missing"},
92 "classish_implements_list":{"kind":"missing"},
93 "classish_where_clause":{"kind":"missing"},
94 "classish_body":{
95 "kind":"classish_body",
96 "classish_body_left_brace":{
97 "kind":"token",
98 "token":{
99 "kind":"{",
100 "text":"{",
101 "offset":25,
102 "leading_width":0,
103 "width":1,
104 "trailing_width":1,
105 "leading":[],
106 "trailing":[{"kind":"end_of_line","text":"\n","offset":26,"width":1}],
107 "line_number":3
110 "classish_body_elements":{
111 "kind":"list",
112 "elements":[
114 "kind":"const_declaration",
115 "const_modifiers":{"kind":"missing"},
116 "const_keyword":{
117 "kind":"token",
118 "token":{
119 "kind":"const",
120 "text":"const",
121 "offset":27,
122 "leading_width":2,
123 "width":5,
124 "trailing_width":1,
125 "leading":[{"kind":"whitespace","text":" ","offset":27,"width":2}],
126 "trailing":[{"kind":"whitespace","text":" ","offset":34,"width":1}],
127 "line_number":4
130 "const_type_specifier":{"kind":"missing"},
131 "const_declarators":{
132 "kind":"list",
133 "elements":[
135 "kind":"list_item",
136 "list_item":{
137 "kind":"constant_declarator",
138 "constant_declarator_name":{
139 "kind":"token",
140 "token":{
141 "kind":"name",
142 "text":"WHITE",
143 "offset":35,
144 "leading_width":0,
145 "width":5,
146 "trailing_width":1,
147 "leading":[],
148 "trailing":[{"kind":"whitespace","text":" ","offset":40,"width":1}],
149 "line_number":4
152 "constant_declarator_initializer":{
153 "kind":"simple_initializer",
154 "simple_initializer_equal":{
155 "kind":"token",
156 "token":{
157 "kind":"=",
158 "text":"=",
159 "offset":41,
160 "leading_width":0,
161 "width":1,
162 "trailing_width":1,
163 "leading":[],
164 "trailing":[{"kind":"whitespace","text":" ","offset":42,"width":1}],
165 "line_number":4
168 "simple_initializer_value":{
169 "kind":"literal",
170 "literal_expression":{
171 "kind":"token",
172 "token":{
173 "kind":"double_quoted_string_literal",
174 "text":"\"white\"",
175 "offset":43,
176 "leading_width":0,
177 "width":7,
178 "trailing_width":0,
179 "leading":[],
180 "trailing":[],
181 "line_number":4
187 "list_separator":{"kind":"missing"}
191 "const_semicolon":{
192 "kind":"token",
193 "token":{
194 "kind":";",
195 "text":";",
196 "offset":50,
197 "leading_width":0,
198 "width":1,
199 "trailing_width":1,
200 "leading":[],
201 "trailing":[{"kind":"end_of_line","text":"\n","offset":51,"width":1}],
202 "line_number":4
207 "kind":"const_declaration",
208 "const_modifiers":{"kind":"missing"},
209 "const_keyword":{
210 "kind":"token",
211 "token":{
212 "kind":"const",
213 "text":"const",
214 "offset":52,
215 "leading_width":2,
216 "width":5,
217 "trailing_width":1,
218 "leading":[{"kind":"whitespace","text":" ","offset":52,"width":2}],
219 "trailing":[{"kind":"whitespace","text":" ","offset":59,"width":1}],
220 "line_number":5
223 "const_type_specifier":{
224 "kind":"simple_type_specifier",
225 "simple_type_specifier":{
226 "kind":"token",
227 "token":{
228 "kind":"string",
229 "text":"string",
230 "offset":60,
231 "leading_width":0,
232 "width":6,
233 "trailing_width":1,
234 "leading":[],
235 "trailing":[{"kind":"whitespace","text":" ","offset":66,"width":1}],
236 "line_number":5
240 "const_declarators":{
241 "kind":"list",
242 "elements":[
244 "kind":"list_item",
245 "list_item":{
246 "kind":"constant_declarator",
247 "constant_declarator_name":{
248 "kind":"token",
249 "token":{
250 "kind":"name",
251 "text":"TRUE",
252 "offset":67,
253 "leading_width":0,
254 "width":4,
255 "trailing_width":1,
256 "leading":[],
257 "trailing":[{"kind":"whitespace","text":" ","offset":71,"width":1}],
258 "line_number":5
261 "constant_declarator_initializer":{
262 "kind":"simple_initializer",
263 "simple_initializer_equal":{
264 "kind":"token",
265 "token":{
266 "kind":"=",
267 "text":"=",
268 "offset":72,
269 "leading_width":0,
270 "width":1,
271 "trailing_width":1,
272 "leading":[],
273 "trailing":[{"kind":"whitespace","text":" ","offset":73,"width":1}],
274 "line_number":5
277 "simple_initializer_value":{
278 "kind":"literal",
279 "literal_expression":{
280 "kind":"token",
281 "token":{
282 "kind":"double_quoted_string_literal",
283 "text":"\"true\"",
284 "offset":74,
285 "leading_width":0,
286 "width":6,
287 "trailing_width":0,
288 "leading":[],
289 "trailing":[],
290 "line_number":5
296 "list_separator":{"kind":"missing"}
300 "const_semicolon":{
301 "kind":"token",
302 "token":{
303 "kind":";",
304 "text":";",
305 "offset":80,
306 "leading_width":0,
307 "width":1,
308 "trailing_width":1,
309 "leading":[],
310 "trailing":[{"kind":"end_of_line","text":"\n","offset":81,"width":1}],
311 "line_number":5
316 "kind":"const_declaration",
317 "const_modifiers":{"kind":"missing"},
318 "const_keyword":{
319 "kind":"token",
320 "token":{
321 "kind":"const",
322 "text":"const",
323 "offset":82,
324 "leading_width":2,
325 "width":5,
326 "trailing_width":1,
327 "leading":[{"kind":"whitespace","text":" ","offset":82,"width":2}],
328 "trailing":[{"kind":"whitespace","text":" ","offset":89,"width":1}],
329 "line_number":6
332 "const_type_specifier":{
333 "kind":"generic_type_specifier",
334 "generic_class_type":{
335 "kind":"token",
336 "token":{
337 "kind":"name",
338 "text":"Serializable",
339 "offset":90,
340 "leading_width":0,
341 "width":12,
342 "trailing_width":0,
343 "leading":[],
344 "trailing":[],
345 "line_number":6
348 "generic_argument_list":{
349 "kind":"type_arguments",
350 "type_arguments_left_angle":{
351 "kind":"token",
352 "token":{
353 "kind":"<",
354 "text":"<",
355 "offset":102,
356 "leading_width":0,
357 "width":1,
358 "trailing_width":0,
359 "leading":[],
360 "trailing":[],
361 "line_number":6
364 "type_arguments_types":{
365 "kind":"list",
366 "elements":[
368 "kind":"list_item",
369 "list_item":{
370 "kind":"simple_type_specifier",
371 "simple_type_specifier":{
372 "kind":"token",
373 "token":{
374 "kind":"string",
375 "text":"string",
376 "offset":103,
377 "leading_width":0,
378 "width":6,
379 "trailing_width":0,
380 "leading":[],
381 "trailing":[],
382 "line_number":6
386 "list_separator":{"kind":"missing"}
390 "type_arguments_right_angle":{
391 "kind":"token",
392 "token":{
393 "kind":">",
394 "text":">",
395 "offset":109,
396 "leading_width":0,
397 "width":1,
398 "trailing_width":1,
399 "leading":[],
400 "trailing":[{"kind":"whitespace","text":" ","offset":110,"width":1}],
401 "line_number":6
406 "const_declarators":{
407 "kind":"list",
408 "elements":[
410 "kind":"list_item",
411 "list_item":{
412 "kind":"constant_declarator",
413 "constant_declarator_name":{
414 "kind":"token",
415 "token":{
416 "kind":"name",
417 "text":"BLUE",
418 "offset":111,
419 "leading_width":0,
420 "width":4,
421 "trailing_width":1,
422 "leading":[],
423 "trailing":[{"kind":"whitespace","text":" ","offset":115,"width":1}],
424 "line_number":6
427 "constant_declarator_initializer":{
428 "kind":"simple_initializer",
429 "simple_initializer_equal":{
430 "kind":"token",
431 "token":{
432 "kind":"=",
433 "text":"=",
434 "offset":116,
435 "leading_width":0,
436 "width":1,
437 "trailing_width":1,
438 "leading":[],
439 "trailing":[{"kind":"whitespace","text":" ","offset":117,"width":1}],
440 "line_number":6
443 "simple_initializer_value":{
444 "kind":"literal",
445 "literal_expression":{
446 "kind":"token",
447 "token":{
448 "kind":"double_quoted_string_literal",
449 "text":"\"blue\\u{0123}\"",
450 "offset":118,
451 "leading_width":0,
452 "width":14,
453 "trailing_width":0,
454 "leading":[],
455 "trailing":[],
456 "line_number":6
462 "list_separator":{"kind":"missing"}
466 "const_semicolon":{
467 "kind":"token",
468 "token":{
469 "kind":";",
470 "text":";",
471 "offset":132,
472 "leading_width":0,
473 "width":1,
474 "trailing_width":1,
475 "leading":[],
476 "trailing":[{"kind":"end_of_line","text":"\n","offset":133,"width":1}],
477 "line_number":6
482 "kind":"const_declaration",
483 "const_modifiers":{
484 "kind":"list",
485 "elements":[
487 "kind":"token",
488 "token":{
489 "kind":"public",
490 "text":"public",
491 "offset":134,
492 "leading_width":2,
493 "width":6,
494 "trailing_width":1,
495 "leading":[{"kind":"whitespace","text":" ","offset":134,"width":2}],
496 "trailing":[{"kind":"whitespace","text":" ","offset":142,"width":1}],
497 "line_number":7
502 "const_keyword":{
503 "kind":"token",
504 "token":{
505 "kind":"const",
506 "text":"const",
507 "offset":143,
508 "leading_width":0,
509 "width":5,
510 "trailing_width":1,
511 "leading":[],
512 "trailing":[{"kind":"whitespace","text":" ","offset":148,"width":1}],
513 "line_number":7
516 "const_type_specifier":{
517 "kind":"simple_type_specifier",
518 "simple_type_specifier":{
519 "kind":"token",
520 "token":{
521 "kind":"string",
522 "text":"string",
523 "offset":149,
524 "leading_width":0,
525 "width":6,
526 "trailing_width":1,
527 "leading":[],
528 "trailing":[{"kind":"whitespace","text":" ","offset":155,"width":1}],
529 "line_number":7
533 "const_declarators":{
534 "kind":"list",
535 "elements":[
537 "kind":"list_item",
538 "list_item":{
539 "kind":"constant_declarator",
540 "constant_declarator_name":{
541 "kind":"token",
542 "token":{
543 "kind":"name",
544 "text":"PublicConst",
545 "offset":156,
546 "leading_width":0,
547 "width":11,
548 "trailing_width":1,
549 "leading":[],
550 "trailing":[{"kind":"whitespace","text":" ","offset":167,"width":1}],
551 "line_number":7
554 "constant_declarator_initializer":{
555 "kind":"simple_initializer",
556 "simple_initializer_equal":{
557 "kind":"token",
558 "token":{
559 "kind":"=",
560 "text":"=",
561 "offset":168,
562 "leading_width":0,
563 "width":1,
564 "trailing_width":1,
565 "leading":[],
566 "trailing":[{"kind":"whitespace","text":" ","offset":169,"width":1}],
567 "line_number":7
570 "simple_initializer_value":{
571 "kind":"literal",
572 "literal_expression":{
573 "kind":"token",
574 "token":{
575 "kind":"double_quoted_string_literal",
576 "text":"\"this is fine in PHP mode\"",
577 "offset":170,
578 "leading_width":0,
579 "width":26,
580 "trailing_width":0,
581 "leading":[],
582 "trailing":[],
583 "line_number":7
589 "list_separator":{"kind":"missing"}
593 "const_semicolon":{
594 "kind":"token",
595 "token":{
596 "kind":";",
597 "text":";",
598 "offset":196,
599 "leading_width":0,
600 "width":1,
601 "trailing_width":1,
602 "leading":[],
603 "trailing":[{"kind":"end_of_line","text":"\n","offset":197,"width":1}],
604 "line_number":7
609 "kind":"const_declaration",
610 "const_modifiers":{
611 "kind":"list",
612 "elements":[
614 "kind":"token",
615 "token":{
616 "kind":"protected",
617 "text":"protected",
618 "offset":198,
619 "leading_width":2,
620 "width":9,
621 "trailing_width":1,
622 "leading":[{"kind":"whitespace","text":" ","offset":198,"width":2}],
623 "trailing":[{"kind":"whitespace","text":" ","offset":209,"width":1}],
624 "line_number":8
629 "const_keyword":{
630 "kind":"token",
631 "token":{
632 "kind":"const",
633 "text":"const",
634 "offset":210,
635 "leading_width":0,
636 "width":5,
637 "trailing_width":1,
638 "leading":[],
639 "trailing":[{"kind":"whitespace","text":" ","offset":215,"width":1}],
640 "line_number":8
643 "const_type_specifier":{
644 "kind":"simple_type_specifier",
645 "simple_type_specifier":{
646 "kind":"token",
647 "token":{
648 "kind":"string",
649 "text":"string",
650 "offset":216,
651 "leading_width":0,
652 "width":6,
653 "trailing_width":1,
654 "leading":[],
655 "trailing":[{"kind":"whitespace","text":" ","offset":222,"width":1}],
656 "line_number":8
660 "const_declarators":{
661 "kind":"list",
662 "elements":[
664 "kind":"list_item",
665 "list_item":{
666 "kind":"constant_declarator",
667 "constant_declarator_name":{
668 "kind":"token",
669 "token":{
670 "kind":"name",
671 "text":"ProtectedConst",
672 "offset":223,
673 "leading_width":0,
674 "width":14,
675 "trailing_width":1,
676 "leading":[],
677 "trailing":[{"kind":"whitespace","text":" ","offset":237,"width":1}],
678 "line_number":8
681 "constant_declarator_initializer":{
682 "kind":"simple_initializer",
683 "simple_initializer_equal":{
684 "kind":"token",
685 "token":{
686 "kind":"=",
687 "text":"=",
688 "offset":238,
689 "leading_width":0,
690 "width":1,
691 "trailing_width":1,
692 "leading":[],
693 "trailing":[{"kind":"whitespace","text":" ","offset":239,"width":1}],
694 "line_number":8
697 "simple_initializer_value":{
698 "kind":"literal",
699 "literal_expression":{
700 "kind":"token",
701 "token":{
702 "kind":"double_quoted_string_literal",
703 "text":"\"this is fine in PHP mode\"",
704 "offset":240,
705 "leading_width":0,
706 "width":26,
707 "trailing_width":0,
708 "leading":[],
709 "trailing":[],
710 "line_number":8
716 "list_separator":{"kind":"missing"}
720 "const_semicolon":{
721 "kind":"token",
722 "token":{
723 "kind":";",
724 "text":";",
725 "offset":266,
726 "leading_width":0,
727 "width":1,
728 "trailing_width":1,
729 "leading":[],
730 "trailing":[{"kind":"end_of_line","text":"\n","offset":267,"width":1}],
731 "line_number":8
736 "kind":"const_declaration",
737 "const_modifiers":{
738 "kind":"list",
739 "elements":[
741 "kind":"token",
742 "token":{
743 "kind":"private",
744 "text":"private",
745 "offset":268,
746 "leading_width":2,
747 "width":7,
748 "trailing_width":1,
749 "leading":[{"kind":"whitespace","text":" ","offset":268,"width":2}],
750 "trailing":[{"kind":"whitespace","text":" ","offset":277,"width":1}],
751 "line_number":9
756 "const_keyword":{
757 "kind":"token",
758 "token":{
759 "kind":"const",
760 "text":"const",
761 "offset":278,
762 "leading_width":0,
763 "width":5,
764 "trailing_width":1,
765 "leading":[],
766 "trailing":[{"kind":"whitespace","text":" ","offset":283,"width":1}],
767 "line_number":9
770 "const_type_specifier":{
771 "kind":"simple_type_specifier",
772 "simple_type_specifier":{
773 "kind":"token",
774 "token":{
775 "kind":"string",
776 "text":"string",
777 "offset":284,
778 "leading_width":0,
779 "width":6,
780 "trailing_width":1,
781 "leading":[],
782 "trailing":[{"kind":"whitespace","text":" ","offset":290,"width":1}],
783 "line_number":9
787 "const_declarators":{
788 "kind":"list",
789 "elements":[
791 "kind":"list_item",
792 "list_item":{
793 "kind":"constant_declarator",
794 "constant_declarator_name":{
795 "kind":"token",
796 "token":{
797 "kind":"name",
798 "text":"PrivateConst",
799 "offset":291,
800 "leading_width":0,
801 "width":12,
802 "trailing_width":1,
803 "leading":[],
804 "trailing":[{"kind":"whitespace","text":" ","offset":303,"width":1}],
805 "line_number":9
808 "constant_declarator_initializer":{
809 "kind":"simple_initializer",
810 "simple_initializer_equal":{
811 "kind":"token",
812 "token":{
813 "kind":"=",
814 "text":"=",
815 "offset":304,
816 "leading_width":0,
817 "width":1,
818 "trailing_width":1,
819 "leading":[],
820 "trailing":[{"kind":"whitespace","text":" ","offset":305,"width":1}],
821 "line_number":9
824 "simple_initializer_value":{
825 "kind":"literal",
826 "literal_expression":{
827 "kind":"token",
828 "token":{
829 "kind":"double_quoted_string_literal",
830 "text":"\"this is fine in PHP mode\"",
831 "offset":306,
832 "leading_width":0,
833 "width":26,
834 "trailing_width":0,
835 "leading":[],
836 "trailing":[],
837 "line_number":9
843 "list_separator":{"kind":"missing"}
847 "const_semicolon":{
848 "kind":"token",
849 "token":{
850 "kind":";",
851 "text":";",
852 "offset":332,
853 "leading_width":0,
854 "width":1,
855 "trailing_width":1,
856 "leading":[],
857 "trailing":[{"kind":"end_of_line","text":"\n","offset":333,"width":1}],
858 "line_number":9
864 "classish_body_right_brace":{
865 "kind":"token",
866 "token":{
867 "kind":"}",
868 "text":"}",
869 "offset":334,
870 "leading_width":0,
871 "width":1,
872 "trailing_width":1,
873 "leading":[],
874 "trailing":[{"kind":"end_of_line","text":"\n","offset":335,"width":1}],
875 "line_number":10
881 "kind":"end_of_file",
882 "end_of_file_token":{
883 "kind":"token",
884 "token":{
885 "kind":"end_of_file",
886 "text":"",
887 "offset":336,
888 "leading_width":0,
889 "width":0,
890 "trailing_width":0,
891 "leading":[],
892 "trailing":[],
893 "line_number":11
900 "program_text":"<?php\n\nclass MyClassName {\n const WHITE = \"white\";\n const string TRUE = \"true\";\n const Serializable<string> BLUE = \"blue\\u{0123}\";\n public const string PublicConst = \"this is fine in PHP mode\";\n protected const string ProtectedConst = \"this is fine in PHP mode\";\n private const string PrivateConst = \"this is fine in PHP mode\";\n}\n",
901 "version":"2020-04-14-0002"