4 "script_declarations":{
8 "kind":"markup_section",
24 "kind":"markup_suffix",
25 "markup_suffix_less_than_question":{
39 "markup_suffix_name":{
49 "trailing":[{"kind":"end_of_line","text":"\n","offset":4,"width":1}],
56 "kind":"function_declaration",
57 "function_attribute_spec":{"kind":"missing"},
58 "function_declaration_header":{
59 "kind":"function_declaration_header",
60 "function_modifiers":{"kind":"missing"},
71 "trailing":[{"kind":"whitespace","text":" ","offset":13,"width":1}],
89 "function_type_parameter_list":{"kind":"missing"},
90 "function_left_paren":{
104 "function_parameter_list":{"kind":"missing"},
105 "function_right_paren":{
115 "trailing":[{"kind":"whitespace","text":" ","offset":19,"width":1}],
129 "trailing":[{"kind":"whitespace","text":" ","offset":21,"width":1}],
134 "kind":"simple_type_specifier",
135 "simple_type_specifier":{
145 "trailing":[{"kind":"whitespace","text":" ","offset":26,"width":1}],
150 "function_where_clause":{"kind":"missing"}
153 "kind":"compound_statement",
154 "compound_left_brace":{
164 "trailing":[{"kind":"end_of_line","text":"\n","offset":28,"width":1}],
168 "compound_statements":{
182 "leading":[{"kind":"whitespace","text":" ","offset":29,"width":2}],
183 "trailing":[{"kind":"whitespace","text":" ","offset":35,"width":1}],
189 "literal_expression":{
192 "kind":"decimal_literal",
214 "trailing":[{"kind":"whitespace","text":" ","offset":40,"width":1}],
220 "kind":"expression_statement",
221 "expression_statement_expression":{"kind":"missing"},
222 "expression_statement_semicolon":{
233 {"kind":"whitespace","text":" ","offset":42,"width":1},
235 "kind":"single_line_comment",
236 "text":"// error, outside switch",
240 {"kind":"end_of_line","text":"\n","offset":67,"width":1}
247 "kind":"default_label",
257 "leading":[{"kind":"whitespace","text":" ","offset":68,"width":2}],
272 "trailing":[{"kind":"whitespace","text":" ","offset":78,"width":1}],
278 "kind":"expression_statement",
279 "expression_statement_expression":{"kind":"missing"},
280 "expression_statement_semicolon":{
291 {"kind":"whitespace","text":" ","offset":80,"width":1},
293 "kind":"single_line_comment",
294 "text":"// error, outside switch",
298 {"kind":"end_of_line","text":"\n","offset":105,"width":1}
305 "kind":"switch_statement",
315 "leading":[{"kind":"whitespace","text":" ","offset":106,"width":2}],
316 "trailing":[{"kind":"whitespace","text":" ","offset":114,"width":1}],
320 "switch_left_paren":{
334 "switch_expression":{
336 "variable_expression":{
351 "switch_right_paren":{
361 "trailing":[{"kind":"whitespace","text":" ","offset":119,"width":1}],
365 "switch_left_brace":{
375 "trailing":[{"kind":"whitespace","text":" ","offset":121,"width":1}],
383 "kind":"switch_section",
384 "switch_section_labels":{
399 "trailing":[{"kind":"whitespace","text":" ","offset":126,"width":1}],
405 "literal_expression":{
408 "kind":"decimal_literal",
430 "trailing":[{"kind":"whitespace","text":" ","offset":131,"width":1}],
437 "switch_section_statements":{
441 "kind":"expression_statement",
442 "expression_statement_expression":{"kind":"missing"},
443 "expression_statement_semicolon":{
453 "trailing":[{"kind":"whitespace","text":" ","offset":133,"width":1}],
460 "switch_section_fallthrough":{"kind":"missing"}
463 "kind":"switch_section",
464 "switch_section_labels":{
468 "kind":"default_label",
493 "trailing":[{"kind":"whitespace","text":" ","offset":142,"width":1}],
500 "switch_section_statements":{
504 "kind":"break_statement",
536 "switch_section_fallthrough":{"kind":"missing"}
540 "switch_right_brace":{
551 {"kind":"whitespace","text":" ","offset":150,"width":1},
552 {"kind":"single_line_comment","text":"// no error","offset":151,"width":11},
553 {"kind":"end_of_line","text":"\n","offset":162,"width":1}
560 "kind":"break_statement",
570 "leading":[{"kind":"whitespace","text":" ","offset":163,"width":2}],
586 {"kind":"whitespace","text":" ","offset":171,"width":1},
587 {"kind":"single_line_comment","text":"// error","offset":172,"width":8},
588 {"kind":"end_of_line","text":"\n","offset":180,"width":1}
595 "kind":"while_statement",
605 "leading":[{"kind":"whitespace","text":" ","offset":181,"width":2}],
626 "variable_expression":{
641 "while_right_paren":{
651 "trailing":[{"kind":"whitespace","text":" ","offset":192,"width":1}],
656 "kind":"compound_statement",
657 "compound_left_brace":{
667 "trailing":[{"kind":"end_of_line","text":"\n","offset":194,"width":1}],
671 "compound_statements":{
675 "kind":"if_statement",
685 "leading":[{"kind":"whitespace","text":" ","offset":195,"width":4}],
686 "trailing":[{"kind":"whitespace","text":" ","offset":201,"width":1}],
706 "variable_expression":{
731 "trailing":[{"kind":"whitespace","text":" ","offset":206,"width":1}],
736 "kind":"break_statement",
762 {"kind":"whitespace","text":" ","offset":213,"width":1},
763 {"kind":"single_line_comment","text":"// no error","offset":214,"width":11},
764 {"kind":"end_of_line","text":"\n","offset":225,"width":1}
770 "if_elseif_clauses":{"kind":"missing"},
771 "if_else_clause":{"kind":"missing"}
774 "kind":"if_statement",
784 "leading":[{"kind":"whitespace","text":" ","offset":226,"width":4}],
785 "trailing":[{"kind":"whitespace","text":" ","offset":232,"width":1}],
805 "variable_expression":{
830 "trailing":[{"kind":"whitespace","text":" ","offset":237,"width":1}],
835 "kind":"continue_statement",
850 "continue_semicolon":{
861 {"kind":"whitespace","text":" ","offset":247,"width":1},
862 {"kind":"single_line_comment","text":"// no error","offset":248,"width":11},
863 {"kind":"end_of_line","text":"\n","offset":259,"width":1}
869 "if_elseif_clauses":{"kind":"missing"},
870 "if_else_clause":{"kind":"missing"}
873 "kind":"expression_statement",
874 "expression_statement_expression":{
875 "kind":"binary_expression",
876 "binary_left_operand":{
878 "variable_expression":{
887 "leading":[{"kind":"whitespace","text":" ","offset":260,"width":4}],
888 "trailing":[{"kind":"whitespace","text":" ","offset":266,"width":1}],
903 "trailing":[{"kind":"whitespace","text":" ","offset":268,"width":1}],
907 "binary_right_operand":{
908 "kind":"anonymous_function",
909 "anonymous_attribute_spec":{"kind":"missing"},
910 "anonymous_static_keyword":{"kind":"missing"},
911 "anonymous_async_keyword":{"kind":"missing"},
912 "anonymous_coroutine_keyword":{"kind":"missing"},
913 "anonymous_function_keyword":{
927 "anonymous_left_paren":{
941 "anonymous_parameters":{
947 "kind":"parameter_declaration",
948 "parameter_attribute":{"kind":"missing"},
949 "parameter_visibility":{"kind":"missing"},
950 "parameter_call_convention":{"kind":"missing"},
951 "parameter_type":{"kind":"missing"},
966 "parameter_default_value":{"kind":"missing"}
968 "list_separator":{"kind":"missing"}
972 "anonymous_right_paren":{
982 "trailing":[{"kind":"whitespace","text":" ","offset":281,"width":1}],
986 "anonymous_colon":{"kind":"missing"},
987 "anonymous_type":{"kind":"missing"},
988 "anonymous_use":{"kind":"missing"},
990 "kind":"compound_statement",
991 "compound_left_brace":{
1001 "trailing":[{"kind":"whitespace","text":" ","offset":283,"width":1}],
1005 "compound_statements":{
1009 "kind":"break_statement",
1034 "trailing":[{"kind":"whitespace","text":" ","offset":290,"width":1}],
1041 "compound_right_brace":{
1058 "expression_statement_semicolon":{
1066 "trailing_width":10,
1069 {"kind":"whitespace","text":" ","offset":293,"width":1},
1070 {"kind":"single_line_comment","text":"// error","offset":294,"width":8},
1071 {"kind":"end_of_line","text":"\n","offset":302,"width":1}
1079 "compound_right_brace":{
1088 "leading":[{"kind":"whitespace","text":" ","offset":303,"width":2}],
1089 "trailing":[{"kind":"end_of_line","text":"\n","offset":306,"width":1}],
1096 "kind":"try_statement",
1106 "leading":[{"kind":"whitespace","text":" ","offset":307,"width":2}],
1107 "trailing":[{"kind":"whitespace","text":" ","offset":312,"width":1}],
1111 "try_compound_statement":{
1112 "kind":"compound_statement",
1113 "compound_left_brace":{
1127 "compound_statements":{"kind":"missing"},
1128 "compound_right_brace":{
1138 "trailing":[{"kind":"whitespace","text":" ","offset":315,"width":1}],
1143 "try_catch_clauses":{
1147 "kind":"catch_clause",
1158 "trailing":[{"kind":"whitespace","text":" ","offset":321,"width":1}],
1162 "catch_left_paren":{
1177 "kind":"simple_type_specifier",
1178 "simple_type_specifier":{
1188 "trailing":[{"kind":"whitespace","text":" ","offset":332,"width":1}],
1207 "catch_right_paren":{
1217 "trailing":[{"kind":"whitespace","text":" ","offset":337,"width":1}],
1222 "kind":"compound_statement",
1223 "compound_left_brace":{
1237 "compound_statements":{"kind":"missing"},
1238 "compound_right_brace":{
1246 "trailing_width":13,
1249 {"kind":"whitespace","text":" ","offset":340,"width":1},
1250 {"kind":"single_line_comment","text":"// no error","offset":341,"width":11},
1251 {"kind":"end_of_line","text":"\n","offset":352,"width":1}
1260 "try_finally_clause":{"kind":"missing"}
1263 "kind":"try_statement",
1273 "leading":[{"kind":"whitespace","text":" ","offset":353,"width":2}],
1274 "trailing":[{"kind":"whitespace","text":" ","offset":358,"width":1}],
1278 "try_compound_statement":{
1279 "kind":"compound_statement",
1280 "compound_left_brace":{
1294 "compound_statements":{"kind":"missing"},
1295 "compound_right_brace":{
1305 "trailing":[{"kind":"whitespace","text":" ","offset":361,"width":1}],
1310 "try_catch_clauses":{"kind":"missing"},
1311 "try_finally_clause":{
1312 "kind":"finally_clause",
1323 "trailing":[{"kind":"whitespace","text":" ","offset":369,"width":1}],
1328 "kind":"compound_statement",
1329 "compound_left_brace":{
1343 "compound_statements":{"kind":"missing"},
1344 "compound_right_brace":{
1352 "trailing_width":13,
1355 {"kind":"whitespace","text":" ","offset":372,"width":1},
1356 {"kind":"single_line_comment","text":"// no error","offset":373,"width":11},
1357 {"kind":"end_of_line","text":"\n","offset":384,"width":1}
1366 "kind":"try_statement",
1376 "leading":[{"kind":"whitespace","text":" ","offset":385,"width":2}],
1377 "trailing":[{"kind":"whitespace","text":" ","offset":390,"width":1}],
1381 "try_compound_statement":{
1382 "kind":"compound_statement",
1383 "compound_left_brace":{
1397 "compound_statements":{"kind":"missing"},
1398 "compound_right_brace":{
1406 "trailing_width":10,
1409 {"kind":"whitespace","text":" ","offset":393,"width":1},
1410 {"kind":"single_line_comment","text":"// error","offset":394,"width":8},
1411 {"kind":"end_of_line","text":"\n","offset":402,"width":1}
1417 "try_catch_clauses":{"kind":"missing"},
1418 "try_finally_clause":{"kind":"missing"}
1421 "kind":"switch_statement",
1431 "leading":[{"kind":"whitespace","text":" ","offset":403,"width":2}],
1432 "trailing":[{"kind":"whitespace","text":" ","offset":411,"width":1}],
1436 "switch_left_paren":{
1450 "switch_expression":{
1452 "variable_expression":{
1467 "switch_right_paren":{
1477 "trailing":[{"kind":"whitespace","text":" ","offset":416,"width":1}],
1481 "switch_left_brace":{
1491 "trailing":[{"kind":"whitespace","text":" ","offset":418,"width":1}],
1495 "switch_sections":{"kind":"missing"},
1496 "switch_right_brace":{
1504 "trailing_width":10,
1507 {"kind":"whitespace","text":" ","offset":420,"width":1},
1508 {"kind":"single_line_comment","text":"// error","offset":421,"width":8},
1509 {"kind":"end_of_line","text":"\n","offset":429,"width":1}
1516 "kind":"switch_statement",
1526 "leading":[{"kind":"whitespace","text":" ","offset":430,"width":2}],
1527 "trailing":[{"kind":"whitespace","text":" ","offset":438,"width":1}],
1531 "switch_left_paren":{
1545 "switch_expression":{
1547 "variable_expression":{
1562 "switch_right_paren":{
1572 "trailing":[{"kind":"whitespace","text":" ","offset":443,"width":1}],
1576 "switch_left_brace":{
1586 "trailing":[{"kind":"whitespace","text":" ","offset":445,"width":1}],
1594 "kind":"switch_section",
1595 "switch_section_labels":{"kind":"missing"},
1596 "switch_section_statements":{
1600 "kind":"expression_statement",
1601 "expression_statement_expression":{
1602 "kind":"function_call_expression",
1603 "function_call_receiver":{
1617 "function_call_type_args":{"kind":"missing"},
1618 "function_call_left_paren":{
1632 "function_call_argument_list":{"kind":"missing"},
1633 "function_call_right_paren":{
1648 "expression_statement_semicolon":{
1658 "trailing":[{"kind":"whitespace","text":" ","offset":452,"width":1}],
1665 "switch_section_fallthrough":{"kind":"missing"}
1669 "switch_right_brace":{
1677 "trailing_width":10,
1680 {"kind":"whitespace","text":" ","offset":454,"width":1},
1681 {"kind":"single_line_comment","text":"// error","offset":455,"width":8},
1682 {"kind":"end_of_line","text":"\n","offset":463,"width":1}
1689 "kind":"switch_statement",
1699 "leading":[{"kind":"whitespace","text":" ","offset":464,"width":2}],
1700 "trailing":[{"kind":"whitespace","text":" ","offset":472,"width":1}],
1704 "switch_left_paren":{
1718 "switch_expression":{
1720 "variable_expression":{
1735 "switch_right_paren":{
1745 "trailing":[{"kind":"whitespace","text":" ","offset":477,"width":1}],
1749 "switch_left_brace":{
1759 "trailing":[{"kind":"whitespace","text":" ","offset":479,"width":1}],
1767 "kind":"switch_section",
1768 "switch_section_labels":{"kind":"missing"},
1769 "switch_section_statements":{
1773 "kind":"expression_statement",
1774 "expression_statement_expression":{
1775 "kind":"function_call_expression",
1776 "function_call_receiver":{
1790 "function_call_type_args":{"kind":"missing"},
1791 "function_call_left_paren":{
1805 "function_call_argument_list":{"kind":"missing"},
1806 "function_call_right_paren":{
1821 "expression_statement_semicolon":{
1831 "trailing":[{"kind":"whitespace","text":" ","offset":486,"width":1}],
1837 "kind":"expression_statement",
1838 "expression_statement_expression":{
1839 "kind":"function_call_expression",
1840 "function_call_receiver":{
1854 "function_call_type_args":{"kind":"missing"},
1855 "function_call_left_paren":{
1869 "function_call_argument_list":{"kind":"missing"},
1870 "function_call_right_paren":{
1885 "expression_statement_semicolon":{
1895 "trailing":[{"kind":"whitespace","text":" ","offset":493,"width":1}],
1902 "switch_section_fallthrough":{"kind":"missing"}
1906 "switch_right_brace":{
1914 "trailing_width":10,
1917 {"kind":"whitespace","text":" ","offset":495,"width":1},
1918 {"kind":"single_line_comment","text":"// error","offset":496,"width":8},
1919 {"kind":"end_of_line","text":"\n","offset":504,"width":1}
1927 "compound_right_brace":{
1937 "trailing":[{"kind":"end_of_line","text":"\n","offset":506,"width":1}],
1944 "kind":"end_of_file",
1945 "end_of_file_token":{
1948 "kind":"end_of_file",
1963 "program_text":"<?hh\nfunction bar() : void {\n case 123: ; // error, outside switch\n default: ; // error, outside switch\n switch ($x) { case 123: ; default: break;} // no error\n break; // error\n while($a) {\n if ($b) break; // no error\n if ($c) continue; // no error\n $x = function($b) { break; }; // error\n }\n try {} catch (Exception $ex) {} // no error\n try {} finally {} // no error\n try {} // error\n switch ($x) { } // error\n switch ($x) { foo(); } // error\n switch ($x) { foo(); foo(); } // error\n}\n",
1964 "version":"2020-04-14-0002"