Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to ESM #2213

Merged
merged 8 commits into from
Aug 18, 2023
Merged

Migrate to ESM #2213

merged 8 commits into from
Aug 18, 2023

Conversation

fisker
Copy link
Member

@fisker fisker commented Aug 16, 2023

No description provided.

@fisker fisker changed the title Convert tests to ES Modules Migrate to ESM Aug 16, 2023
@fisker
Copy link
Member Author

fisker commented Aug 17, 2023

Standalone diff without minification
diff --git "a/E:\\projects\\@forks\\plugin-php\\standalone.esm.js" "b/E:\\projects\\@forks\\plugin-php\\standalone.js"
index 89f6c6c..56e9798 100644
--- "a/E:\\projects\\@forks\\plugin-php\\standalone.esm.js"
+++ "b/E:\\projects\\@forks\\plugin-php\\standalone.js"
@@ -4,42 +4,9 @@
   (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.prettierPlugins = global.prettierPlugins || {}, global.prettierPlugins.php = {}), global.prettier));
 })(this, (function (exports, prettier) { 'use strict';
 
-  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
-  function getDefaultExportFromCjs (x) {
-    return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
-  }
-
-  var PHP = {
-    "name": "PHP",
-    "type": "programming",
-    "tmScope": "text.html.php",
-    "aceMode": "php",
-    "codemirrorMode": "php",
-    "codemirrorMimeType": "application/x-httpd-php",
-    "color": "#4F5D95",
-    "extensions": [".php", ".aw", ".ctp", ".fcgi", ".inc", ".php3", ".php4", ".php5", ".phps", ".phpt"],
-    "filenames": [".php", ".php_cs", ".php_cs.dist", "Phakefile"],
-    "interpreters": ["php"],
-    "aliases": ["inc"],
-    "languageId": 272
-  };
-
-  var HTML_PHP = {
-    "name": "HTML+PHP",
-    "type": "markup",
-    "color": "#4f5d95",
-    "tmScope": "text.html.php",
-    "group": "HTML",
-    "extensions": [".phtml"],
-    "aceMode": "php",
-    "codemirrorMode": "php",
-    "codemirrorMimeType": "application/x-httpd-php",
-    "languageId": 151
-  };
+  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
 
-  var LINGUIST_LANGUAGES_PHP = PHP;
-  var LINGUIST_LANGUAGES_HTML_PHP = HTML_PHP;
+  var prettier__default = /*#__PURE__*/_interopDefaultLegacy(prettier);
 
   function ownKeys(object, enumerableOnly) {
     var keys = Object.keys(object);
@@ -569,8 +536,6 @@
     };
   }
 
-  var src = {exports: {}};
-
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
    * @authors https://github.com/glayzzle/php-parser/graphs/contributors
@@ -668,6 +633,9 @@
       throw new Error("Bad terminal sequence \"".concat(ch, "\" at line ").concat(this.yylineno, " (offset ").concat(this.offset, ")"));
     }
   };
+  attribute$1.attributeIndex;
+  attribute$1.attributeListDepth;
+  attribute$1.matchST_ATTRIBUTE;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -675,7 +643,7 @@
    * @url http://glayzzle.com
    */
 
-  var comments = {
+  var comments$1 = {
     /*
      * Reads a single line comment
      */
@@ -732,6 +700,8 @@
       return token;
     }
   };
+  comments$1.T_COMMENT;
+  comments$1.T_DOC_COMMENT;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -795,6 +765,8 @@
       }
     }
   };
+  initial.nextINITIAL;
+  initial.matchINITIAL;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -803,7 +775,6 @@
    */
   /* istanbul ignore else  */
 
-
   var MAX_LENGTH_OF_LONG = 10;
   var long_min_digits = "2147483648";
 
@@ -988,6 +959,11 @@
       return this.tok.T_LNUMBER;
     }
   };
+  numbers.consume_NUM;
+  numbers.consume_HNUM;
+  numbers.consume_LNUM;
+  numbers.consume_BNUM;
+  numbers.consume_ONUM;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -1079,6 +1055,9 @@
       }
     }
   };
+  property$1.matchST_LOOKING_FOR_PROPERTY;
+  property$1.matchST_LOOKING_FOR_VARNAME;
+  property$1.matchST_VAR_OFFSET;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -1214,6 +1193,8 @@
       return this.tok.T_WHITESPACE;
     }
   };
+  scripting.matchST_IN_SCRIPTING;
+  scripting.T_WHITESPACE;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -1756,6 +1737,16 @@
       return this.tok.T_ENCAPSED_AND_WHITESPACE;
     }
   };
+  strings.T_CONSTANT_ENCAPSED_STRING;
+  strings.is_HEREDOC;
+  strings.ST_DOUBLE_QUOTES;
+  strings.isDOC_MATCH;
+  strings.prematch_ENDOFDOC;
+  strings.matchST_NOWDOC;
+  strings.matchST_HEREDOC;
+  strings.consume_VARIABLE;
+  strings.matchST_BACKQUOTE;
+  strings.matchST_DOUBLE_QUOTES;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -1763,7 +1754,7 @@
    * @url http://glayzzle.com
    */
 
-  var tokens$3 = {
+  var tokens$2 = {
     T_STRING: function T_STRING() {
       var token = this.yytext.toLowerCase();
       var id = this.keywords[token];
@@ -2155,6 +2146,9 @@
       }
     }
   };
+  tokens$2.T_STRING;
+  tokens$2.consume_TOKEN;
+  tokens$2.tokenTerminals;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -2162,7 +2156,7 @@
    * @url http://glayzzle.com
    */
 
-  var tokens$2 = ";:,.\\[]()|^&+-/*=%!~$<>?@";
+  var tokens$1 = ";:,.\\[]()|^&+-/*=%!~$<>?@";
   var utils$1 = {
     // check if the char can be a numeric
     is_NUM: function is_NUM() {
@@ -2213,7 +2207,7 @@
     // check if current char is a token char
     is_TOKEN: function is_TOKEN() {
       var ch = this._input[this.offset - 1];
-      return tokens$2.indexOf(ch) !== -1;
+      return tokens$1.indexOf(ch) !== -1;
     },
     // check if current char is a whitespace
     is_WHITESPACE: function is_WHITESPACE() {
@@ -2265,6 +2259,17 @@
       return false;
     }
   };
+  utils$1.is_NUM;
+  utils$1.is_NUM_START;
+  utils$1.is_LABEL;
+  utils$1.is_LABEL_START;
+  utils$1.consume_LABEL;
+  utils$1.is_TOKEN;
+  utils$1.is_WHITESPACE;
+  utils$1.is_TABSPACE;
+  utils$1.consume_TABSPACE;
+  utils$1.is_HEX;
+  utils$1.is_OCTAL;
 
   /**
    * This is the php lexer. It will tokenize the string for helping the
@@ -2840,12 +2845,12 @@
   }; // extends the lexer with states
 
 
-  [attribute$1, comments, initial, numbers, property$1, scripting, strings, tokens$3, utils$1].forEach(function (ext) {
+  [attribute$1, comments$1, initial, numbers, property$1, scripting, strings, tokens$2, utils$1].forEach(function (ext) {
     for (var k in ext) {
       Lexer.prototype[k] = ext[k];
     }
   });
-  var lexer$1 = Lexer;
+  var lexer = Lexer;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -2861,14 +2866,13 @@
    * @property {number} offset
    */
 
-
-  var Position$2 = function Position(line, column, offset) {
+  var Position = function Position(line, column, offset) {
     this.line = line;
     this.column = column;
     this.offset = offset;
   };
 
-  var position = Position$2;
+  var position = Position;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -2981,7 +2985,15 @@
       return entry(key, value, byRef, unpack);
     }
   };
+  array$1.read_array;
+  array$1.read_array_pair_list;
+  array$1.read_array_pair;
 
+  /**
+   * Copyright (C) 2018 Glayzzle (BSD3 License)
+   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
+   * @url http://glayzzle.com
+   */
   var _class$1 = {
     /*
      * reading a class
@@ -3297,25 +3309,25 @@
 
     /*
      * optional_type:
-     *    /- empty -/  { $$ = NULL; }
-     *   |  type_expr  { $$ = $1; }
+     *	  /- empty -/	{ $$ = NULL; }
+     *   |	type_expr	{ $$ = $1; }
      * ;
      *
      * type_expr:
-     *    type    { $$ = $1; }
-     *  |  '?' type  { $$ = $2; $$->attr |= ZEND_TYPE_NULLABLE; }
-     *  |  union_type  { $$ = $1; }
+     *		type		{ $$ = $1; }
+     *	|	'?' type	{ $$ = $2; $$->attr |= ZEND_TYPE_NULLABLE; }
+     *	|	union_type	{ $$ = $1; }
      * ;
      *
      * type:
-     *     T_ARRAY    { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_ARRAY); }
-     *   |  T_CALLABLE  { $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_CALLABLE); }
-     *   |  name    { $$ = $1; }
+     * 		T_ARRAY		{ $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_ARRAY); }
+     * 	|	T_CALLABLE	{ $$ = zend_ast_create_ex(ZEND_AST_TYPE, IS_CALLABLE); }
+     * 	|	name		{ $$ = $1; }
      * ;
      *
      * union_type:
-     *     type '|' type       { $$ = zend_ast_create_list(2, ZEND_AST_TYPE_UNION, $1, $3); }
-     *   |  union_type '|' type { $$ = zend_ast_list_add($1, $3); }
+     * 		type '|' type       { $$ = zend_ast_create_list(2, ZEND_AST_TYPE_UNION, $1, $3); }
+     * 	|	union_type '|' type { $$ = zend_ast_list_add($1, $3); }
      * ;
      */
     read_optional_type: function read_optional_type() {
@@ -3575,6 +3587,19 @@
       return node("traitalias", trait, method, null, null);
     }
   };
+  _class$1.read_class_declaration_statement;
+  _class$1.read_class_modifiers;
+  _class$1.read_class_modifier;
+  _class$1.read_class_body;
+  _class$1.read_variable_list;
+  _class$1.read_constant_list;
+  _class$1.read_member_flags;
+  _class$1.read_optional_type;
+  _class$1.read_interface_declaration_statement;
+  _class$1.read_interface_body;
+  _class$1.read_trait_declaration_statement;
+  _class$1.read_trait_use_statement;
+  _class$1.read_trait_use_alias;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -3616,6 +3641,8 @@
       return result;
     }
   };
+  comment$1.read_comment;
+  comment$1.read_doc_comment;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -4278,17 +4305,17 @@
     /*
      *
      * inline_function:
-     *     function returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars return_type
-     *     backup_fn_flags '{' inner_statement_list '}' backup_fn_flags
-     *       { $$ = zend_ast_create_decl(ZEND_AST_CLOSURE, $2 | $13, $1, $3,
-     *           zend_string_init("{closure}", sizeof("{closure}") - 1, 0),
-     *           $5, $7, $11, $8); CG(extra_fn_flags) = $9; }
-     *   |  fn returns_ref '(' parameter_list ')' return_type backup_doc_comment T_DOUBLE_ARROW backup_fn_flags backup_lex_pos expr backup_fn_flags
-     *       { $$ = zend_ast_create_decl(ZEND_AST_ARROW_FUNC, $2 | $12, $1, $7,
-     *           zend_string_init("{closure}", sizeof("{closure}") - 1, 0), $4, NULL,
-     *           zend_ast_create(ZEND_AST_RETURN, $11), $6);
-     *           ((zend_ast_decl *) $$)->lex_pos = $10;
-     *           CG(extra_fn_flags) = $9; }   *
+     * 		function returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars return_type
+     * 		backup_fn_flags '{' inner_statement_list '}' backup_fn_flags
+     * 			{ $$ = zend_ast_create_decl(ZEND_AST_CLOSURE, $2 | $13, $1, $3,
+     * 				  zend_string_init("{closure}", sizeof("{closure}") - 1, 0),
+     * 				  $5, $7, $11, $8); CG(extra_fn_flags) = $9; }
+     * 	|	fn returns_ref '(' parameter_list ')' return_type backup_doc_comment T_DOUBLE_ARROW backup_fn_flags backup_lex_pos expr backup_fn_flags
+     * 			{ $$ = zend_ast_create_decl(ZEND_AST_ARROW_FUNC, $2 | $12, $1, $7,
+     * 				  zend_string_init("{closure}", sizeof("{closure}") - 1, 0), $4, NULL,
+     * 				  zend_ast_create(ZEND_AST_RETURN, $11), $6);
+     * 				  ((zend_ast_decl *) $$)->lex_pos = $10;
+     * 				  CG(extra_fn_flags) = $9; }   *
      */
     read_inline_function: function read_inline_function(flags, attrs) {
       if (this.token === this.tok.T_FUNCTION) {
@@ -4525,6 +4552,26 @@
       return expr;
     }
   };
+  expr.read_expr;
+  expr.read_expr_cast;
+  expr.read_isset_variable;
+  expr.read_isset_variables;
+  expr.read_internal_functions_in_yacc;
+  expr.read_optional_expr;
+  expr.read_exit_expr;
+  expr.read_expr_item;
+  expr.convertToList;
+  expr.read_assignref;
+  expr.read_inline_function;
+  expr.read_match_expression;
+  expr.read_match_arms;
+  expr.read_match_arm;
+  expr.read_match_arm_conds;
+  expr.read_attribute;
+  expr.read_attr_list;
+  expr.read_new_expr;
+  expr.read_new_class_name;
+  expr.handleDereferencable;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -4578,6 +4625,9 @@
       return result(caseName, value);
     }
   };
+  _enum$1.read_enum_declaration_statement;
+  _enum$1.read_enum_value_type;
+  _enum$1.read_enum_case;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -5069,6 +5119,22 @@
       return null;
     }
   };
+  _function$1.is_reference;
+  _function$1.is_variadic;
+  _function$1.read_function;
+  _function$1.read_function_declaration;
+  _function$1.read_lexical_vars;
+  _function$1.read_list_with_dangling_comma;
+  _function$1.read_lexical_var_list;
+  _function$1.read_lexical_var;
+  _function$1.read_parameter_list;
+  _function$1.read_parameter;
+  _function$1.read_types;
+  _function$1.read_promoted;
+  _function$1.read_argument_list;
+  _function$1.read_non_empty_argument_list;
+  _function$1.read_argument;
+  _function$1.read_type;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -5176,6 +5242,10 @@
       return body(null, items);
     }
   };
+  _if$1.read_if;
+  _if$1.read_if_expr;
+  _if$1.read_elseif_short;
+  _if$1.read_else_short;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -5360,6 +5430,11 @@
       }
     }
   };
+  loops.read_while;
+  loops.read_do;
+  loops.read_for;
+  loops.read_foreach;
+  loops.read_foreach_variable;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -5381,6 +5456,7 @@
       }
     }
   };
+  main.read_start;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -5620,6 +5696,14 @@
       return null;
     }
   };
+  namespace$1.read_namespace;
+  namespace$1.read_namespace_name;
+  namespace$1.read_use_statement;
+  namespace$1.read_class_name_reference;
+  namespace$1.read_use_declaration;
+  namespace$1.read_use_declarations;
+  namespace$1.read_use_alias;
+  namespace$1.read_use_type;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -6075,6 +6159,15 @@
       return result(name.toUpperCase(), name);
     }
   };
+  scalar.resolve_special_chars;
+  scalar.remove_heredoc_leading_whitespace_chars;
+  scalar.check_heredoc_indentation_level;
+  scalar.read_dereferencable_scalar;
+  scalar.read_scalar;
+  scalar.read_dereferencable;
+  scalar.read_encapsed_string_item;
+  scalar.read_encapsed_string;
+  scalar.get_magic_constant;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -6578,6 +6671,14 @@
       return result(null, body);
     }
   };
+  statement$1.read_top_statements;
+  statement$1.read_top_statement;
+  statement$1.read_inner_statements;
+  statement$1.read_const_list;
+  statement$1.read_declare_list;
+  statement$1.read_inner_statement;
+  statement$1.read_statement;
+  statement$1.read_code_block;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -6681,6 +6782,9 @@
       return result(test, body(null, items));
     }
   };
+  _switch$1.read_switch;
+  _switch$1.read_switch_case_list;
+  _switch$1.read_case_list;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -6728,6 +6832,7 @@
       return result(body, catches, always);
     }
   };
+  _try$1.read_try;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -6946,6 +7051,15 @@
       return null;
     }
   };
+  utils.read_short_form;
+  utils.read_function_list;
+  utils.read_list;
+  utils.read_name_list;
+  utils.read_byref;
+  utils.read_variable_declarations;
+  utils.read_extends_from;
+  utils.read_interface_extends_list;
+  utils.read_implements_list;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -7311,18 +7425,19 @@
       return result;
     }
   };
+  variable$1.read_variable;
+  variable$1.read_static_getter;
+  variable$1.read_what;
+  variable$1.recursive_variable_chain_scan;
+  variable$1.read_encaps_var_offset;
+  variable$1.read_reference_variable;
+  variable$1.read_simple_variable;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Position$1 = position;
   /**
    * @private
    */
 
+
   function isNumber(n) {
     return n != "." && n != "," && !isNaN(parseFloat(n)) && isFinite(n);
   }
@@ -7529,7 +7644,7 @@
 
 
   Parser.prototype.position = function () {
-    return new Position$1(this.lexer.yylloc.first_line, this.lexer.yylloc.first_column, this.lexer.yylloc.first_offset);
+    return new position(this.lexer.yylloc.first_line, this.lexer.yylloc.first_column, this.lexer.yylloc.first_offset);
   };
   /**
    * Creates a new AST node
@@ -7846,13 +7961,10 @@
   var parser$1 = Parser;
 
   /**
-   * @readonly
-   * @memberOf module:php-parser
-   *
-   * @enum {number}
-   **/
-
-
+   * Copyright (C) 2018 Glayzzle (BSD3 License)
+   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
+   * @url http://glayzzle.com
+   */
   var TokenNames = {
     T_HALT_COMPILER: 101,
     T_USE: 102,
@@ -8008,7 +8120,7 @@
    * @property {TokenNames} names
    */
 
-  var tokens$1 = {
+  var tokens = {
     values: Object.entries(TokenNames).reduce(function (result, _ref) {
       var _ref2 = _slicedToArray(_ref, 2),
           key = _ref2[0],
@@ -8018,7 +8130,7 @@
     }, {}),
     names: TokenNames
   };
-  var tokens_1 = Object.freeze(tokens$1);
+  var tokens_1$1 = Object.freeze(tokens);
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -8034,14 +8146,13 @@
    * @property {Position} end
    */
 
-
-  var Location$1 = function Location(source, start, end) {
+  var Location = function Location(source, start, end) {
     this.source = source;
     this.start = start;
     this.end = end;
   };
 
-  var location = Location$1;
+  var location_1 = Location;
 
   /**
    * Copyright (C) 2018 Glayzzle (BSD3 License)
@@ -8058,8 +8169,7 @@
    * @property {string} kind
    */
 
-
-  var Node$i = function Node(kind, docs, location) {
+  var Node = function Node(kind, docs, location) {
     this.kind = kind;
 
     if (docs) {
@@ -8078,7 +8188,7 @@
    */
 
 
-  Node$i.prototype.setTrailingComments = function (docs) {
+  Node.prototype.setTrailingComments = function (docs) {
     this.trailingComments = docs;
   };
   /**
@@ -8088,7 +8198,7 @@
    */
 
 
-  Node$i.prototype.destroy = function (node) {
+  Node.prototype.destroy = function (node) {
     if (!node) {
       /* istanbul ignore next */
       throw new Error("Node already initialized, you must swap with another node");
@@ -8120,7 +8230,7 @@
    */
 
 
-  Node$i.prototype.includeToken = function (parser) {
+  Node.prototype.includeToken = function (parser) {
     if (this.loc) {
       if (this.loc.end) {
         this.loc.end.line = parser.lexer.yylloc.last_line;
@@ -8145,7 +8255,7 @@
    */
 
 
-  Node$i.extends = function (type, constructor) {
+  Node.extends = function (type, constructor) {
     constructor.prototype = Object.create(this.prototype);
     constructor.extends = this.extends;
     constructor.prototype.constructor = constructor;
@@ -8153,15 +8263,8 @@
     return constructor;
   };
 
-  var node = Node$i;
-
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
+  var node = Node;
 
-  var Node$h = node;
   var KIND$1K = "expression";
   /**
    * Any expression node. Since the left-hand side of an assignment may
@@ -8171,17 +8274,10 @@
    * @extends {Node}
    */
 
-  var expression = Node$h.extends(KIND$1K, function Expression(kind, docs, location) {
-    Node$h.apply(this, [kind || KIND$1K, docs, location]);
+  var expression = node.extends(KIND$1K, function Expression(kind, docs, location) {
+    node.apply(this, [kind || KIND$1K, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expr$2 = expression;
   var KIND$1J = "array";
   /**
    * Defines an array structure
@@ -8210,19 +8306,12 @@
    * @property {boolean} shortForm Indicate if the short array syntax is used, ex `[]` instead `array()`
    */
 
-  var array = Expr$2.extends(KIND$1J, function Array(shortForm, items, docs, location) {
-    Expr$2.apply(this, [KIND$1J, docs, location]);
+  var array = expression.extends(KIND$1J, function Array(shortForm, items, docs, location) {
+    expression.apply(this, [KIND$1J, docs, location]);
     this.items = items;
     this.shortForm = shortForm;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$q = expression;
   var KIND$1I = "arrowfunc";
   /**
    * Defines an arrow function (it's like a closure)
@@ -8237,8 +8326,8 @@
    * @property {boolean} isStatic
    */
 
-  var arrowfunc = Expression$q.extends(KIND$1I, function Closure(args, byref, body, type, nullable, isStatic, docs, location) {
-    Expression$q.apply(this, [KIND$1I, docs, location]);
+  var arrowfunc = expression.extends(KIND$1I, function Closure(args, byref, body, type, nullable, isStatic, docs, location) {
+    expression.apply(this, [KIND$1I, docs, location]);
     this.arguments = args;
     this.byref = byref;
     this.body = body;
@@ -8247,13 +8336,6 @@
     this.isStatic = isStatic || false;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$p = expression;
   var KIND$1H = "assign";
   /**
    * Assigns a value to the specified target
@@ -8265,20 +8347,13 @@
    * @property {String} operator
    */
 
-  var assign = Expression$p.extends(KIND$1H, function Assign(left, right, operator, docs, location) {
-    Expression$p.apply(this, [KIND$1H, docs, location]);
+  var assign = expression.extends(KIND$1H, function Assign(left, right, operator, docs, location) {
+    expression.apply(this, [KIND$1H, docs, location]);
     this.left = left;
     this.right = right;
     this.operator = operator;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$o = expression;
   var KIND$1G = "assignref";
   /**
    * Assigns a value to the specified target
@@ -8290,19 +8365,12 @@
    * @property {String} operator
    */
 
-  var assignref = Expression$o.extends(KIND$1G, function AssignRef(left, right, docs, location) {
-    Expression$o.apply(this, [KIND$1G, docs, location]);
+  var assignref = expression.extends(KIND$1G, function AssignRef(left, right, docs, location) {
+    expression.apply(this, [KIND$1G, docs, location]);
     this.left = left;
     this.right = right;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$g = node;
   var KIND$1F = "attribute";
   /**
    * Attribute Value
@@ -8313,19 +8381,12 @@
    * @property {Parameter[]} args
    */
 
-  var attribute = Node$g.extends(KIND$1F, function Attribute(name, args, docs, location) {
-    Node$g.apply(this, [KIND$1F, docs, location]);
+  var attribute = node.extends(KIND$1F, function Attribute(name, args, docs, location) {
+    node.apply(this, [KIND$1F, docs, location]);
     this.name = name;
     this.args = args;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$f = node;
   var KIND$1E = "attrgroup";
   /**
    * Attribute group
@@ -8335,18 +8396,11 @@
    * @property {Attribute[]} attrs
    */
 
-  var attrgroup = Node$f.extends(KIND$1E, function AttrGroup(attrs, docs, location) {
-    Node$f.apply(this, [KIND$1E, docs, location]);
+  var attrgroup = node.extends(KIND$1E, function AttrGroup(attrs, docs, location) {
+    node.apply(this, [KIND$1E, docs, location]);
     this.attrs = attrs || [];
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expr$1 = expression;
   var KIND$1D = "operation";
   /**
    * Defines binary operations
@@ -8355,17 +8409,10 @@
    * @extends {Expression}
    */
 
-  var operation = Expr$1.extends(KIND$1D, function Operation(kind, docs, location) {
-    Expr$1.apply(this, [kind || KIND$1D, docs, location]);
+  var operation = expression.extends(KIND$1D, function Operation(kind, docs, location) {
+    expression.apply(this, [kind || KIND$1D, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Operation$4 = operation;
   var KIND$1C = "bin";
   /**
    * Binary operations
@@ -8377,20 +8424,13 @@
    * @property {Expression} right
    */
 
-  var bin = Operation$4.extends(KIND$1C, function Bin(type, left, right, docs, location) {
-    Operation$4.apply(this, [KIND$1C, docs, location]);
+  var bin = operation.extends(KIND$1C, function Bin(type, left, right, docs, location) {
+    operation.apply(this, [KIND$1C, docs, location]);
     this.type = type;
     this.left = left;
     this.right = right;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$e = node;
   var KIND$1B = "statement";
   /**
    * Any statement.
@@ -8399,17 +8439,10 @@
    * @extends {Node}
    */
 
-  var statement = Node$e.extends(KIND$1B, function Statement(kind, docs, location) {
-    Node$e.apply(this, [kind || KIND$1B, docs, location]);
+  var statement = node.extends(KIND$1B, function Statement(kind, docs, location) {
+    node.apply(this, [kind || KIND$1B, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$r = statement;
   var KIND$1A = "block";
   /**
    * A block statement, i.e., a sequence of statements surrounded by braces.
@@ -8419,18 +8452,11 @@
    * @property {Node[]} children
    */
 
-  var block = Statement$r.extends(KIND$1A, function Block(kind, children, docs, location) {
-    Statement$r.apply(this, [kind || KIND$1A, docs, location]);
+  var block = statement.extends(KIND$1A, function Block(kind, children, docs, location) {
+    statement.apply(this, [kind || KIND$1A, docs, location]);
     this.children = children.filter(Boolean);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$n = expression;
   var KIND$1z = "literal";
   /**
    * Defines an array structure
@@ -8441,8 +8467,8 @@
    * @property {EncapsedPart[]|Node|string|number|boolean|null} value
    */
 
-  var literal = Expression$n.extends(KIND$1z, function Literal(kind, value, raw, docs, location) {
-    Expression$n.apply(this, [kind || KIND$1z, docs, location]);
+  var literal = expression.extends(KIND$1z, function Literal(kind, value, raw, docs, location) {
+    expression.apply(this, [kind || KIND$1z, docs, location]);
     this.value = value;
 
     if (raw) {
@@ -8450,13 +8476,6 @@
     }
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Literal$6 = literal;
   var KIND$1y = "boolean";
   /**
    * Defines a boolean value (true/false)
@@ -8466,17 +8485,10 @@
    * @property {boolean} value
    */
 
-  var boolean = Literal$6.extends(KIND$1y, function Boolean(value, raw, docs, location) {
-    Literal$6.apply(this, [KIND$1y, value, raw, docs, location]);
+  var boolean_1 = literal.extends(KIND$1y, function Boolean(value, raw, docs, location) {
+    literal.apply(this, [KIND$1y, value, raw, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$q = statement;
   var KIND$1x = "break";
   /**
    * A break statement
@@ -8486,18 +8498,11 @@
    * @property {Number|Null} level
    */
 
-  var _break = Statement$q.extends(KIND$1x, function Break(level, docs, location) {
-    Statement$q.apply(this, [KIND$1x, docs, location]);
+  var _break = statement.extends(KIND$1x, function Break(level, docs, location) {
+    statement.apply(this, [KIND$1x, docs, location]);
     this.level = level;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$m = expression;
   var KIND$1w = "byref";
   /**
    * Passing by Reference - so the function can modify the variable
@@ -8507,18 +8512,11 @@
    * @property {ExpressionStatement} what
    */
 
-  var byref = Expression$m.extends(KIND$1w, function ByRef(what, docs, location) {
-    Expression$m.apply(this, [KIND$1w, docs, location]);
+  var byref = expression.extends(KIND$1w, function ByRef(what, docs, location) {
+    expression.apply(this, [KIND$1w, docs, location]);
     this.what = what;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$l = expression;
   var KIND$1v = "call";
   /**
    * Executes a call statement
@@ -8529,19 +8527,12 @@
    * @property {Expression[]} arguments
    */
 
-  var call = Expression$l.extends(KIND$1v, function Call(what, args, docs, location) {
-    Expression$l.apply(this, [KIND$1v, docs, location]);
+  var call = expression.extends(KIND$1v, function Call(what, args, docs, location) {
+    expression.apply(this, [KIND$1v, docs, location]);
     this.what = what;
     this.arguments = args;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$p = statement;
   var KIND$1u = "case";
   /**
    * A switch case statement
@@ -8552,19 +8543,12 @@
    * @property {Block|null} body
    */
 
-  var _case = Statement$p.extends(KIND$1u, function Case(test, body, docs, location) {
-    Statement$p.apply(this, [KIND$1u, docs, location]);
+  var _case = statement.extends(KIND$1u, function Case(test, body, docs, location) {
+    statement.apply(this, [KIND$1u, docs, location]);
     this.test = test;
     this.body = body;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Operation$3 = operation;
   var KIND$1t = "cast";
   /**
    * Binary operations
@@ -8576,20 +8560,13 @@
    * @property {Expression} expr
    */
 
-  var cast = Operation$3.extends(KIND$1t, function Cast(type, raw, expr, docs, location) {
-    Operation$3.apply(this, [KIND$1t, docs, location]);
+  var cast = operation.extends(KIND$1t, function Cast(type, raw, expr, docs, location) {
+    operation.apply(this, [KIND$1t, docs, location]);
     this.type = type;
     this.raw = raw;
     this.expr = expr;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$o = statement;
   var KIND$1s = "catch";
   /**
    * Defines a catch statement
@@ -8602,20 +8579,13 @@
    * @see http://php.net/manual/en/language.exceptions.php
    */
 
-  var _catch = Statement$o.extends(KIND$1s, function Catch(body, what, variable, docs, location) {
-    Statement$o.apply(this, [KIND$1s, docs, location]);
+  var _catch = statement.extends(KIND$1s, function Catch(body, what, variable, docs, location) {
+    statement.apply(this, [KIND$1s, docs, location]);
     this.body = body;
     this.what = what;
     this.variable = variable;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$n = statement;
   var KIND$1r = "declaration";
   var IS_UNDEFINED$3 = "";
   var IS_PUBLIC$3 = "public";
@@ -8629,8 +8599,8 @@
    * @property {Identifier|string} name
    */
 
-  var Declaration$8 = Statement$n.extends(KIND$1r, function Declaration(kind, name, docs, location) {
-    Statement$n.apply(this, [kind || KIND$1r, docs, location]);
+  var Declaration = statement.extends(KIND$1r, function Declaration(kind, name, docs, location) {
+    statement.apply(this, [kind || KIND$1r, docs, location]);
     this.name = name;
   });
   /**
@@ -8642,7 +8612,7 @@
    * @return {void}
    */
 
-  Declaration$8.prototype.parseFlags = function (flags) {
+  Declaration.prototype.parseFlags = function (flags) {
     this.isAbstract = flags[2] === 1;
     this.isFinal = flags[2] === 2;
     this.isReadonly = flags[3] === 1;
@@ -8665,15 +8635,8 @@
     }
   };
 
-  var declaration = Declaration$8;
-
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
+  var declaration = Declaration;
 
-  var Declaration$7 = declaration;
   var KIND$1q = "class";
   /**
    * A class definition
@@ -8690,8 +8653,8 @@
    * @property {AttrGroup[]} attrGroups
    */
 
-  var _class = Declaration$7.extends(KIND$1q, function Class(name, ext, impl, body, flags, docs, location) {
-    Declaration$7.apply(this, [KIND$1q, name, docs, location]);
+  var _class = declaration.extends(KIND$1q, function Class(name, ext, impl, body, flags, docs, location) {
+    declaration.apply(this, [KIND$1q, name, docs, location]);
     this.isAnonymous = name ? false : true;
     this.extends = ext;
     this.implements = impl;
@@ -8700,13 +8663,6 @@
     this.parseFlags(flags);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$m = statement;
   var KIND$1p = "constantstatement";
   /**
    * Declares a constants into the current scope
@@ -8716,18 +8672,11 @@
    * @property {Constant[]} constants
    */
 
-  var constantstatement = Statement$m.extends(KIND$1p, function ConstantStatement(kind, constants, docs, location) {
-    Statement$m.apply(this, [kind || KIND$1p, docs, location]);
+  var constantstatement = statement.extends(KIND$1p, function ConstantStatement(kind, constants, docs, location) {
+    statement.apply(this, [kind || KIND$1p, docs, location]);
     this.constants = constants;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var ConstantStatement = constantstatement;
   var KIND$1o = "classconstant";
   var IS_UNDEFINED$2 = "";
   var IS_PUBLIC$2 = "public";
@@ -8743,8 +8692,8 @@
    * @property {AttrGroup[]} attrGroups
    */
 
-  var ClassConstant = ConstantStatement.extends(KIND$1o, function ClassConstant(kind, constants, flags, attrGroups, docs, location) {
-    ConstantStatement.apply(this, [kind || KIND$1o, constants, docs, location]);
+  var ClassConstant = constantstatement.extends(KIND$1o, function ClassConstant(kind, constants, flags, attrGroups, docs, location) {
+    constantstatement.apply(this, [kind || KIND$1o, constants, docs, location]);
     this.parseFlags(flags);
     this.attrGroups = attrGroups;
   });
@@ -8776,13 +8725,6 @@
 
   var classconstant = ClassConstant;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$k = expression;
   var KIND$1n = "clone";
   /**
    * Defines a clone call
@@ -8792,18 +8734,11 @@
    * @property {Expression} what
    */
 
-  var clone = Expression$k.extends(KIND$1n, function Clone(what, docs, location) {
-    Expression$k.apply(this, [KIND$1n, docs, location]);
+  var clone = expression.extends(KIND$1n, function Clone(what, docs, location) {
+    expression.apply(this, [KIND$1n, docs, location]);
     this.what = what;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$j = expression;
   var KIND$1m = "closure";
   /**
    * Defines a closure
@@ -8820,8 +8755,8 @@
    * @property {AttrGroup[]} attrGroups
    */
 
-  var closure = Expression$j.extends(KIND$1m, function Closure(args, byref, uses, type, nullable, isStatic, docs, location) {
-    Expression$j.apply(this, [KIND$1m, docs, location]);
+  var closure = expression.extends(KIND$1m, function Closure(args, byref, uses, type, nullable, isStatic, docs, location) {
+    expression.apply(this, [KIND$1m, docs, location]);
     this.uses = uses;
     this.arguments = args;
     this.byref = byref;
@@ -8832,13 +8767,6 @@
     this.attrGroups = [];
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$d = node;
   /**
    * Abstract documentation node (ComentLine or CommentBlock)
    * @constructor Comment
@@ -8847,18 +8775,12 @@
    * @property {String} value
    */
 
-  var comment = Node$d.extends("comment", function Comment(kind, value, docs, location) {
-    Node$d.apply(this, [kind, docs, location]);
+
+  var comment = node.extends("comment", function Comment(kind, value, docs, location) {
+    node.apply(this, [kind, docs, location]);
     this.value = value;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Comment$1 = comment;
   var KIND$1l = "commentblock";
   /**
    * A comment block (multiline)
@@ -8867,17 +8789,10 @@
    * @extends {Comment}
    */
 
-  var commentblock = Comment$1.extends(KIND$1l, function CommentBlock(value, docs, location) {
-    Comment$1.apply(this, [KIND$1l, value, docs, location]);
+  var commentblock = comment.extends(KIND$1l, function CommentBlock(value, docs, location) {
+    comment.apply(this, [KIND$1l, value, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Comment = comment;
   var KIND$1k = "commentline";
   /**
    * A single line comment
@@ -8886,17 +8801,10 @@
    * @extends {Comment}
    */
 
-  var commentline = Comment.extends(KIND$1k, function CommentLine(value, docs, location) {
-    Comment.apply(this, [KIND$1k, value, docs, location]);
+  var commentline = comment.extends(KIND$1k, function CommentLine(value, docs, location) {
+    comment.apply(this, [KIND$1k, value, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$c = node;
   var KIND$1j = "constant";
   /**
    * Defines a constant
@@ -8907,19 +8815,12 @@
    * @property {Node|string|number|boolean|null} value
    */
 
-  var constant = Node$c.extends(KIND$1j, function Constant(name, value, docs, location) {
-    Node$c.apply(this, [KIND$1j, docs, location]);
+  var constant = node.extends(KIND$1j, function Constant(name, value, docs, location) {
+    node.apply(this, [KIND$1j, docs, location]);
     this.name = name;
     this.value = value;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$l = statement;
   var KIND$1i = "continue";
   /**
    * A continue statement
@@ -8929,18 +8830,11 @@
    * @property {number|null} level
    */
 
-  var _continue = Statement$l.extends(KIND$1i, function Continue(level, docs, location) {
-    Statement$l.apply(this, [KIND$1i, docs, location]);
+  var _continue = statement.extends(KIND$1i, function Continue(level, docs, location) {
+    statement.apply(this, [KIND$1i, docs, location]);
     this.level = level;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Block$2 = block;
   var KIND$1h = "declare";
   /**
    * The declare construct is used to set execution directives for a block of code
@@ -8952,8 +8846,8 @@
    * @see http://php.net/manual/en/control-structures.declare.php
    */
 
-  var Declare = Block$2.extends(KIND$1h, function Declare(directives, body, mode, docs, location) {
-    Block$2.apply(this, [KIND$1h, body, docs, location]);
+  var Declare = block.extends(KIND$1h, function Declare(directives, body, mode, docs, location) {
+    block.apply(this, [KIND$1h, body, docs, location]);
     this.directives = directives;
     this.mode = mode;
   });
@@ -9001,13 +8895,6 @@
   Declare.MODE_NONE = "none";
   var declare = Declare;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$b = node;
   var KIND$1g = "declaredirective";
   /**
    * Defines a constant
@@ -9018,20 +8905,13 @@
    * @property {Node|string|number|boolean|null} value
    */
 
-  var declaredirective = Node$b.extends(KIND$1g, function DeclareDirective(key, value, docs, location) {
-    Node$b.apply(this, [KIND$1g, docs, location]);
+  var declaredirective = node.extends(KIND$1g, function DeclareDirective(key, value, docs, location) {
+    node.apply(this, [KIND$1g, docs, location]);
     this.key = key;
     this.value = value;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$k = statement;
-  var KIND$1f = "do";
+  var KIND$1f = "do";
   /**
    * Defines a do/while statement
    * @constructor Do
@@ -9041,19 +8921,12 @@
    * @property {Block | null} body
    */
 
-  var _do = Statement$k.extends(KIND$1f, function Do(test, body, docs, location) {
-    Statement$k.apply(this, [KIND$1f, docs, location]);
+  var _do = statement.extends(KIND$1f, function Do(test, body, docs, location) {
+    statement.apply(this, [KIND$1f, docs, location]);
     this.test = test;
     this.body = body;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$j = statement;
   var KIND$1e = "echo";
   /**
    * Defines system based call
@@ -9064,19 +8937,12 @@
    * @extends {Statement}
    */
 
-  var echo = Statement$j.extends(KIND$1e, function Echo(expressions, shortForm, docs, location) {
-    Statement$j.apply(this, [KIND$1e, docs, location]);
+  var echo = statement.extends(KIND$1e, function Echo(expressions, shortForm, docs, location) {
+    statement.apply(this, [KIND$1e, docs, location]);
     this.shortForm = shortForm;
     this.expressions = expressions;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$i = expression;
   var KIND$1d = "empty";
   /**
    * Defines an empty check call
@@ -9085,18 +8951,11 @@
    * @extends {Expression}
    */
 
-  var empty = Expression$i.extends(KIND$1d, function Empty(expression, docs, location) {
-    Expression$i.apply(this, [KIND$1d, docs, location]);
-    this.expression = expression;
+  var empty = expression.extends(KIND$1d, function Empty(expression$1, docs, location) {
+    expression.apply(this, [KIND$1d, docs, location]);
+    this.expression = expression$1;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Literal$5 = literal;
   var KIND$1c = "encapsed";
   /**
    * Defines an encapsed string (contains expressions)
@@ -9108,8 +8967,8 @@
    * @property {EncapsedPart[]} value
    */
 
-  var Encapsed = Literal$5.extends(KIND$1c, function Encapsed(value, raw, type, docs, location) {
-    Literal$5.apply(this, [KIND$1c, value, raw, docs, location]);
+  var Encapsed = literal.extends(KIND$1c, function Encapsed(value, raw, type, docs, location) {
+    literal.apply(this, [KIND$1c, value, raw, docs, location]);
     this.type = type;
   });
   /**
@@ -9161,13 +9020,6 @@
   Encapsed.TYPE_OFFSET = "offset";
   var encapsed = Encapsed;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$h = expression;
   var KIND$1b = "encapsedpart";
   /**
    * Part of `Encapsed` node
@@ -9179,20 +9031,13 @@
    * @property {Boolean} curly
    */
 
-  var encapsedpart = Expression$h.extends(KIND$1b, function EncapsedPart(expression, syntax, curly, docs, location) {
-    Expression$h.apply(this, [KIND$1b, docs, location]);
-    this.expression = expression;
+  var encapsedpart = expression.extends(KIND$1b, function EncapsedPart(expression$1, syntax, curly, docs, location) {
+    expression.apply(this, [KIND$1b, docs, location]);
+    this.expression = expression$1;
     this.syntax = syntax;
     this.curly = curly;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$g = expression;
   var KIND$1a = "entry";
   /**
    * An array entry - see [Array](#array)
@@ -9205,21 +9050,14 @@
    * @property {Boolean} unpack Argument unpacking
    */
 
-  var entry = Expression$g.extends(KIND$1a, function Entry(key, value, byRef, unpack, docs, location) {
-    Expression$g.apply(this, [KIND$1a, docs, location]);
+  var entry = expression.extends(KIND$1a, function Entry(key, value, byRef, unpack, docs, location) {
+    expression.apply(this, [KIND$1a, docs, location]);
     this.key = key;
     this.value = value;
     this.byRef = byRef;
     this.unpack = unpack;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Declaration$6 = declaration;
   var KIND$19 = "enum";
   /**
    * A enum definition
@@ -9232,21 +9070,14 @@
    * @property {AttrGroup[]} attrGroups
    */
 
-  var _enum = Declaration$6.extends(KIND$19, function Enum(name, valueType, impl, body, docs, location) {
-    Declaration$6.apply(this, [KIND$19, name, docs, location]);
+  var _enum = declaration.extends(KIND$19, function Enum(name, valueType, impl, body, docs, location) {
+    declaration.apply(this, [KIND$19, name, docs, location]);
     this.valueType = valueType;
     this.implements = impl;
     this.body = body;
     this.attrGroups = [];
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$a = node;
   var KIND$18 = "enumcase";
   /**
    * Declares a cases into the current scope
@@ -9257,19 +9088,12 @@
    * @property {string|number|null} value
    */
 
-  var enumcase = Node$a.extends(KIND$18, function EnumCase(name, value, docs, location) {
-    Node$a.apply(this, [KIND$18, docs, location]);
+  var enumcase = node.extends(KIND$18, function EnumCase(name, value, docs, location) {
+    node.apply(this, [KIND$18, docs, location]);
     this.name = name;
     this.value = value;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$9 = node;
   var KIND$17 = "error";
   /**
    * Defines an error node (used only on silentMode)
@@ -9282,21 +9106,14 @@
    * @property {string|array} expected
    */
 
-  var error = Node$9.extends(KIND$17, function Error(message, token, line, expected, docs, location) {
-    Node$9.apply(this, [KIND$17, docs, location]);
+  var error = node.extends(KIND$17, function Error(message, token, line, expected, docs, location) {
+    node.apply(this, [KIND$17, docs, location]);
     this.message = message;
     this.token = token;
     this.line = line;
     this.expected = expected;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$f = expression;
   var KIND$16 = "eval";
   /**
    * Defines an eval statement
@@ -9306,18 +9123,11 @@
    * @property {Node} source
    */
 
-  var _eval = Expression$f.extends(KIND$16, function Eval(source, docs, location) {
-    Expression$f.apply(this, [KIND$16, docs, location]);
+  var _eval = expression.extends(KIND$16, function Eval(source, docs, location) {
+    expression.apply(this, [KIND$16, docs, location]);
     this.source = source;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$e = expression;
   var KIND$15 = "exit";
   /**
    * Defines an exit / die call
@@ -9328,19 +9138,12 @@
    * @property {boolean} useDie
    */
 
-  var exit = Expression$e.extends(KIND$15, function Exit(expression, useDie, docs, location) {
-    Expression$e.apply(this, [KIND$15, docs, location]);
-    this.expression = expression;
+  var exit = expression.extends(KIND$15, function Exit(expression$1, useDie, docs, location) {
+    expression.apply(this, [KIND$15, docs, location]);
+    this.expression = expression$1;
     this.useDie = useDie;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$i = statement;
   var KIND$14 = "expressionstatement";
   /**
    * Defines an expression based statement
@@ -9350,18 +9153,11 @@
    * @property {Expression} expression
    */
 
-  var expressionstatement = Statement$i.extends(KIND$14, function ExpressionStatement(expr, docs, location) {
-    Statement$i.apply(this, [KIND$14, docs, location]);
+  var expressionstatement = statement.extends(KIND$14, function ExpressionStatement(expr, docs, location) {
+    statement.apply(this, [KIND$14, docs, location]);
     this.expression = expr;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$h = statement;
   var KIND$13 = "for";
   /**
    * Defines a for iterator
@@ -9376,8 +9172,8 @@
    * @see http://php.net/manual/en/control-structures.for.php
    */
 
-  var _for = Statement$h.extends(KIND$13, function For(init, test, increment, body, shortForm, docs, location) {
-    Statement$h.apply(this, [KIND$13, docs, location]);
+  var _for = statement.extends(KIND$13, function For(init, test, increment, body, shortForm, docs, location) {
+    statement.apply(this, [KIND$13, docs, location]);
     this.init = init;
     this.test = test;
     this.increment = increment;
@@ -9385,13 +9181,6 @@
     this.body = body;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$g = statement;
   var KIND$12 = "foreach";
   /**
    * Defines a foreach iterator
@@ -9406,8 +9195,8 @@
    * @see http://php.net/manual/en/control-structures.foreach.php
    */
 
-  var foreach = Statement$g.extends(KIND$12, function Foreach(source, key, value, body, shortForm, docs, location) {
-    Statement$g.apply(this, [KIND$12, docs, location]);
+  var foreach = statement.extends(KIND$12, function Foreach(source, key, value, body, shortForm, docs, location) {
+    statement.apply(this, [KIND$12, docs, location]);
     this.source = source;
     this.key = key;
     this.value = value;
@@ -9415,13 +9204,6 @@
     this.body = body;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Declaration$5 = declaration;
   var KIND$11 = "function";
   /**
    * Defines a classic function
@@ -9436,8 +9218,8 @@
    * @property {AttrGroup[]} attrGroups
    */
 
-  var _function = Declaration$5.extends(KIND$11, function _Function(name, args, byref, type, nullable, docs, location) {
-    Declaration$5.apply(this, [KIND$11, name, docs, location]);
+  var _function = declaration.extends(KIND$11, function _Function(name, args, byref, type, nullable, docs, location) {
+    declaration.apply(this, [KIND$11, name, docs, location]);
     this.arguments = args;
     this.byref = byref;
     this.type = type;
@@ -9446,13 +9228,6 @@
     this.attrGroups = [];
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$f = statement;
   var KIND$10 = "global";
   /**
    * Imports a variable from the global scope
@@ -9462,18 +9237,11 @@
    * @property {Variable[]} items
    */
 
-  var global$1 = Statement$f.extends(KIND$10, function Global(items, docs, location) {
-    Statement$f.apply(this, [KIND$10, docs, location]);
+  var global$1 = statement.extends(KIND$10, function Global(items, docs, location) {
+    statement.apply(this, [KIND$10, docs, location]);
     this.items = items;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$e = statement;
   var KIND$$ = "goto";
   /**
    * Defines goto statement
@@ -9484,18 +9252,11 @@
    * @see {Label}
    */
 
-  var goto = Statement$e.extends(KIND$$, function Goto(label, docs, location) {
-    Statement$e.apply(this, [KIND$$, docs, location]);
+  var goto_1 = statement.extends(KIND$$, function Goto(label, docs, location) {
+    statement.apply(this, [KIND$$, docs, location]);
     this.label = label;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$d = statement;
   var KIND$_ = "halt";
   /**
    * Halts the compiler execution
@@ -9506,18 +9267,11 @@
    * @see http://php.net/manual/en/function.halt-compiler.php
    */
 
-  var halt = Statement$d.extends(KIND$_, function Halt(after, docs, location) {
-    Statement$d.apply(this, [KIND$_, docs, location]);
+  var halt = statement.extends(KIND$_, function Halt(after, docs, location) {
+    statement.apply(this, [KIND$_, docs, location]);
     this.after = after;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$8 = node;
   var KIND$Z = "identifier";
   /**
    * Defines an identifier node
@@ -9527,19 +9281,12 @@
    * @property {string} name
    */
 
-  var Identifier = Node$8.extends(KIND$Z, function Identifier(name, docs, location) {
-    Node$8.apply(this, [KIND$Z, docs, location]);
+  var Identifier = node.extends(KIND$Z, function Identifier(name, docs, location) {
+    node.apply(this, [KIND$Z, docs, location]);
     this.name = name;
   });
   var identifier = Identifier;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$c = statement;
   var KIND$Y = "if";
   /**
    * Defines a if statement
@@ -9552,21 +9299,14 @@
    * @property {boolean} shortForm
    */
 
-  var _if = Statement$c.extends(KIND$Y, function If(test, body, alternate, shortForm, docs, location) {
-    Statement$c.apply(this, [KIND$Y, docs, location]);
+  var _if = statement.extends(KIND$Y, function If(test, body, alternate, shortForm, docs, location) {
+    statement.apply(this, [KIND$Y, docs, location]);
     this.test = test;
     this.body = body;
     this.alternate = alternate;
     this.shortForm = shortForm;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$d = expression;
   var KIND$X = "include";
   /**
    * Defines system include call
@@ -9578,20 +9318,13 @@
    * @property {boolean} require
    */
 
-  var include = Expression$d.extends(KIND$X, function Include(once, require, target, docs, location) {
-    Expression$d.apply(this, [KIND$X, docs, location]);
+  var include = expression.extends(KIND$X, function Include(once, require, target, docs, location) {
+    expression.apply(this, [KIND$X, docs, location]);
     this.once = once;
     this.require = require;
     this.target = target;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Literal$4 = literal;
   var KIND$W = "inline";
   /**
    * Defines inline html output (treated as echo output)
@@ -9601,17 +9334,10 @@
    * @property {string} value
    */
 
-  var inline = Literal$4.extends(KIND$W, function Inline(value, raw, docs, location) {
-    Literal$4.apply(this, [KIND$W, value, raw, docs, location]);
+  var inline = literal.extends(KIND$W, function Inline(value, raw, docs, location) {
+    literal.apply(this, [KIND$W, value, raw, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Declaration$4 = declaration;
   var KIND$V = "interface";
   /**
    * An interface definition
@@ -9623,20 +9349,13 @@
    * @property {AttrGroup[]} attrGroups
    */
 
-  var _interface = Declaration$4.extends(KIND$V, function Interface(name, ext, body, attrGroups, docs, location) {
-    Declaration$4.apply(this, [KIND$V, name, docs, location]);
+  var _interface = declaration.extends(KIND$V, function Interface(name, ext, body, attrGroups, docs, location) {
+    declaration.apply(this, [KIND$V, name, docs, location]);
     this.extends = ext;
     this.body = body;
     this.attrGroups = attrGroups;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Declaration$3 = declaration;
   var KIND$U = "intersectiontype";
   /**
    * A union of types
@@ -9646,18 +9365,11 @@
    * @property {TypeReference[]} types
    */
 
-  var intersectiontype = Declaration$3.extends(KIND$U, function IntersectionType(types, docs, location) {
-    Declaration$3.apply(this, [KIND$U, null, docs, location]);
+  var intersectiontype = declaration.extends(KIND$U, function IntersectionType(types, docs, location) {
+    declaration.apply(this, [KIND$U, null, docs, location]);
     this.types = types;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$c = expression;
   var KIND$T = "isset";
   /**
    * Defines an isset call
@@ -9666,18 +9378,11 @@
    * @extends {Expression}
    */
 
-  var isset = Expression$c.extends(KIND$T, function Isset(variables, docs, location) {
-    Expression$c.apply(this, [KIND$T, docs, location]);
+  var isset = expression.extends(KIND$T, function Isset(variables, docs, location) {
+    expression.apply(this, [KIND$T, docs, location]);
     this.variables = variables;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$b = statement;
   var KIND$S = "label";
   /**
    * A label statement (referenced by goto)
@@ -9687,18 +9392,11 @@
    * @property {String} name
    */
 
-  var label = Statement$b.extends(KIND$S, function Label(name, docs, location) {
-    Statement$b.apply(this, [KIND$S, docs, location]);
+  var label = statement.extends(KIND$S, function Label(name, docs, location) {
+    statement.apply(this, [KIND$S, docs, location]);
     this.name = name;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$b = expression;
   var KIND$R = "list";
   /**
    * Defines list assignment
@@ -9709,19 +9407,12 @@
    * @property {Entry[]} items
    */
 
-  var list = Expression$b.extends(KIND$R, function List(items, shortForm, docs, location) {
-    Expression$b.apply(this, [KIND$R, docs, location]);
+  var list = expression.extends(KIND$R, function List(items, shortForm, docs, location) {
+    expression.apply(this, [KIND$R, docs, location]);
     this.items = items;
     this.shortForm = shortForm;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expr = expression;
   var KIND$Q = "lookup";
   /**
    * Lookup on an offset in the specified object
@@ -9732,19 +9423,12 @@
    * @property {Expression} offset
    */
 
-  var lookup = Expr.extends(KIND$Q, function Lookup(kind, what, offset, docs, location) {
-    Expr.apply(this, [kind || KIND$Q, docs, location]);
+  var lookup = expression.extends(KIND$Q, function Lookup(kind, what, offset, docs, location) {
+    expression.apply(this, [kind || KIND$Q, docs, location]);
     this.what = what;
     this.offset = offset;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Literal$3 = literal;
   var KIND$P = "magic";
   /**
    * Defines magic constant
@@ -9753,17 +9437,10 @@
    * @extends {Literal}
    */
 
-  var magic = Literal$3.extends(KIND$P, function Magic(value, raw, docs, location) {
-    Literal$3.apply(this, [KIND$P, value, raw, docs, location]);
+  var magic = literal.extends(KIND$P, function Magic(value, raw, docs, location) {
+    literal.apply(this, [KIND$P, value, raw, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$a = expression;
   var KIND$O = "match";
   /**
    * Defines a match expression
@@ -9774,19 +9451,12 @@
    * @property {MatchArm[]} arms Arms for comparison
    */
 
-  var match = Expression$a.extends(KIND$O, function Match(cond, arms, docs, location) {
-    Expression$a.apply(this, [KIND$O, docs, location]);
+  var match = expression.extends(KIND$O, function Match(cond, arms, docs, location) {
+    expression.apply(this, [KIND$O, docs, location]);
     this.cond = cond;
     this.arms = arms;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$9 = expression;
   var KIND$N = "matcharm";
   /**
    * An array entry - see [Array](#array)
@@ -9797,19 +9467,12 @@
    * @property {Expression} body The return value expression
    */
 
-  var matcharm = Expression$9.extends(KIND$N, function MatchArm(conds, body, docs, location) {
-    Expression$9.apply(this, [KIND$N, docs, location]);
+  var matcharm = expression.extends(KIND$N, function MatchArm(conds, body, docs, location) {
+    expression.apply(this, [KIND$N, docs, location]);
     this.conds = conds;
     this.body = body;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Function_ = _function;
   var KIND$M = "method";
   /**
    * Defines a class/interface/trait method
@@ -9822,18 +9485,11 @@
    * @property {string} visibility
    */
 
-  var method = Function_.extends(KIND$M, function Method() {
-    Function_.apply(this, arguments);
+  var method = _function.extends(KIND$M, function Method() {
+    _function.apply(this, arguments);
     this.kind = KIND$M;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$7 = node;
   var KIND$L = "reference";
   /**
    * Defines a reference node
@@ -9842,18 +9498,11 @@
    * @extends {Node}
    */
 
-  var Reference$5 = Node$7.extends(KIND$L, function Reference(kind, docs, location) {
-    Node$7.apply(this, [kind || KIND$L, docs, location]);
+  var Reference = node.extends(KIND$L, function Reference(kind, docs, location) {
+    node.apply(this, [kind || KIND$L, docs, location]);
   });
-  var reference = Reference$5;
-
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
+  var reference = Reference;
 
-  var Reference$4 = reference;
   var KIND$K = "name";
   /**
    * Defines a class reference node
@@ -9864,8 +9513,8 @@
    * @property {string} resolution
    */
 
-  var Name = Reference$4.extends(KIND$K, function Name(name, resolution, docs, location) {
-    Reference$4.apply(this, [KIND$K, docs, location]);
+  var Name = reference.extends(KIND$K, function Name(name, resolution, docs, location) {
+    reference.apply(this, [KIND$K, docs, location]);
     this.name = name.replace(/\\$/, "");
     this.resolution = resolution;
   });
@@ -9901,13 +9550,6 @@
   Name.RELATIVE_NAME = "rn";
   var name = Name;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Block$1 = block;
   var KIND$J = "namespace";
   /**
    * The main program node
@@ -9918,19 +9560,12 @@
    * @property {boolean} withBrackets
    */
 
-  var namespace = Block$1.extends(KIND$J, function Namespace(name, children, withBrackets, docs, location) {
-    Block$1.apply(this, [KIND$J, children, docs, location]);
+  var namespace = block.extends(KIND$J, function Namespace(name, children, withBrackets, docs, location) {
+    block.apply(this, [KIND$J, children, docs, location]);
     this.name = name;
     this.withBrackets = withBrackets || false;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$8 = expression;
   var KIND$I = "namedargument";
   /**
    * Named arguments.
@@ -9942,19 +9577,12 @@
    * @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments
    */
 
-  var namedargument = Expression$8.extends(KIND$I, function namedargument(name, value, docs, location) {
-    Expression$8.apply(this, [KIND$I, docs, location]);
+  var namedargument = expression.extends(KIND$I, function namedargument(name, value, docs, location) {
+    expression.apply(this, [KIND$I, docs, location]);
     this.name = name;
     this.value = value;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$7 = expression;
   var KIND$H = "new";
   /**
    * Creates a new instance of the specified class
@@ -9965,19 +9593,12 @@
    * @property {Variable[]} arguments
    */
 
-  var _new = Expression$7.extends(KIND$H, function New(what, args, docs, location) {
-    Expression$7.apply(this, [KIND$H, docs, location]);
+  var _new = expression.extends(KIND$H, function New(what, args, docs, location) {
+    expression.apply(this, [KIND$H, docs, location]);
     this.what = what;
     this.arguments = args;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$6 = node;
   var KIND$G = "noop";
   /**
    * Ignore this node, it implies a no operation block, for example :
@@ -9987,17 +9608,10 @@
    * @extends {Node}
    */
 
-  var noop = Node$6.extends(KIND$G, function Noop(docs, location) {
-    Node$6.apply(this, [KIND$G, docs, location]);
+  var noop = node.extends(KIND$G, function Noop(docs, location) {
+    node.apply(this, [KIND$G, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Literal$2 = literal;
   var KIND$F = "nowdoc";
   /**
    * Defines a nowdoc string
@@ -10009,18 +9623,11 @@
    * @property {string} value
    */
 
-  var nowdoc = Literal$2.extends(KIND$F, function Nowdoc(value, raw, label, docs, location) {
-    Literal$2.apply(this, [KIND$F, value, raw, docs, location]);
+  var nowdoc = literal.extends(KIND$F, function Nowdoc(value, raw, label, docs, location) {
+    literal.apply(this, [KIND$F, value, raw, docs, location]);
     this.label = label;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$5 = node;
   var KIND$E = "nullkeyword";
   /**
    * Represents the null keyword
@@ -10029,18 +9636,11 @@
    * @extends {Node}
    */
 
-  var nullkeyword = Node$5.extends(KIND$E, function NullKeyword(raw, docs, location) {
-    Node$5.apply(this, [KIND$E, docs, location]);
+  var nullkeyword = node.extends(KIND$E, function NullKeyword(raw, docs, location) {
+    node.apply(this, [KIND$E, docs, location]);
     this.raw = raw;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Lookup$3 = lookup;
   var KIND$D = "nullsafepropertylookup";
   /**
    * Lookup to an object property
@@ -10049,17 +9649,10 @@
    * @extends {Lookup}
    */
 
-  var nullsafepropertylookup = Lookup$3.extends(KIND$D, function NullSafePropertyLookup(what, offset, docs, location) {
-    Lookup$3.apply(this, [KIND$D, what, offset, docs, location]);
+  var nullsafepropertylookup = lookup.extends(KIND$D, function NullSafePropertyLookup(what, offset, docs, location) {
+    lookup.apply(this, [KIND$D, what, offset, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Literal$1 = literal;
   var KIND$C = "number";
   /**
    * Defines a numeric value
@@ -10069,17 +9662,10 @@
    * @property {number} value
    */
 
-  var number = Literal$1.extends(KIND$C, function Number(value, raw, docs, location) {
-    Literal$1.apply(this, [KIND$C, value, raw, docs, location]);
+  var number = literal.extends(KIND$C, function Number(value, raw, docs, location) {
+    literal.apply(this, [KIND$C, value, raw, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Lookup$2 = lookup;
   var KIND$B = "offsetlookup";
   /**
    * Lookup on an offset in an array
@@ -10088,17 +9674,10 @@
    * @extends {Lookup}
    */
 
-  var offsetlookup = Lookup$2.extends(KIND$B, function OffsetLookup(what, offset, docs, location) {
-    Lookup$2.apply(this, [KIND$B, what, offset, docs, location]);
+  var offsetlookup = lookup.extends(KIND$B, function OffsetLookup(what, offset, docs, location) {
+    lookup.apply(this, [KIND$B, what, offset, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Declaration$2 = declaration;
   var KIND$A = "parameter";
   /**
    * @memberOf module:php-parser
@@ -10130,8 +9709,8 @@
    * @property {MODIFIER_PUBLIC|MODIFIER_PROTECTED|MODIFIER_PRIVATE} flags
    */
 
-  var parameter = Declaration$2.extends(KIND$A, function Parameter(name, type, value, isRef, isVariadic, readonly, nullable, flags, docs, location) {
-    Declaration$2.apply(this, [KIND$A, name, docs, location]);
+  var parameter = declaration.extends(KIND$A, function Parameter(name, type, value, isRef, isVariadic, readonly, nullable, flags, docs, location) {
+    declaration.apply(this, [KIND$A, name, docs, location]);
     this.value = value;
     this.type = type;
     this.byref = isRef;
@@ -10142,13 +9721,6 @@
     this.attrGroups = [];
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Reference$3 = reference;
   var KIND$z = "parentreference";
   /**
    * Defines a class reference node
@@ -10157,19 +9729,12 @@
    * @extends {Reference}
    */
 
-  var ParentReference = Reference$3.extends(KIND$z, function ParentReference(raw, docs, location) {
-    Reference$3.apply(this, [KIND$z, docs, location]);
+  var ParentReference = reference.extends(KIND$z, function ParentReference(raw, docs, location) {
+    reference.apply(this, [KIND$z, docs, location]);
     this.raw = raw;
   });
   var parentreference = ParentReference;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Operation$2 = operation;
   var KIND$y = "post";
   /**
    * Defines a post operation `$i++` or `$i--`
@@ -10180,19 +9745,12 @@
    * @property {Variable} what
    */
 
-  var post = Operation$2.extends(KIND$y, function Post(type, what, docs, location) {
-    Operation$2.apply(this, [KIND$y, docs, location]);
+  var post = operation.extends(KIND$y, function Post(type, what, docs, location) {
+    operation.apply(this, [KIND$y, docs, location]);
     this.type = type;
     this.what = what;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Operation$1 = operation;
   var KIND$x = "pre";
   /**
    * Defines a pre operation `++$i` or `--$i`
@@ -10203,19 +9761,12 @@
    * @property {Variable} what
    */
 
-  var pre = Operation$1.extends(KIND$x, function Pre(type, what, docs, location) {
-    Operation$1.apply(this, [KIND$x, docs, location]);
+  var pre = operation.extends(KIND$x, function Pre(type, what, docs, location) {
+    operation.apply(this, [KIND$x, docs, location]);
     this.type = type;
     this.what = what;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$6 = expression;
   var KIND$w = "print";
   /**
    * Outputs
@@ -10224,18 +9775,11 @@
    * @extends {Expression}
    */
 
-  var print = Expression$6.extends(KIND$w, function Print(expression, docs, location) {
-    Expression$6.apply(this, [KIND$w, docs, location]);
-    this.expression = expression;
+  var print = expression.extends(KIND$w, function Print(expression$1, docs, location) {
+    expression.apply(this, [KIND$w, docs, location]);
+    this.expression = expression$1;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Block = block;
   var KIND$v = "program";
   /**
    * The main program node
@@ -10247,8 +9791,8 @@
    * @property {String[]|null} tokens
    */
 
-  var program = Block.extends(KIND$v, function Program(children, errors, comments, tokens, docs, location) {
-    Block.apply(this, [KIND$v, children, docs, location]);
+  var program = block.extends(KIND$v, function Program(children, errors, comments, tokens, docs, location) {
+    block.apply(this, [KIND$v, children, docs, location]);
     this.errors = errors;
 
     if (comments) {
@@ -10260,13 +9804,6 @@
     }
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$a = statement;
   var KIND$u = "property";
   /**
    * Defines a class property
@@ -10281,23 +9818,16 @@
    * @property {AttrGroup[]} attrGroups
    */
 
-  var property = Statement$a.extends(KIND$u, function Property(name, value, readonly, nullable, type, attrGroups, docs, location) {
-    Statement$a.apply(this, [KIND$u, docs, location]);
+  var property = statement.extends(KIND$u, function Property(name, value, readonly, nullable, type, attrGroups, docs, location) {
+    statement.apply(this, [KIND$u, docs, location]);
     this.name = name;
     this.value = value;
     this.readonly = readonly;
     this.nullable = nullable;
-    this.type = type;
-    this.attrGroups = attrGroups;
-  });
-
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
+    this.type = type;
+    this.attrGroups = attrGroups;
+  });
 
-  var Lookup$1 = lookup;
   var KIND$t = "propertylookup";
   /**
    * Lookup to an object property
@@ -10306,17 +9836,10 @@
    * @extends {Lookup}
    */
 
-  var propertylookup = Lookup$1.extends(KIND$t, function PropertyLookup(what, offset, docs, location) {
-    Lookup$1.apply(this, [KIND$t, what, offset, docs, location]);
+  var propertylookup = lookup.extends(KIND$t, function PropertyLookup(what, offset, docs, location) {
+    lookup.apply(this, [KIND$t, what, offset, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$9 = statement;
   var KIND$s = "propertystatement";
   var IS_UNDEFINED$1 = "";
   var IS_PUBLIC$1 = "public";
@@ -10332,8 +9855,8 @@
    * @property {boolean} isStatic
    */
 
-  var PropertyStatement = Statement$9.extends(KIND$s, function PropertyStatement(kind, properties, flags, docs, location) {
-    Statement$9.apply(this, [KIND$s, docs, location]);
+  var PropertyStatement = statement.extends(KIND$s, function PropertyStatement(kind, properties, flags, docs, location) {
+    statement.apply(this, [KIND$s, docs, location]);
     this.properties = properties;
     this.parseFlags(flags);
   });
@@ -10363,13 +9886,6 @@
 
   var propertystatement = PropertyStatement;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$5 = expression;
   var KIND$r = "retif";
   /**
    * Defines a short if statement that returns a value
@@ -10381,20 +9897,13 @@
    * @property {Expression} falseExpr
    */
 
-  var retif = Expression$5.extends(KIND$r, function RetIf(test, trueExpr, falseExpr, docs, location) {
-    Expression$5.apply(this, [KIND$r, docs, location]);
+  var retif = expression.extends(KIND$r, function RetIf(test, trueExpr, falseExpr, docs, location) {
+    expression.apply(this, [KIND$r, docs, location]);
     this.test = test;
     this.trueExpr = trueExpr;
     this.falseExpr = falseExpr;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$8 = statement;
   var KIND$q = "return";
   /**
    * A continue statement
@@ -10404,18 +9913,11 @@
    * @property {Expression|null} expr
    */
 
-  var _return = Statement$8.extends(KIND$q, function Return(expr, docs, location) {
-    Statement$8.apply(this, [KIND$q, docs, location]);
+  var _return = statement.extends(KIND$q, function Return(expr, docs, location) {
+    statement.apply(this, [KIND$q, docs, location]);
     this.expr = expr;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Reference$2 = reference;
   var KIND$p = "selfreference";
   /**
    * Defines a class reference node
@@ -10424,19 +9926,12 @@
    * @extends {Reference}
    */
 
-  var SelfReference = Reference$2.extends(KIND$p, function SelfReference(raw, docs, location) {
-    Reference$2.apply(this, [KIND$p, docs, location]);
+  var SelfReference = reference.extends(KIND$p, function SelfReference(raw, docs, location) {
+    reference.apply(this, [KIND$p, docs, location]);
     this.raw = raw;
   });
   var selfreference = SelfReference;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$4 = expression;
   var KIND$o = "silent";
   /**
    * Avoids to show/log warnings & notices from the inner expression
@@ -10446,18 +9941,11 @@
    * @property {Expression} expr
    */
 
-  var silent = Expression$4.extends(KIND$o, function Silent(expr, docs, location) {
-    Expression$4.apply(this, [KIND$o, docs, location]);
+  var silent = expression.extends(KIND$o, function Silent(expr, docs, location) {
+    expression.apply(this, [KIND$o, docs, location]);
     this.expr = expr;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$7 = statement;
   var KIND$n = "static";
   /**
    * Declares a static variable into the current scope
@@ -10467,18 +9955,11 @@
    * @property {StaticVariable[]} variables
    */
 
-  var _static = Statement$7.extends(KIND$n, function Static(variables, docs, location) {
-    Statement$7.apply(this, [KIND$n, docs, location]);
+  var _static = statement.extends(KIND$n, function Static(variables, docs, location) {
+    statement.apply(this, [KIND$n, docs, location]);
     this.variables = variables;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$4 = node;
   var KIND$m = "staticvariable";
   /**
    * Defines a constant
@@ -10489,19 +9970,12 @@
    * @property {Node|string|number|boolean|null} defaultValue
    */
 
-  var staticvariable = Node$4.extends(KIND$m, function StaticVariable(variable, defaultValue, docs, location) {
-    Node$4.apply(this, [KIND$m, docs, location]);
+  var staticvariable = node.extends(KIND$m, function StaticVariable(variable, defaultValue, docs, location) {
+    node.apply(this, [KIND$m, docs, location]);
     this.variable = variable;
     this.defaultValue = defaultValue;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Lookup = lookup;
   var KIND$l = "staticlookup";
   /**
    * Lookup to a static property
@@ -10510,17 +9984,10 @@
    * @extends {Lookup}
    */
 
-  var staticlookup = Lookup.extends(KIND$l, function StaticLookup(what, offset, docs, location) {
-    Lookup.apply(this, [KIND$l, what, offset, docs, location]);
+  var staticlookup = lookup.extends(KIND$l, function StaticLookup(what, offset, docs, location) {
+    lookup.apply(this, [KIND$l, what, offset, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Reference$1 = reference;
   var KIND$k = "staticreference";
   /**
    * Defines a class reference node
@@ -10529,19 +9996,12 @@
    * @extends {Reference}
    */
 
-  var StaticReference = Reference$1.extends(KIND$k, function StaticReference(raw, docs, location) {
-    Reference$1.apply(this, [KIND$k, docs, location]);
+  var StaticReference = reference.extends(KIND$k, function StaticReference(raw, docs, location) {
+    reference.apply(this, [KIND$k, docs, location]);
     this.raw = raw;
   });
   var staticreference = StaticReference;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Literal = literal;
   var KIND$j = "string";
   /**
    * Defines a string (simple or double quoted) - chars are already escaped
@@ -10554,19 +10014,12 @@
    * @property {string} value
    */
 
-  var string = Literal.extends(KIND$j, function String(isDoubleQuote, value, unicode, raw, docs, location) {
-    Literal.apply(this, [KIND$j, value, raw, docs, location]);
+  var string = literal.extends(KIND$j, function String(isDoubleQuote, value, unicode, raw, docs, location) {
+    literal.apply(this, [KIND$j, value, raw, docs, location]);
     this.unicode = unicode;
     this.isDoubleQuote = isDoubleQuote;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$6 = statement;
   var KIND$i = "switch";
   /**
    * Defines a switch statement
@@ -10578,20 +10031,13 @@
    * @property {boolean} shortForm
    */
 
-  var _switch = Statement$6.extends(KIND$i, function Switch(test, body, shortForm, docs, location) {
-    Statement$6.apply(this, [KIND$i, docs, location]);
+  var _switch = statement.extends(KIND$i, function Switch(test, body, shortForm, docs, location) {
+    statement.apply(this, [KIND$i, docs, location]);
     this.test = test;
     this.body = body;
     this.shortForm = shortForm;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$5 = statement;
   var KIND$h = "throw";
   /**
    * Defines a throw statement
@@ -10601,18 +10047,11 @@
    * @property {Expression} what
    */
 
-  var _throw = Statement$5.extends(KIND$h, function Throw(what, docs, location) {
-    Statement$5.apply(this, [KIND$h, docs, location]);
+  var _throw = statement.extends(KIND$h, function Throw(what, docs, location) {
+    statement.apply(this, [KIND$h, docs, location]);
     this.what = what;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Declaration$1 = declaration;
   var KIND$g = "trait";
   /**
    * A trait definition
@@ -10622,18 +10061,11 @@
    * @property {Declaration[]} body
    */
 
-  var trait = Declaration$1.extends(KIND$g, function Trait(name, body, docs, location) {
-    Declaration$1.apply(this, [KIND$g, name, docs, location]);
+  var trait = declaration.extends(KIND$g, function Trait(name, body, docs, location) {
+    declaration.apply(this, [KIND$g, name, docs, location]);
     this.body = body;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$3 = node;
   var KIND$f = "traitalias";
   var IS_UNDEFINED = "";
   var IS_PUBLIC = "public";
@@ -10650,8 +10082,8 @@
    * @property {string|null} visibility
    */
 
-  var traitalias = Node$3.extends(KIND$f, function TraitAlias(trait, method, as, flags, docs, location) {
-    Node$3.apply(this, [KIND$f, docs, location]);
+  var traitalias = node.extends(KIND$f, function TraitAlias(trait, method, as, flags, docs, location) {
+    node.apply(this, [KIND$f, docs, location]);
     this.trait = trait;
     this.method = method;
     this.as = as;
@@ -10668,13 +10100,6 @@
     }
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$2 = node;
   var KIND$e = "traitprecedence";
   /**
    * Defines a trait alias
@@ -10686,20 +10111,13 @@
    * @property {Identifier[]} instead
    */
 
-  var traitprecedence = Node$2.extends(KIND$e, function TraitPrecedence(trait, method, instead, docs, location) {
-    Node$2.apply(this, [KIND$e, docs, location]);
+  var traitprecedence = node.extends(KIND$e, function TraitPrecedence(trait, method, instead, docs, location) {
+    node.apply(this, [KIND$e, docs, location]);
     this.trait = trait;
     this.method = method;
     this.instead = instead;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node$1 = node;
   var KIND$d = "traituse";
   /**
    * Defines a trait usage
@@ -10710,19 +10128,12 @@
    * @property {Node[]|null} adaptations
    */
 
-  var traituse = Node$1.extends(KIND$d, function TraitUse(traits, adaptations, docs, location) {
-    Node$1.apply(this, [KIND$d, docs, location]);
+  var traituse = node.extends(KIND$d, function TraitUse(traits, adaptations, docs, location) {
+    node.apply(this, [KIND$d, docs, location]);
     this.traits = traits;
     this.adaptations = adaptations;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$4 = statement;
   var KIND$c = "try";
   /**
    * Defines a try statement
@@ -10734,20 +10145,13 @@
    * @property {Block} always
    */
 
-  var _try = Statement$4.extends(KIND$c, function Try(body, catches, always, docs, location) {
-    Statement$4.apply(this, [KIND$c, docs, location]);
+  var _try = statement.extends(KIND$c, function Try(body, catches, always, docs, location) {
+    statement.apply(this, [KIND$c, docs, location]);
     this.body = body;
     this.catches = catches;
     this.always = always;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Reference = reference;
   var KIND$b = "typereference";
   /**
    * Defines a class reference node
@@ -10757,21 +10161,14 @@
    * @property {string} name
    */
 
-  var TypeReference = Reference.extends(KIND$b, function TypeReference(name, raw, docs, location) {
-    Reference.apply(this, [KIND$b, docs, location]);
+  var TypeReference = reference.extends(KIND$b, function TypeReference(name, raw, docs, location) {
+    reference.apply(this, [KIND$b, docs, location]);
     this.name = name;
     this.raw = raw;
   });
   TypeReference.types = ["int", "float", "string", "bool", "object", "array", "callable", "iterable", "void", "static"];
   var typereference = TypeReference;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Operation = operation;
   var KIND$a = "unary";
   /**
    * Unary operations
@@ -10782,19 +10179,12 @@
    * @property {Expression} what
    */
 
-  var unary = Operation.extends(KIND$a, function Unary(type, what, docs, location) {
-    Operation.apply(this, [KIND$a, docs, location]);
+  var unary = operation.extends(KIND$a, function Unary(type, what, docs, location) {
+    operation.apply(this, [KIND$a, docs, location]);
     this.type = type;
     this.what = what;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Declaration = declaration;
   var KIND$9 = "uniontype";
   /**
    * A union of types
@@ -10804,18 +10194,11 @@
    * @property {TypeReference[]} types
    */
 
-  var uniontype = Declaration.extends(KIND$9, function UnionType(types, docs, location) {
-    Declaration.apply(this, [KIND$9, null, docs, location]);
+  var uniontype = declaration.extends(KIND$9, function UnionType(types, docs, location) {
+    declaration.apply(this, [KIND$9, null, docs, location]);
     this.types = types;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$3 = statement;
   var KIND$8 = "unset";
   /**
    * Deletes references to a list of variables
@@ -10824,18 +10207,11 @@
    * @extends {Statement}
    */
 
-  var unset = Statement$3.extends(KIND$8, function Unset(variables, docs, location) {
-    Statement$3.apply(this, [KIND$8, docs, location]);
+  var unset = statement.extends(KIND$8, function Unset(variables, docs, location) {
+    statement.apply(this, [KIND$8, docs, location]);
     this.variables = variables;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$2 = statement;
   var KIND$7 = "usegroup";
   /**
    * Defines a use statement (with a list of use items)
@@ -10849,20 +10225,13 @@
    * @see http://php.net/manual/en/language.namespaces.importing.php
    */
 
-  var usegroup = Statement$2.extends(KIND$7, function UseGroup(name, type, items, docs, location) {
-    Statement$2.apply(this, [KIND$7, docs, location]);
+  var usegroup = statement.extends(KIND$7, function UseGroup(name, type, items, docs, location) {
+    statement.apply(this, [KIND$7, docs, location]);
     this.name = name;
     this.type = type;
     this.items = items;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement$1 = statement;
   var KIND$6 = "useitem";
   /**
    * Defines a use statement (from namespace)
@@ -10876,8 +10245,8 @@
    * @see http://php.net/manual/en/language.namespaces.importing.php
    */
 
-  var UseItem = Statement$1.extends(KIND$6, function UseItem(name, alias, type, docs, location) {
-    Statement$1.apply(this, [KIND$6, docs, location]);
+  var UseItem = statement.extends(KIND$6, function UseItem(name, alias, type, docs, location) {
+    statement.apply(this, [KIND$6, docs, location]);
     this.name = name;
     this.alias = alias;
     this.type = type;
@@ -10898,13 +10267,6 @@
   UseItem.TYPE_FUNCTION = "function";
   var useitem = UseItem;
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$3 = expression;
   var KIND$5 = "variable";
   /**
    * Any expression node. Since the left-hand side of an assignment may
@@ -10925,19 +10287,12 @@
    * @property {boolean} curly Indicate if the name is defined between curlies, ex `${foo}`
    */
 
-  var variable = Expression$3.extends(KIND$5, function Variable(name, curly, docs, location) {
-    Expression$3.apply(this, [KIND$5, docs, location]);
+  var variable = expression.extends(KIND$5, function Variable(name, curly, docs, location) {
+    expression.apply(this, [KIND$5, docs, location]);
     this.name = name;
     this.curly = curly || false;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$2 = expression;
   var KIND$4 = "variadic";
   /**
    * Introduce a list of items into the arguments of the call
@@ -10948,18 +10303,11 @@
    * @see https://wiki.php.net/rfc/argument_unpacking
    */
 
-  var variadic = Expression$2.extends(KIND$4, function variadic(what, docs, location) {
-    Expression$2.apply(this, [KIND$4, docs, location]);
+  var variadic = expression.extends(KIND$4, function variadic(what, docs, location) {
+    expression.apply(this, [KIND$4, docs, location]);
     this.what = what;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Node = node;
   var KIND$3 = "variadicplaceholder";
   /**
    * Defines a variadic placeholder (the ellipsis in PHP 8.1+'s first-class callable syntax)
@@ -10970,17 +10318,10 @@
    * @see http://php.net/manual/en/language.namespaces.importing.php
    */
 
-  var variadicplaceholder = Node.extends(KIND$3, function VariadicPlaceholder(docs, location) {
-    Node.apply(this, [KIND$3, docs, location]);
+  var variadicplaceholder = node.extends(KIND$3, function VariadicPlaceholder(docs, location) {
+    node.apply(this, [KIND$3, docs, location]);
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Statement = statement;
   var KIND$2 = "while";
   /**
    * Defines a while statement
@@ -10992,20 +10333,13 @@
    * @property {boolean} shortForm
    */
 
-  var _while = Statement.extends(KIND$2, function While(test, body, shortForm, docs, location) {
-    Statement.apply(this, [KIND$2, docs, location]);
+  var _while = statement.extends(KIND$2, function While(test, body, shortForm, docs, location) {
+    statement.apply(this, [KIND$2, docs, location]);
     this.test = test;
     this.body = body;
     this.shortForm = shortForm;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression$1 = expression;
   var KIND$1 = "yield";
   /**
    * Defines a yield generator statement
@@ -11017,19 +10351,12 @@
    * @see http://php.net/manual/en/language.generators.syntax.php
    */
 
-  var _yield = Expression$1.extends(KIND$1, function Yield(value, key, docs, location) {
-    Expression$1.apply(this, [KIND$1, docs, location]);
+  var _yield = expression.extends(KIND$1, function Yield(value, key, docs, location) {
+    expression.apply(this, [KIND$1, docs, location]);
     this.value = value;
     this.key = key;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Expression = expression;
   var KIND = "yieldfrom";
   /**
    * Defines a yield from generator statement
@@ -11040,19 +10367,11 @@
    * @see http://php.net/manual/en/language.generators.syntax.php
    */
 
-  var yieldfrom = Expression.extends(KIND, function YieldFrom(value, docs, location) {
-    Expression.apply(this, [KIND, docs, location]);
+  var yieldfrom = expression.extends(KIND, function YieldFrom(value, docs, location) {
+    expression.apply(this, [KIND, docs, location]);
     this.value = value;
   });
 
-  /**
-   * Copyright (C) 2018 Glayzzle (BSD3 License)
-   * @authors https://github.com/glayzzle/php-parser/graphs/contributors
-   * @url http://glayzzle.com
-   */
-
-  var Location = location;
-  var Position = position;
   /**
    * ## Class hierarchy
    *
@@ -11170,20 +10489,21 @@
    * @property {Boolean} withSource - Should extract the node original code (by default false)
    */
 
-  var AST$1 = function AST(withPositions, withSource) {
+
+  var AST = function AST(withPositions, withSource) {
     this.withPositions = withPositions;
     this.withSource = withSource;
   }; // operators in ascending order of precedence
 
 
-  AST$1.precedence = {};
+  AST.precedence = {};
   [["or"], ["xor"], ["and"], ["="], ["?"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "!=", "===", "!==",
   /* '<>', */
   "<=>"], ["<", "<=", ">", ">="], ["<<", ">>"], ["+", "-", "."], ["*", "/", "%"], ["!"], ["instanceof"], ["cast", "silent"], ["**"] // TODO: [ (array)
   // TODO: clone, new
   ].forEach(function (list, index) {
     list.forEach(function (operator) {
-      AST$1.precedence[operator] = index + 1;
+      AST.precedence[operator] = index + 1;
     });
   });
   /**
@@ -11194,7 +10514,7 @@
    * @return {boolean}
    */
 
-  AST$1.prototype.isRightAssociative = function (operator) {
+  AST.prototype.isRightAssociative = function (operator) {
     return operator === "**" || operator === "??";
   };
   /**
@@ -11205,7 +10525,7 @@
    */
 
 
-  AST$1.prototype.swapLocations = function (target, first, last, parser) {
+  AST.prototype.swapLocations = function (target, first, last, parser) {
     if (this.withPositions) {
       target.loc.start = first.loc.start;
       target.loc.end = last.loc.end;
@@ -11223,7 +10543,7 @@
    */
 
 
-  AST$1.prototype.resolveLocations = function (target, first, last, parser) {
+  AST.prototype.resolveLocations = function (target, first, last, parser) {
     if (this.withPositions) {
       if (target.loc.start.offset > first.loc.start.offset) {
         target.loc.start = first.loc.start;
@@ -11248,7 +10568,7 @@
    */
 
 
-  AST$1.prototype.resolvePrecedence = function (result, parser) {
+  AST.prototype.resolvePrecedence = function (result, parser) {
     var buffer, lLevel, rLevel; // handling precendence
 
     if (result.kind === "call") {
@@ -11260,8 +10580,8 @@
     } else if (result.kind === "bin") {
       if (result.right && !result.right.parenthesizedExpression) {
         if (result.right.kind === "bin") {
-          lLevel = AST$1.precedence[result.type];
-          rLevel = AST$1.precedence[result.right.type];
+          lLevel = AST.precedence[result.type];
+          rLevel = AST.precedence[result.right.type];
 
           if (lLevel && rLevel && rLevel <= lLevel && (result.type !== result.right.type || !this.isRightAssociative(result.type))) {
             // https://github.com/glayzzle/php-parser/issues/79
@@ -11274,8 +10594,8 @@
             result = buffer;
           }
         } else if (result.right.kind === "retif") {
-          lLevel = AST$1.precedence[result.type];
-          rLevel = AST$1.precedence["?"];
+          lLevel = AST.precedence[result.type];
+          rLevel = AST.precedence["?"];
 
           if (lLevel && rLevel && rLevel <= lLevel) {
             buffer = result.right;
@@ -11337,8 +10657,8 @@
     } else if (result.kind === "assign") {
       // https://github.com/glayzzle/php-parser/issues/81
       if (result.right && result.right.kind === "bin" && !result.right.parenthesizedExpression) {
-        lLevel = AST$1.precedence["="];
-        rLevel = AST$1.precedence[result.right.type]; // only shifts with and, xor, or
+        lLevel = AST.precedence["="];
+        rLevel = AST.precedence[result.right.type]; // only shifts with and, xor, or
 
         if (lLevel && rLevel && rLevel < lLevel) {
           buffer = result.right;
@@ -11366,7 +10686,7 @@
    */
 
 
-  AST$1.prototype.prepare = function (kind, docs, parser) {
+  AST.prototype.prepare = function (kind, docs, parser) {
     var start = null;
 
     if (this.withPositions || this.withSource) {
@@ -11388,7 +10708,7 @@
         } // if with source, need location on swapLocations function
 
 
-        location = new Location(src, start, new Position(parser.prev[0], parser.prev[1], parser.prev[2])); // last argument is always the location
+        location = new location_1(src, start, new position(parser.prev[0], parser.prev[1], parser.prev[2])); // last argument is always the location
 
         args.push(location);
       } // handle lazy kind definitions
@@ -11482,7 +10802,7 @@
     return result;
   };
 
-  AST$1.prototype.checkNodes = function () {
+  AST.prototype.checkNodes = function () {
     var errors = [];
 
     for (var k in this.stack) {
@@ -11497,19 +10817,16 @@
   }; // Define all AST nodes
 
 
-  [array, arrowfunc, assign, assignref, attribute, attrgroup, bin, block, boolean, _break, byref, call, _case, cast, _catch, _class, classconstant, clone, closure, comment, commentblock, commentline, constant, constantstatement, _continue, declaration, declare, declaredirective, _do, echo, empty, encapsed, encapsedpart, entry, _enum, enumcase, error, _eval, exit, expression, expressionstatement, _for, foreach, _function, global$1, goto, halt, identifier, _if, include, inline, _interface, intersectiontype, isset, label, list, literal, lookup, magic, match, matcharm, method, name, namespace, namedargument, _new, node, noop, nowdoc, nullkeyword, nullsafepropertylookup, number, offsetlookup, operation, parameter, parentreference, post, pre, print, program, property, propertylookup, propertystatement, reference, retif, _return, selfreference, silent, statement, _static, staticvariable, staticlookup, staticreference, string, _switch, _throw, trait, traitalias, traitprecedence, traituse, _try, typereference, unary, uniontype, unset, usegroup, useitem, variable, variadic, variadicplaceholder, _while, _yield, yieldfrom].forEach(function (ctor) {
-    AST$1.prototype[ctor.kind] = ctor;
+  [array, arrowfunc, assign, assignref, attribute, attrgroup, bin, block, boolean_1, _break, byref, call, _case, cast, _catch, _class, classconstant, clone, closure, comment, commentblock, commentline, constant, constantstatement, _continue, declaration, declare, declaredirective, _do, echo, empty, encapsed, encapsedpart, entry, _enum, enumcase, error, _eval, exit, expression, expressionstatement, _for, foreach, _function, global$1, goto_1, halt, identifier, _if, include, inline, _interface, intersectiontype, isset, label, list, literal, lookup, magic, match, matcharm, method, name, namespace, namedargument, _new, node, noop, nowdoc, nullkeyword, nullsafepropertylookup, number, offsetlookup, operation, parameter, parentreference, post, pre, print, program, property, propertylookup, propertystatement, reference, retif, _return, selfreference, silent, statement, _static, staticvariable, staticlookup, staticreference, string, _switch, _throw, trait, traitalias, traitprecedence, traituse, _try, typereference, unary, uniontype, unset, usegroup, useitem, variable, variadic, variadicplaceholder, _while, _yield, yieldfrom].forEach(function (ctor) {
+    AST.prototype[ctor.kind] = ctor;
   });
-  var ast = AST$1;
+  var ast = AST;
 
-  var lexer = lexer$1;
-  var parser = parser$1;
-  var tokens = tokens_1;
-  var AST = ast;
   /**
    * @private
    */
 
+
   function combine(src, to) {
     var keys = Object.keys(src);
     var i = keys.length;
@@ -11573,10 +10890,10 @@
       return new this(options);
     }
 
-    this.tokens = tokens;
+    this.tokens = tokens_1$1;
     this.lexer = new lexer(this);
-    this.ast = new AST();
-    this.parser = new parser(this.lexer, this.ast);
+    this.ast = new ast();
+    this.parser = new parser$1(this.lexer, this.ast);
 
     if (options && _typeof(options) === "object") {
       // disable php7 from lexer if already disabled from parser
@@ -11744,19 +11061,23 @@
   // exports the function
 
 
-  src.exports = Engine; // makes libraries public
-
-  src.exports.tokens = tokens;
-  src.exports.lexer = lexer;
-  src.exports.AST = AST;
-  src.exports.parser = parser;
-  src.exports.combine = combine;
-  src.exports.Engine = Engine; // allow the default export in index.d.ts
+  var src$1 = Engine; // makes libraries public
 
-  src.exports.default = Engine;
+  var tokens_1 = tokens_1$1;
+  var lexer_1 = lexer;
+  var AST_1 = ast;
+  var parser_1 = parser$1;
+  var combine_1 = combine;
+  var Engine_1 = Engine; // allow the default export in index.d.ts
 
-  var srcExports = src.exports;
-  var engine = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
+  var default_1 = Engine;
+  src$1.tokens = tokens_1;
+  src$1.lexer = lexer_1;
+  src$1.AST = AST_1;
+  src$1.parser = parser_1;
+  src$1.combine = combine_1;
+  src$1.Engine = Engine_1;
+  src$1.default = default_1;
 
   function parse(text, opts) {
     var inMarkdown = opts && opts.parentParser === "markdown";
@@ -11768,7 +11089,7 @@
 
     text = text.replace(/\?>\n<\?/g, "?>\n___PSEUDO_INLINE_PLACEHOLDER___<?"); // initialize a new parser instance
 
-    var parser = new engine({
+    var parser = new src$1({
       parser: {
         extractDoc: true
       },
@@ -11813,30 +11134,34 @@
     return ast;
   }
 
-  var hasNewline$2 = prettier.util.hasNewline,
-      skipEverythingButNewLine = prettier.util.skipEverythingButNewLine,
-      skipNewline$1 = prettier.util.skipNewline,
-      _isNextLineEmpty = prettier.util.isNextLineEmpty,
-      _isPreviousLineEmpty = prettier.util.isPreviousLineEmpty,
-      _getNextNonSpaceNonCommentCharacterIndex = prettier.util.getNextNonSpaceNonCommentCharacterIndex;
+  var parser = parse;
+
+  var _require$$0$util$2 = prettier__default["default"].util,
+      hasNewline$2 = _require$$0$util$2.hasNewline,
+      skipEverythingButNewLine = _require$$0$util$2.skipEverythingButNewLine,
+      skipNewline$1 = _require$$0$util$2.skipNewline,
+      _isNextLineEmpty = _require$$0$util$2.isNextLineEmpty,
+      _isPreviousLineEmpty = _require$$0$util$2.isPreviousLineEmpty,
+      _getNextNonSpaceNonCommentCharacterIndex = _require$$0$util$2.getNextNonSpaceNonCommentCharacterIndex;
+  var prettierVersion = prettier__default["default"].version;
 
   function lookupIfPrettier2(options, prop) {
-    return parseInt(prettier.version[0]) > 1 ? options[prop] : options;
+    return parseInt(prettierVersion[0]) > 1 ? options[prop] : options;
   }
 
-  function isPreviousLineEmpty(text, node, options) {
+  function isPreviousLineEmpty$2(text, node, options) {
     return _isPreviousLineEmpty(text, node, lookupIfPrettier2(options, "locStart"));
   }
 
-  function isNextLineEmpty(text, node, options) {
+  function isNextLineEmpty$2(text, node, options) {
     return _isNextLineEmpty(text, node, lookupIfPrettier2(options, "locEnd"));
   }
 
-  function getNextNonSpaceNonCommentCharacterIndex(text, node, options) {
+  function getNextNonSpaceNonCommentCharacterIndex$2(text, node, options) {
     return _getNextNonSpaceNonCommentCharacterIndex(text, node, lookupIfPrettier2(options, "locEnd"));
   }
 
-  function printNumber(rawNumber) {
+  function printNumber$1(rawNumber) {
     return rawNumber.toLowerCase() // Remove unnecessary plus and zeroes from scientific notation.
     .replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3") // Remove unnecessary scientific notation (1e0).
     .replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1") // Make sure numbers always start with a digit.
@@ -11853,7 +11178,7 @@
     });
   });
 
-  function getPrecedence(op) {
+  function getPrecedence$1(op) {
     return PRECEDENCE[op];
   }
 
@@ -11861,12 +11186,12 @@
   var multiplicativeOperators = ["*", "/", "%"];
   var bitshiftOperators = [">>", "<<"];
 
-  function isBitwiseOperator(operator) {
+  function isBitwiseOperator$1(operator) {
     return !!bitshiftOperators[operator] || operator === "|" || operator === "^" || operator === "&";
   }
 
-  function shouldFlatten(parentOp, nodeOp) {
-    if (getPrecedence(nodeOp) !== getPrecedence(parentOp)) {
+  function shouldFlatten$2(parentOp, nodeOp) {
+    if (getPrecedence$1(nodeOp) !== getPrecedence$1(parentOp)) {
       return false;
     } // ** is right-associative
     // x ** y ** z --> x ** (y ** z)
@@ -11933,7 +11258,7 @@
     return getNodeListProperty(parent);
   }
 
-  function getLast(arr) {
+  function getLast$1(arr) {
     if (arr.length > 0) {
       return arr[arr.length - 1];
     }
@@ -11941,7 +11266,7 @@
     return null;
   }
 
-  function getPenultimate(arr) {
+  function getPenultimate$1(arr) {
     if (arr.length > 1) {
       return arr[arr.length - 2];
     }
@@ -11949,7 +11274,7 @@
     return null;
   }
 
-  function isLastStatement(path) {
+  function isLastStatement$1(path) {
     var body = getParentNodeListProperty(path);
 
     if (!body) {
@@ -11960,7 +11285,7 @@
     return body[body.length - 1] === node;
   }
 
-  function isFirstChildrenInlineNode(path) {
+  function isFirstChildrenInlineNode$1(path) {
     var node = path.getValue();
 
     if (node.kind === "program") {
@@ -12009,7 +11334,7 @@
     return firstChild.kind === "inline";
   }
 
-  function isDocNode(node) {
+  function isDocNode$1(node) {
     return node.kind === "nowdoc" || node.kind === "encapsed" && node.type === "heredoc";
   }
   /**
@@ -12018,7 +11343,7 @@
    */
 
 
-  function docShouldHaveTrailingNewline(path) {
+  function docShouldHaveTrailingNewline$1(path) {
     var recurse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
     var node = path.getNode(recurse);
     var parent = path.getNode(recurse + 1);
@@ -12055,7 +11380,7 @@
     }
 
     if (parent.kind === "bin") {
-      return parent.left === node || docShouldHaveTrailingNewline(path, recurse + 1);
+      return parent.left === node || docShouldHaveTrailingNewline$1(path, recurse + 1);
     }
 
     if (parent.kind === "case" && parent.test === node) {
@@ -12107,13 +11432,13 @@
     }
 
     if (parent.kind === "retif") {
-      return docShouldHaveTrailingNewline(path, recurse + 1);
+      return docShouldHaveTrailingNewline$1(path, recurse + 1);
     }
 
     return false;
   }
 
-  function lineShouldEndWithSemicolon(path) {
+  function lineShouldEndWithSemicolon$1(path) {
     var node = path.getValue();
     var parentNode = path.getParentNode();
 
@@ -12154,10 +11479,10 @@
     return ["expressionstatement", "do", "usegroup", "classconstant", "propertystatement", "traitprecedence", "traitalias", "goto", "constantstatement", "enumcase", "global", "static", "echo", "unset", "return", "break", "continue", "throw"].includes(node.kind);
   }
 
-  function fileShouldEndWithHardline(path) {
+  function fileShouldEndWithHardline$1(path) {
     var node = path.getValue();
     var isProgramNode = node.kind === "program";
-    var lastNode = node.children && getLast(node.children);
+    var lastNode = node.children && getLast$1(node.children);
 
     if (!isProgramNode) {
       return false;
@@ -12168,7 +11493,7 @@
     }
 
     if (lastNode && (lastNode.kind === "declare" || lastNode.kind === "namespace")) {
-      var lastNestedNode = lastNode.children.length > 0 && getLast(lastNode.children);
+      var lastNestedNode = lastNode.children.length > 0 && getLast$1(lastNode.children);
 
       if (lastNestedNode && ["halt", "inline"].includes(lastNestedNode.kind)) {
         return false;
@@ -12178,7 +11503,7 @@
     return true;
   }
 
-  function maybeStripLeadingSlashFromUse(name) {
+  function maybeStripLeadingSlashFromUse$1(name) {
     var nameWithoutLeadingSlash = name.replace(/^\\/, "");
 
     if (nameWithoutLeadingSlash.indexOf("\\") !== -1) {
@@ -12188,27 +11513,39 @@
     return name;
   }
 
-  function hasDanglingComments(node) {
+  function hasDanglingComments$1(node) {
     return node.comments && node.comments.some(function (comment) {
       return !comment.leading && !comment.trailing;
     });
   }
 
-  function isLookupNode(node) {
+  function hasLeadingComment$2(node) {
+    return node.comments && node.comments.some(function (comment) {
+      return comment.leading;
+    });
+  }
+
+  function hasTrailingComment$2(node) {
+    return node.comments && node.comments.some(function (comment) {
+      return comment.trailing;
+    });
+  }
+
+  function isLookupNode$2(node) {
     return node.kind === "propertylookup" || node.kind === "nullsafepropertylookup" || node.kind === "staticlookup" || node.kind === "offsetlookup";
   }
 
-  function shouldPrintHardLineAfterStartInControlStructure(path) {
+  function shouldPrintHardLineAfterStartInControlStructure$1(path) {
     var node = path.getValue();
 
     if (["try", "catch"].includes(node.kind)) {
       return false;
     }
 
-    return isFirstChildrenInlineNode(path);
+    return isFirstChildrenInlineNode$1(path);
   }
 
-  function shouldPrintHardLineBeforeEndInControlStructure(path) {
+  function shouldPrintHardLineBeforeEndInControlStructure$1(path) {
     var node = path.getValue();
 
     if (["try", "catch"].includes(node.kind)) {
@@ -12222,7 +11559,7 @@
         return true;
       }
 
-      var lastCase = getLast(children);
+      var lastCase = getLast$1(children);
 
       if (!lastCase.body) {
         return true;
@@ -12237,16 +11574,16 @@
       return childrenInCase[0].kind !== "inline";
     }
 
-    return !isFirstChildrenInlineNode(path);
+    return !isFirstChildrenInlineNode$1(path);
   }
 
-  function getAlignment(text) {
+  function getAlignment$1(text) {
     var lines = text.split("\n");
     var lastLine = lines.pop();
     return lastLine.length - lastLine.trimLeft().length + 1;
   }
 
-  function getNextNode(path, node) {
+  function getNextNode$1(path, node) {
     var parent = path.getParentNode();
     var children = getNodeListProperty(parent);
 
@@ -12263,17 +11600,17 @@
     return parent.children[index + 1];
   }
 
-  function isProgramLikeNode(node) {
+  function isProgramLikeNode$1(node) {
     return ["program", "declare", "namespace"].includes(node.kind);
   }
 
-  function isReferenceLikeNode(node) {
+  function isReferenceLikeNode$1(node) {
     return ["name", "parentreference", "selfreference", "staticreference"].includes(node.kind);
   } // Return `logical` value for `bin` node containing `||` or `&&` type otherwise return kind of node.
   // Require for grouping logical and binary nodes in right way.
 
 
-  function getNodeKindIncludingLogical(node) {
+  function getNodeKindIncludingLogical$1(node) {
     if (node.kind === "bin" && ["||", "&&"].includes(node.type)) {
       return "logical";
     }
@@ -12292,7 +11629,7 @@
    */
 
 
-  function useDoubleQuote(node, options) {
+  function useDoubleQuote$1(node, options) {
     if (node.isDoubleQuote === options.singleQuote) {
       // We have a double quote and the user passed singleQuote:true, or the other way around.
       var rawValue = node.raw.slice(node.raw[0] === "b" ? 2 : 1, -1);
@@ -12303,20 +11640,20 @@
     return node.isDoubleQuote;
   }
 
-  function hasEmptyBody(path) {
+  function hasEmptyBody$1(path) {
     var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "body";
     var node = path.getValue();
     return node[name] && node[name].children && node[name].children.length === 0 && (!node[name].comments || node[name].comments.length === 0);
   }
 
-  function isNextLineEmptyAfterNamespace(text, node, locStart) {
+  function isNextLineEmptyAfterNamespace$1(text, node, locStart) {
     var idx = locStart(node);
     idx = skipEverythingButNewLine(text, idx);
     idx = skipNewline$1(text, idx);
     return hasNewline$2(text, idx);
   }
 
-  function shouldPrintHardlineBeforeTrailingComma(lastElem) {
+  function shouldPrintHardlineBeforeTrailingComma$1(lastElem) {
     if (lastElem.kind === "nowdoc" || lastElem.kind === "encapsed" && lastElem.type === "heredoc") {
       return true;
     }
@@ -12342,7 +11679,7 @@
     return -1;
   }
 
-  function getAncestorNode(path, typeOrTypes) {
+  function getAncestorNode$1(path, typeOrTypes) {
     var counter = getAncestorCounter(path, typeOrTypes);
     return counter === -1 ? null : path.getParentNode(counter);
   }
@@ -12353,7 +11690,7 @@
     return map;
   }, {});
 
-  function normalizeMagicMethodName(name) {
+  function normalizeMagicMethodName$1(name) {
     var loweredName = name.toLowerCase();
 
     if (MagicMethodsMap[loweredName]) {
@@ -12363,19 +11700,64 @@
     return name;
   }
 
-  var addLeadingComment = prettier.util.addLeadingComment,
-      addDanglingComment = prettier.util.addDanglingComment,
-      addTrailingComment = prettier.util.addTrailingComment,
-      skipNewline = prettier.util.skipNewline,
-      hasNewline$1 = prettier.util.hasNewline,
-      hasNewlineInRange$1 = prettier.util.hasNewlineInRange;
-  var _doc$builders$2 = prettier.doc.builders,
-      join$2 = _doc$builders$2.join,
-      indent$1 = _doc$builders$2.indent,
-      hardline$2 = _doc$builders$2.hardline,
-      cursor = _doc$builders$2.cursor,
-      lineSuffix$1 = _doc$builders$2.lineSuffix,
-      breakParent$1 = _doc$builders$2.breakParent;
+  var util = {
+    printNumber: printNumber$1,
+    getPrecedence: getPrecedence$1,
+    isBitwiseOperator: isBitwiseOperator$1,
+    shouldFlatten: shouldFlatten$2,
+    nodeHasStatement: nodeHasStatement,
+    getNodeListProperty: getNodeListProperty,
+    getParentNodeListProperty: getParentNodeListProperty,
+    getLast: getLast$1,
+    getPenultimate: getPenultimate$1,
+    isLastStatement: isLastStatement$1,
+    getBodyFirstChild: getBodyFirstChild,
+    lineShouldEndWithSemicolon: lineShouldEndWithSemicolon$1,
+    fileShouldEndWithHardline: fileShouldEndWithHardline$1,
+    maybeStripLeadingSlashFromUse: maybeStripLeadingSlashFromUse$1,
+    hasDanglingComments: hasDanglingComments$1,
+    hasLeadingComment: hasLeadingComment$2,
+    hasTrailingComment: hasTrailingComment$2,
+    docShouldHaveTrailingNewline: docShouldHaveTrailingNewline$1,
+    isLookupNode: isLookupNode$2,
+    isFirstChildrenInlineNode: isFirstChildrenInlineNode$1,
+    shouldPrintHardLineAfterStartInControlStructure: shouldPrintHardLineAfterStartInControlStructure$1,
+    shouldPrintHardLineBeforeEndInControlStructure: shouldPrintHardLineBeforeEndInControlStructure$1,
+    getAlignment: getAlignment$1,
+    isProgramLikeNode: isProgramLikeNode$1,
+    isReferenceLikeNode: isReferenceLikeNode$1,
+    getNodeKindIncludingLogical: getNodeKindIncludingLogical$1,
+    useDoubleQuote: useDoubleQuote$1,
+    hasEmptyBody: hasEmptyBody$1,
+    isNextLineEmptyAfterNamespace: isNextLineEmptyAfterNamespace$1,
+    shouldPrintHardlineBeforeTrailingComma: shouldPrintHardlineBeforeTrailingComma$1,
+    isDocNode: isDocNode$1,
+    getAncestorNode: getAncestorNode$1,
+    getNextNode: getNextNode$1,
+    normalizeMagicMethodName: normalizeMagicMethodName$1,
+    isPreviousLineEmpty: isPreviousLineEmpty$2,
+    isNextLineEmpty: isNextLineEmpty$2,
+    getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$2
+  };
+
+  var _require$$0$util$1 = prettier__default["default"].util,
+      addLeadingComment = _require$$0$util$1.addLeadingComment,
+      addDanglingComment = _require$$0$util$1.addDanglingComment,
+      addTrailingComment = _require$$0$util$1.addTrailingComment,
+      skipNewline = _require$$0$util$1.skipNewline,
+      hasNewline$1 = _require$$0$util$1.hasNewline,
+      hasNewlineInRange$1 = _require$$0$util$1.hasNewlineInRange;
+  var _require$$0$doc$build$2 = prettier__default["default"].doc.builders,
+      join$2 = _require$$0$doc$build$2.join,
+      indent$1 = _require$$0$doc$build$2.indent,
+      hardline$2 = _require$$0$doc$build$2.hardline,
+      cursor = _require$$0$doc$build$2.cursor,
+      lineSuffix$1 = _require$$0$doc$build$2.lineSuffix,
+      breakParent$1 = _require$$0$doc$build$2.breakParent;
+  var getNextNonSpaceNonCommentCharacterIndex$1 = util.getNextNonSpaceNonCommentCharacterIndex,
+      isNextLineEmpty$1 = util.isNextLineEmpty,
+      isPreviousLineEmpty$1 = util.isPreviousLineEmpty,
+      isLookupNode$1 = util.isLookupNode;
   /*
   Comment functions are meant to inspect various edge cases using given comment nodes,
   with information about where those comment nodes exist in the tree (ie enclosingNode,
@@ -12451,7 +11833,7 @@
   }
 
   function handleLastFunctionArgComments(text, precedingNode, enclosingNode, followingNode, comment, options) {
-    var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex(text, comment, options);
+    var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$1(text, comment, options);
     var nextCharacter = text.charAt(nextCharIndex); // Real functions
 
     if (precedingNode && precedingNode.kind === "identifier" && enclosingNode && (enclosingNode.kind === "function" || enclosingNode.kind === "method") && nextCharacter === ")") {
@@ -12468,7 +11850,7 @@
   }
 
   function handleMemberExpressionComments(enclosingNode, followingNode, comment) {
-    if (enclosingNode && isLookupNode(enclosingNode) && followingNode && ["identifier", "variable", "encapsed"].includes(followingNode.kind)) {
+    if (enclosingNode && isLookupNode$1(enclosingNode) && followingNode && ["identifier", "variable", "encapsed"].includes(followingNode.kind)) {
       addLeadingComment(enclosingNode, comment);
       return true;
     }
@@ -12481,7 +11863,7 @@
       return false;
     }
 
-    var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex(text, comment, options);
+    var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$1(text, comment, options);
     var nextCharacter = text.charAt(nextCharIndex);
 
     if (nextCharacter === ")") {
@@ -12617,7 +11999,7 @@
       }
 
       var commentIsBetweenArgumentsAndBody = enclosingNode.body && options.locStart(comment) > argumentsLocEnd && options.locEnd(comment) < options.locStart(enclosingNode.body);
-      var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex(text, comment, options); // we additionally need to check if this isn't a trailing argument comment,
+      var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$1(text, comment, options); // we additionally need to check if this isn't a trailing argument comment,
       // by checking the next character isn't ")"
 
       if (enclosingNode.type && commentIsBetweenArgumentsAndBody && text.charAt(nextCharIndex) !== ")") {
@@ -12683,7 +12065,7 @@
   }
 
   function handleCommentInEmptyParens(text, enclosingNode, comment, options) {
-    var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex(text, comment, options);
+    var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$1(text, comment, options);
 
     if (text.charAt(nextCharIndex) !== ")") {
       return false;
@@ -12821,7 +12203,7 @@
     // it is a ).
 
 
-    var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex(text, comment, options);
+    var nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$1(text, comment, options);
     var nextCharacter = text.charAt(nextCharIndex);
 
     if (nextCharacter === ")") {
@@ -12872,13 +12254,13 @@
     return indent$1([hardline$2, join$2(hardline$2, parts)]);
   }
 
-  function hasLeadingComment(node) {
+  function hasLeadingComment$1(node) {
     return node.comments && node.comments.some(function (comment) {
       return comment.leading;
     });
   }
 
-  function hasTrailingComment(node) {
+  function hasTrailingComment$1(node) {
     return node.comments && node.comments.some(function (comment) {
       return comment.trailing;
     });
@@ -12901,7 +12283,7 @@
         parts.push(hardline$2);
       }
 
-      if (isNextLineEmpty(options.originalText, comment, options) && !isLastComment) {
+      if (isNextLineEmpty$1(options.originalText, comment, options) && !isLastComment) {
         parts.push(hardline$2);
       }
     });
@@ -12976,7 +12358,7 @@
       // trailing comment for `2`. We can simulate the above by checking
       // if this a comment on its own line; normal trailing comments are
       // always at the end of another expression.
-      var isLineBeforeEmpty = isPreviousLineEmpty(options.originalText, comment, options);
+      var isLineBeforeEmpty = isPreviousLineEmpty$1(options.originalText, comment, options);
       return lineSuffix$1([hardline$2, isLineBeforeEmpty ? hardline$2 : "", contents]);
     } else if (isBlock) {
       // Trailing block comments never need a newline
@@ -13022,11 +12404,30 @@
     return prependCursorPlaceholder(path, options, leadingParts.concat(trailingParts));
   }
 
-  var assert = new Proxy(function () {}, {
-    get: function get() {
-      return assert;
-    }
-  });
+  var comments = {
+    handleOwnLineComment: handleOwnLineComment,
+    handleEndOfLineComment: handleEndOfLineComment,
+    handleRemainingComment: handleRemainingComment,
+    getCommentChildNodes: getCommentChildNodes,
+    canAttachComment: canAttachComment,
+    isBlockComment: isBlockComment,
+    printDanglingComments: printDanglingComments,
+    hasLeadingComment: hasLeadingComment$1,
+    hasTrailingComment: hasTrailingComment$1,
+    hasLeadingOwnLineComment: hasLeadingOwnLineComment,
+    printComments: printComments,
+    printAllComments: printAllComments
+  };
+
+  function assert() {}
+
+  assert.strictEqual = function () {};
+
+  var assert_1 = assert;
+
+  var getPrecedence = util.getPrecedence,
+      shouldFlatten$1 = util.shouldFlatten,
+      isBitwiseOperator = util.isBitwiseOperator;
 
   function needsParens(path) {
     var parent = path.getParentNode();
@@ -13112,11 +12513,11 @@
                 }
 
                 if (pp === np && name === "right") {
-                  assert.strictEqual(parent.right, node);
+                  assert_1.strictEqual(parent.right, node);
                   return true;
                 }
 
-                if (pp === np && !shouldFlatten(po, no)) {
+                if (pp === np && !shouldFlatten$1(po, no)) {
                   return true;
                 }
 
@@ -13275,25 +12676,59 @@
     return false;
   }
 
-  var _doc$builders$1 = prettier.doc.builders,
-      breakParent = _doc$builders$1.breakParent,
-      join$1 = _doc$builders$1.join,
-      line = _doc$builders$1.line,
-      lineSuffix = _doc$builders$1.lineSuffix,
-      group = _doc$builders$1.group,
-      conditionalGroup = _doc$builders$1.conditionalGroup,
-      indent = _doc$builders$1.indent,
-      dedent = _doc$builders$1.dedent,
-      ifBreak = _doc$builders$1.ifBreak,
-      hardline$1 = _doc$builders$1.hardline,
-      softline = _doc$builders$1.softline,
-      literalline = _doc$builders$1.literalline,
-      align = _doc$builders$1.align,
-      dedentToRoot = _doc$builders$1.dedentToRoot;
-  var willBreak = prettier.doc.utils.willBreak;
-  var isNextLineEmptyAfterIndex = prettier.util.isNextLineEmptyAfterIndex,
-      hasNewline = prettier.util.hasNewline,
-      hasNewlineInRange = prettier.util.hasNewlineInRange;
+  var needsParens_1 = needsParens;
+
+  var _require$$0$doc$build$1 = prettier__default["default"].doc.builders,
+      breakParent = _require$$0$doc$build$1.breakParent,
+      join$1 = _require$$0$doc$build$1.join,
+      line = _require$$0$doc$build$1.line,
+      lineSuffix = _require$$0$doc$build$1.lineSuffix,
+      group = _require$$0$doc$build$1.group,
+      conditionalGroup = _require$$0$doc$build$1.conditionalGroup,
+      indent = _require$$0$doc$build$1.indent,
+      dedent = _require$$0$doc$build$1.dedent,
+      ifBreak = _require$$0$doc$build$1.ifBreak,
+      hardline$1 = _require$$0$doc$build$1.hardline,
+      softline = _require$$0$doc$build$1.softline,
+      literalline = _require$$0$doc$build$1.literalline,
+      align = _require$$0$doc$build$1.align,
+      dedentToRoot = _require$$0$doc$build$1.dedentToRoot;
+  var willBreak = prettier__default["default"].doc.utils.willBreak;
+  var _require$$0$util = prettier__default["default"].util,
+      isNextLineEmptyAfterIndex = _require$$0$util.isNextLineEmptyAfterIndex,
+      hasNewline = _require$$0$util.hasNewline,
+      hasNewlineInRange = _require$$0$util.hasNewlineInRange;
+  var getLast = util.getLast,
+      getPenultimate = util.getPenultimate,
+      isLastStatement = util.isLastStatement,
+      lineShouldEndWithSemicolon = util.lineShouldEndWithSemicolon,
+      printNumber = util.printNumber,
+      shouldFlatten = util.shouldFlatten,
+      maybeStripLeadingSlashFromUse = util.maybeStripLeadingSlashFromUse,
+      fileShouldEndWithHardline = util.fileShouldEndWithHardline,
+      hasDanglingComments = util.hasDanglingComments,
+      hasLeadingComment = util.hasLeadingComment,
+      hasTrailingComment = util.hasTrailingComment,
+      docShouldHaveTrailingNewline = util.docShouldHaveTrailingNewline,
+      isLookupNode = util.isLookupNode,
+      isFirstChildrenInlineNode = util.isFirstChildrenInlineNode,
+      shouldPrintHardLineAfterStartInControlStructure = util.shouldPrintHardLineAfterStartInControlStructure,
+      shouldPrintHardLineBeforeEndInControlStructure = util.shouldPrintHardLineBeforeEndInControlStructure,
+      getAlignment = util.getAlignment,
+      isProgramLikeNode = util.isProgramLikeNode,
+      getNodeKindIncludingLogical = util.getNodeKindIncludingLogical,
+      useDoubleQuote = util.useDoubleQuote,
+      hasEmptyBody = util.hasEmptyBody,
+      isNextLineEmptyAfterNamespace = util.isNextLineEmptyAfterNamespace,
+      shouldPrintHardlineBeforeTrailingComma = util.shouldPrintHardlineBeforeTrailingComma,
+      isDocNode = util.isDocNode,
+      getAncestorNode = util.getAncestorNode,
+      isReferenceLikeNode = util.isReferenceLikeNode,
+      getNextNode = util.getNextNode,
+      normalizeMagicMethodName = util.normalizeMagicMethodName,
+      getNextNonSpaceNonCommentCharacterIndex = util.getNextNonSpaceNonCommentCharacterIndex,
+      isNextLineEmpty = util.isNextLineEmpty,
+      isPreviousLineEmpty = util.isPreviousLineEmpty;
 
   function isMinVersion(actualVersion, requiredVersion) {
     return parseFloat(actualVersion) >= parseFloat(requiredVersion);
@@ -13330,15 +12765,15 @@
 
     var printedWithoutParens = printNode(path, options, print);
     var parts = [];
-    var needsParens$1 = needsParens(path);
+    var needsParens = needsParens_1(path);
 
-    if (needsParens$1) {
+    if (needsParens) {
       parts.unshift("(");
     }
 
     parts.push(printedWithoutParens);
 
-    if (needsParens$1) {
+    if (needsParens) {
       parts.push(")");
     }
 
@@ -13434,7 +12869,7 @@
       if (node.kind === "call" && (isLookupNode(node.what) || node.what.kind === "call")) {
         printedNodes.unshift({
           node: node,
-          printed: [printAllComments(path, function () {
+          printed: [comments.printAllComments(path, function () {
             return printArgumentsList(path, options, print);
           }, options), shouldInsertEmptyLineAfter(node) ? hardline$1 : ""]
         });
@@ -13457,8 +12892,8 @@
 
         printedNodes.unshift({
           node: node,
-          needsParens: needsParens(path),
-          printed: printAllComments(path, function () {
+          needsParens: needsParens_1(path),
+          printed: comments.printAllComments(path, function () {
             return printedMemberish;
           }, options)
         });
@@ -13554,7 +12989,7 @@
 
       currentGroup.push(printedNodes[i]);
 
-      if (printedNodes[i].node.comments && hasTrailingComment(printedNodes[i].node)) {
+      if (printedNodes[i].node.comments && comments.hasTrailingComment(printedNodes[i].node)) {
         groups.push(currentGroup);
         currentGroup = [];
         hasSeenCallExpression = false;
@@ -13644,10 +13079,10 @@
     var cutoff = shouldMerge ? 3 : 2;
     var flatGroups = groups.slice(0, cutoff).flat();
     var hasComment = flatGroups.slice(1, -1).some(function (node) {
-      return hasLeadingComment(node.node);
+      return comments.hasLeadingComment(node.node);
     }) || flatGroups.slice(0, -1).some(function (node) {
-      return hasTrailingComment(node.node);
-    }) || groups[cutoff] && hasLeadingComment(groups[cutoff][0].node);
+      return comments.hasTrailingComment(node.node);
+    }) || groups[cutoff] && comments.hasLeadingComment(groups[cutoff][0].node);
     var hasEncapsedAncestor = getAncestorNode(path, "encapsed"); // If we only have a single `->`, we shouldn't do anything fancy and just
     // render everything concatenated together.
     // In `encapsed` node we always print in one line.
@@ -13708,7 +13143,7 @@
     var args = path.getValue()[argumentsKey];
 
     if (args.length === 0) {
-      return ["(", printDanglingComments(path, options,
+      return ["(", comments.printDanglingComments(path, options,
       /* sameIndent */
       true), ")"];
     }
@@ -13841,7 +13276,7 @@
       // only for the left and right parts
 
       if (isNested && node.comments) {
-        parts = printAllComments(path, function () {
+        parts = comments.printAllComments(path, function () {
           return parts;
         }, options);
       }
@@ -13999,10 +13434,10 @@
 
       if (isInlineNode) {
         var openTag = nextNode && nextNode.kind === "echo" && nextNode.shortForm ? "<?=" : "<?php";
-        var beforeInline = childNode.leadingComments && childNode.leadingComments.length ? [isFirstNode && node.kind !== "namespace" && !isBlockNestedNode ? "<?php" : "", node.kind === "namespace" || !isBlockNestedNode ? hardline$1 : "", printComments(childNode.leadingComments, options), hardline$1, "?>"] : isProgramLikeNode(node) && isFirstNode && node.kind !== "namespace" ? "" : [beforeCloseTagInlineNode, "?>"];
+        var beforeInline = childNode.leadingComments && childNode.leadingComments.length ? [isFirstNode && node.kind !== "namespace" && !isBlockNestedNode ? "<?php" : "", node.kind === "namespace" || !isBlockNestedNode ? hardline$1 : "", comments.printComments(childNode.leadingComments, options), hardline$1, "?>"] : isProgramLikeNode(node) && isFirstNode && node.kind !== "namespace" ? "" : [beforeCloseTagInlineNode, "?>"];
         var nextV = path.getNode(index + 1);
         var skipLastComment = nextV && nextV.children && nextV.children.length;
-        var afterInline = childNode.comments && childNode.comments.length ? [openTag, hardline$1, skipLastComment ? printComments(childNode.comments, options) : "", hardline$1] : isProgramLikeNode(node) && isLastNode ? "" : [openTag, " "];
+        var afterInline = childNode.comments && childNode.comments.length ? [openTag, hardline$1, skipLastComment ? comments.printComments(childNode.comments, options) : "", hardline$1] : isProgramLikeNode(node) && isLastNode ? "" : [openTag, " "];
         printed = [beforeInline, printed, afterInline];
       }
 
@@ -14020,7 +13455,7 @@
 
       if (hasStartTag) {
         var between = options.originalText.trim().match(/^<\?(php|=)(\s+)?\S/);
-        var afterOpenTag = [between && between[2] && between[2].includes("\n") ? [hardline$1, between[2].split("\n").length > 2 ? hardline$1 : ""] : " ", node.comments ? printComments(node.comments, options) : ""];
+        var afterOpenTag = [between && between[2] && between[2].includes("\n") ? [hardline$1, between[2].split("\n").length > 2 ? hardline$1 : ""] : " ", node.comments ? comments.printComments(node.comments, options) : ""];
         var shortEcho = firstNode && firstNode.kind === "echo" && firstNode.shortForm;
 
         _parts.push([shortEcho ? "<?=" : "<?php", afterOpenTag]);
@@ -14066,12 +13501,12 @@
     var afterPart = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : " ";
     var node = path.getValue();
     var printedBeforePart = hasDanglingComments(node[part]) ? [hardline$1, path.call(function () {
-      return printDanglingComments(path, options, true);
+      return comments.printDanglingComments(path, options, true);
     }, part), hardline$1] : beforePart;
     var printedPartItems = Array.isArray(node[part]) ? group(join$1(",", path.map(function (itemPartPath) {
       var printedPart = print(itemPartPath); // Check if any of the implements nodes have comments
 
-      return hasDanglingComments(itemPartPath.getValue()) ? [hardline$1, printDanglingComments(itemPartPath, options, true), hardline$1, printedPart] : [afterPart, printedPart];
+      return hasDanglingComments(itemPartPath.getValue()) ? [hardline$1, comments.printDanglingComments(itemPartPath, options, true), hardline$1, printedPart] : [afterPart, printedPart];
     }, part))) : [afterPart, print(part)];
     return indent([printedBeforePart, part, willBreak(printedBeforePart) ? indent(printedPartItems) : printedPartItems]);
   }
@@ -14168,7 +13603,7 @@
 
     var printedDeclaration = group([group(declaration), shouldPrintHardlineForOpenBrace(options) ? isAnonymousClass ? line : hardline$1 : " "]);
     var hasEmptyClassBody = node.body && node.body.length === 0 && !hasDanglingComments(node);
-    var printedBody = ["{", indent([hasEmptyClassBody ? "" : hardline$1, printStatements(path, options, print, "body")]), printDanglingComments(path, options, true), isAnonymousClass && hasEmptyClassBody ? softline : hardline$1, "}"];
+    var printedBody = ["{", indent([hasEmptyClassBody ? "" : hardline$1, printStatements(path, options, print, "body")]), comments.printDanglingComments(path, options, true), isAnonymousClass && hasEmptyClassBody ? softline : hardline$1, "}"];
     return [printedDeclaration, printedBody];
   }
 
@@ -14213,7 +13648,7 @@
 
     if (node.type) {
       declaration.push([": ", hasDanglingComments(node.type) ? [path.call(function () {
-        return printDanglingComments(path, options, true);
+        return comments.printDanglingComments(path, options, true);
       }, "type"), " "] : "", node.nullable ? "?" : "", print("type")]);
     }
 
@@ -14279,7 +13714,7 @@
   function printAssignmentRight(leftNode, rightNode, printedRight, hasRef, options) {
     var ref = hasRef ? "&" : "";
 
-    if (hasLeadingOwnLineComment(options.originalText, rightNode, options)) {
+    if (comments.hasLeadingOwnLineComment(options.originalText, rightNode, options)) {
       return indent([hardline$1, ref, printedRight]);
     }
 
@@ -14301,7 +13736,7 @@
     var lastDanglingComment = getLast(node.comments.filter(function (comment) {
       return !comment.leading && !comment.trailing;
     }));
-    return lastDanglingComment && !isBlockComment(lastDanglingComment);
+    return lastDanglingComment && !comments.isBlockComment(lastDanglingComment);
   }
 
   function stringHasNewLines(node) {
@@ -14326,7 +13761,7 @@
     switch (node.kind) {
       case "program":
         {
-          return group([printLines(path, options, print), printDanglingComments(path, options,
+          return group([printLines(path, options, print), comments.printDanglingComments(path, options,
           /* sameIndent */
           true, function (c) {
             return !c.printed;
@@ -14337,7 +13772,7 @@
         return print("expression");
 
       case "block":
-        return [printLines(path, options, print), printDanglingComments(path, options, true)];
+        return [printLines(path, options, print), comments.printDanglingComments(path, options, true)];
 
       case "declare":
         {
@@ -14348,7 +13783,7 @@
           };
 
           if (["block", "short"].includes(node.mode)) {
-            return ["declare(", printDeclareArguments(path), ")", node.mode === "block" ? " {" : ":", node.children.length > 0 ? indent([hardline$1, printLines(path, options, print)]) : "", printDanglingComments(path, options), hardline$1, node.mode === "block" ? "}" : "enddeclare;"];
+            return ["declare(", printDeclareArguments(path), ")", node.mode === "block" ? " {" : ":", node.children.length > 0 ? indent([hardline$1, printLines(path, options, print)]) : "", comments.printDanglingComments(path, options), hardline$1, node.mode === "block" ? "}" : "enddeclare;"];
           }
 
           var nextNode = getNextNode(path, node);
@@ -14359,7 +13794,7 @@
         return [print("key"), "=", print("value")];
 
       case "namespace":
-        return ["namespace ", node.name && typeof node.name === "string" ? [node.name, node.withBrackets ? " " : ""] : "", node.withBrackets ? "{" : ";", hasDanglingComments(node) ? [" ", printDanglingComments(path, options, true)] : "", node.children.length > 0 ? node.withBrackets ? indent([hardline$1, printLines(path, options, print)]) : [node.children[0].kind === "inline" ? "" : [hardline$1, isNextLineEmptyAfterNamespace(options.originalText, node, options.locStart) ? hardline$1 : ""], printLines(path, options, print)] : "", node.withBrackets ? [hardline$1, "}"] : ""];
+        return ["namespace ", node.name && typeof node.name === "string" ? [node.name, node.withBrackets ? " " : ""] : "", node.withBrackets ? "{" : ";", hasDanglingComments(node) ? [" ", comments.printDanglingComments(path, options, true)] : "", node.children.length > 0 ? node.withBrackets ? indent([hardline$1, printLines(path, options, print)]) : [node.children[0].kind === "inline" ? "" : [hardline$1, isNextLineEmptyAfterNamespace(options.originalText, node, options.locStart) ? hardline$1 : ""], printLines(path, options, print)] : "", node.withBrackets ? [hardline$1, "}"] : ""];
 
       case "usegroup":
         return group(["use ", node.type ? [node.type, " "] : "", indent([node.name ? [maybeStripLeadingSlashFromUse(node.name), "\\{", softline] : "", join$1([",", line], path.map(function (item) {
@@ -14367,7 +13802,7 @@
         }, "items"))]), node.name ? [ifBreak(shouldPrintComma(options, "7.2") ? "," : ""), softline, "}"] : ""]);
 
       case "useitem":
-        return [node.type ? [node.type, " "] : "", maybeStripLeadingSlashFromUse(node.name), hasDanglingComments(node) ? [" ", printDanglingComments(path, options, true)] : "", node.alias ? [" as ", print("alias")] : ""];
+        return [node.type ? [node.type, " "] : "", maybeStripLeadingSlashFromUse(node.name), hasDanglingComments(node) ? [" ", comments.printDanglingComments(path, options, true)] : "", node.alias ? [" as ", print("alias")] : ""];
 
       case "class":
       case "enum":
@@ -14382,7 +13817,7 @@
         return [node.trait ? [print("trait"), "::"] : "", node.method ? print("method") : "", " as ", join$1(" ", [].concat(_toConsumableArray(node.visibility ? [node.visibility] : []), _toConsumableArray(node.as ? [print("as")] : [])))];
 
       case "traituse":
-        return group(["use ", indent(group(join$1([",", line], path.map(print, "traits")))), node.adaptations ? [" {", node.adaptations.length > 0 ? [indent([hardline$1, printStatements(path, options, print, "adaptations")]), hardline$1] : hasDanglingComments(node) ? [line, printDanglingComments(path, options, true), line] : "", "}"] : ""]);
+        return group(["use ", indent(group(join$1([",", line], path.map(print, "traits")))), node.adaptations ? [" {", node.adaptations.length > 0 ? [indent([hardline$1, printStatements(path, options, print, "adaptations")]), hardline$1] : hasDanglingComments(node) ? [line, comments.printDanglingComments(path, options, true), line] : "", "}"] : ""]);
 
       case "function":
       case "closure":
@@ -14414,7 +13849,7 @@
             return group([name, // see handleFunctionParameter() in ./comments.js - since there's
             // no node to attach comments that fall in between the parameter name
             // and value, we store them as dangling comments
-            hasDanglingComments(node) ? " " : "", printDanglingComments(path, options, true), " =", printAssignmentRight(node.name, node.value, print("value"), false, options)]);
+            hasDanglingComments(node) ? " " : "", comments.printDanglingComments(path, options, true), " =", printAssignmentRight(node.name, node.value, print("value"), false, options)]);
           }
 
           return name;
@@ -14465,13 +13900,13 @@
           if (node.alternate) {
             parts.push(node.shortForm ? "" : "} ");
             var commentOnOwnLine = hasTrailingComment(node.body) && node.body.comments.some(function (comment) {
-              return comment.trailing && !isBlockComment(comment);
+              return comment.trailing && !comments.isBlockComment(comment);
             }) || needsHardlineAfterDanglingComment(node);
             var elseOnSameLine = !commentOnOwnLine;
             parts.push(elseOnSameLine ? "" : hardline$1);
 
             if (hasDanglingComments(node)) {
-              parts.push(isNextLineEmpty(options.originalText, node.body, options) ? hardline$1 : "", printDanglingComments(path, options, true), commentOnOwnLine ? hardline$1 : " ");
+              parts.push(isNextLineEmpty(options.originalText, node.body, options) ? hardline$1 : "", comments.printDanglingComments(path, options, true), commentOnOwnLine ? hardline$1 : " ");
             }
 
             parts.push("else", group(node.alternate.kind === "if" ? print("alternate") : printBodyControlStructure(path, options, print, "alternate")));
@@ -14496,7 +13931,7 @@
           // is going to be printed before the statement.
 
 
-          var dangling = printDanglingComments(path, options,
+          var dangling = comments.printDanglingComments(path, options,
           /* sameLine */
           true);
           var printedComments = dangling ? [dangling, softline] : "";
@@ -14515,7 +13950,7 @@
           // is going to be printed before the statement.
 
 
-          var _dangling = printDanglingComments(path, options,
+          var _dangling = comments.printDanglingComments(path, options,
           /* sameLine */
           true);
 
@@ -14589,7 +14024,7 @@
           _parts3.push("new ");
 
           if (isAnonymousClassNode) {
-            _parts3.push.apply(_parts3, [node.what.leadingComments && node.what.leadingComments[0].kind === "commentblock" ? [printComments(node.what.leadingComments, options), " "] : ""].concat(_toConsumableArray(path.call(function () {
+            _parts3.push.apply(_parts3, [node.what.leadingComments && node.what.leadingComments[0].kind === "commentblock" ? [comments.printComments(node.what.leadingComments, options), " "] : ""].concat(_toConsumableArray(path.call(function () {
               return printAttrs(path, options, print, {
                 inline: true
               });
@@ -14627,7 +14062,7 @@
         }
 
       case "exit":
-        return group([node.useDie ? "die" : "exit", "(", node.expression ? isStringOnItsOwnLine(node.expression, options.originalText, options) ? print("expression") : [indent([softline, print("expression")]), softline] : printDanglingComments(path, options), ")"]);
+        return group([node.useDie ? "die" : "exit", "(", node.expression ? isStringOnItsOwnLine(node.expression, options.originalText, options) ? print("expression") : [indent([softline, print("expression")]), softline] : comments.printDanglingComments(path, options), ")"]);
 
       case "global":
         return group(["global ", indent(join$1([",", line], path.map(print, "items")))]);
@@ -14648,7 +14083,7 @@
         return ["@", print("expr")];
 
       case "halt":
-        return [hasDanglingComments(node) ? [printDanglingComments(path, options,
+        return [hasDanglingComments(node) ? [comments.printDanglingComments(path, options,
         /* sameIndent */
         true), hardline$1] : "", "__halt_compiler();", node.after];
 
@@ -14693,7 +14128,7 @@
           }
 
           if (hasDanglingComments(node)) {
-            _parts4.push(" ", printDanglingComments(path, options,
+            _parts4.push(" ", comments.printDanglingComments(path, options,
             /* sameIndent */
             true));
           }
@@ -14791,7 +14226,7 @@
               return [open, close];
             }
 
-            return group([open, printDanglingComments(path, options), softline, close]);
+            return group([open, comments.printDanglingComments(path, options), softline, close]);
           }
 
           var lastElem = getLast(node.items); // PHP allows you to have empty elements in an array which
@@ -14817,7 +14252,7 @@
 
           var isAssociative = !!(_firstProperty && _firstProperty.key);
           var shouldBreak = isAssociative && _firstProperty && hasNewlineInRange(options.originalText, options.locStart(node), options.locStart(_firstProperty));
-          return group([open, indent([softline, printArrayItems(path, options, print)]), needsForcedTrailingComma ? "," : "", ifBreak(!needsForcedTrailingComma && shouldPrintComma(options, "5.0") ? [lastElem && shouldPrintHardlineBeforeTrailingComma(lastElem) ? hardline$1 : "", ","] : ""), printDanglingComments(path, options, true), softline, close], {
+          return group([open, indent([softline, printArrayItems(path, options, print)]), needsForcedTrailingComma ? "," : "", ifBreak(!needsForcedTrailingComma && shouldPrintComma(options, "5.0") ? [lastElem && shouldPrintHardlineBeforeTrailingComma(lastElem) ? hardline$1 : "", ","] : ""), comments.printDanglingComments(path, options, true), softline, close], {
             shouldBreak: shouldBreak
           });
         }
@@ -15114,9 +14549,9 @@
           var lastArmIndex = node.arms.length - 1;
           var arms = path.map(function (armPath, armIdx) {
             var armNode = armPath.getValue();
-            var maybeLeadingComment = hasLeadingComment(armNode) ? [printComments(armNode.leadingComments, options), hardline$1] : [];
+            var maybeLeadingComment = comments.hasLeadingComment(armNode) ? [comments.printComments(armNode.leadingComments, options), hardline$1] : [];
             var maybeTrailingComma = armIdx < lastArmIndex || options.trailingCommaPHP ? "," : "";
-            var maybeTrailingComment = hasTrailingComment(armNode) ? [" ", printComments(armNode.comments.filter(function (c) {
+            var maybeTrailingComment = comments.hasTrailingComment(armNode) ? [" ", comments.printComments(armNode.comments.filter(function (c) {
               return c.trailing;
             }), options)] : [];
             var conds = armNode.conds === null ? "default" : armPath.map(function (condPath, condIdx) {
@@ -15130,7 +14565,7 @@
         }
 
       case "noop":
-        return node.comments ? printComments(path.getValue().comments, options) : "";
+        return node.comments ? comments.printComments(path.getValue().comments, options) : "";
 
       case "namedargument":
         return [node.name, ": ", print("value")];
@@ -15148,6 +14583,8 @@
     }
   }
 
+  var printer = genericPrint;
+
   var ignoredProperties = new Set(["loc", "range", "raw", "comments", "leadingComments", "trailingComments", "parenthesizedExpression", "parent", "prev", "start", "end", "tokens", "errors", "extra"]);
   /**
    * This function takes the existing ast node and a copy, by reference
@@ -15159,7 +14596,7 @@
   function clean(node, newObj) {
     if (node.kind === "string") {
       // TODO if options are available in this method, replace with
-      // newObj.isDoubleQuote = !useSingleQuote(node, options);
+      // newObj.isDoubleQuote = !util.useSingleQuote(node, options);
       delete newObj.isDoubleQuote;
     }
 
@@ -15197,7 +14634,7 @@
 
 
     if (node.kind === "number") {
-      newObj.value = printNumber(node.value);
+      newObj.value = util.printNumber(node.value);
     }
 
     var statements = ["foreach", "for", "if", "while", "do"];
@@ -15231,7 +14668,7 @@
     }
 
     if (node.kind === "method" && node.name.kind === "identifier") {
-      newObj.name.name = normalizeMagicMethodName(newObj.name.name);
+      newObj.name.name = util.normalizeMagicMethodName(newObj.name.name);
     }
 
     if (node.kind === "noop") {
@@ -15240,6 +14677,7 @@
   }
 
   clean.ignoredProperties = ignoredProperties;
+  var clean_1 = clean;
 
   var CATEGORY_PHP = "PHP";
   var options = {
@@ -15306,6 +14744,9 @@
       }]
     }
   };
+  options.phpVersion;
+  options.trailingCommaPHP;
+  options.braceStyle;
 
   var copyProperty = function copyProperty(to, from, property, ignoreNonConfigurable) {
     // `Function#length` should reflect the parameters of `to` not `from` since we keep its body.
@@ -15365,7 +14806,7 @@
     }));
   };
 
-  var mimicFn$1 = function mimicFn(to, from) {
+  var mimicFn = function mimicFn(to, from) {
     var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
         _ref$ignoreNonConfigu = _ref.ignoreNonConfigurable,
         ignoreNonConfigurable = _ref$ignoreNonConfigu === void 0 ? false : _ref$ignoreNonConfigu;
@@ -15391,9 +14832,21 @@
     return to;
   };
 
-  var mimicFn_1 = mimicFn$1;
+  var mimicFn_1 = mimicFn;
 
-  var dist$1 = {exports: {}};
+  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
+
+  function unwrapExports (x) {
+  	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+  }
+
+  function createCommonjsModule(fn, module) {
+  	return module = { exports: {} }, fn(module, module.exports), module.exports;
+  }
+
+  function getCjsExportFromNamespace (n) {
+  	return n && n['default'] || n;
+  }
 
   var pDefer = function pDefer() {
     var ret = {};
@@ -15404,9 +14857,7 @@
     return ret;
   };
 
-  dist$1.exports;
-
-  (function (module, exports) {
+  var dist$1 = createCommonjsModule(function (module, exports) {
 
     var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function (thisArg, _arguments, P, generator) {
       return new (P || (P = Promise))(function (resolve, reject) {
@@ -15620,12 +15071,11 @@
 
     module.exports = mapAgeCleaner;
     module.exports.default = mapAgeCleaner;
-  })(dist$1, dist$1.exports);
+  });
+  unwrapExports(dist$1);
 
-  var distExports = dist$1.exports;
+  var mapAgeCleaner = dist$1;
 
-  var mimicFn = mimicFn_1;
-  var mapAgeCleaner = distExports;
   var decoratorInstanceMap = new WeakMap();
   var cacheStore = new WeakMap();
   /**
@@ -15690,7 +15140,7 @@
       return result;
     };
 
-    mimicFn(memoized, fn, {
+    mimicFn_1(memoized, fn, {
       ignoreNonConfigurable: true
     });
     cacheStore.set(memoized, cache);
@@ -15769,11 +15219,10 @@
   };
 
   var dist = mem;
-  var memoize = /*@__PURE__*/getDefaultExportFromCjs(dist);
 
   var reHasPragma = /@prettier|@format/;
-  var getPageLevelDocBlock = memoize(function (text) {
-    var parsed = parse(text);
+  var getPageLevelDocBlock = dist(function (text) {
+    var parsed = parser(text);
 
     var _parsed$children = _slicedToArray(parsed.children, 1),
         firstChild = _parsed$children[0];
@@ -15789,7 +15238,7 @@
     }
   });
 
-  function hasPragma(text) {
+  function hasPragma$1(text) {
     // fast path optimization - check if the pragma shows up in the file at all
     if (!reHasPragma.test(text)) {
       return false;
@@ -15827,7 +15276,7 @@
     return lines.join("\n");
   }
 
-  function insertPragma(text) {
+  function insertPragma$1(text) {
     var pageLevelDocBlock = getPageLevelDocBlock(text);
 
     if (pageLevelDocBlock) {
@@ -15854,9 +15303,58 @@
     return "".concat(phpTag, "\n/** \n * @format \n */\n").concat(after);
   }
 
-  var _doc$builders = prettier.doc.builders,
-      join = _doc$builders.join,
-      hardline = _doc$builders.hardline;
+  var pragma = {
+    hasPragma: hasPragma$1,
+    insertPragma: insertPragma$1
+  };
+
+  var PHP = {
+    "name": "PHP",
+    "type": "programming",
+    "tmScope": "text.html.php",
+    "aceMode": "php",
+    "codemirrorMode": "php",
+    "codemirrorMimeType": "application/x-httpd-php",
+    "color": "#4F5D95",
+    "extensions": [".php", ".aw", ".ctp", ".fcgi", ".inc", ".php3", ".php4", ".php5", ".phps", ".phpt"],
+    "filenames": [".php", ".php_cs", ".php_cs.dist", "Phakefile"],
+    "interpreters": ["php"],
+    "aliases": ["inc"],
+    "languageId": 272
+  };
+
+  var PHP$1 = /*#__PURE__*/Object.freeze({
+    __proto__: null,
+    'default': PHP
+  });
+
+  var HTML_PHP = {
+    "name": "HTML+PHP",
+    "type": "markup",
+    "color": "#4f5d95",
+    "tmScope": "text.html.php",
+    "group": "HTML",
+    "extensions": [".phtml"],
+    "aceMode": "php",
+    "codemirrorMode": "php",
+    "codemirrorMimeType": "application/x-httpd-php",
+    "languageId": 151
+  };
+
+  var HTML_PHP$1 = /*#__PURE__*/Object.freeze({
+    __proto__: null,
+    'default': HTML_PHP
+  });
+
+  var require$$2 = getCjsExportFromNamespace(PHP$1);
+
+  var require$$3 = getCjsExportFromNamespace(HTML_PHP$1);
+
+  var _require$$0$doc$build = prettier__default["default"].doc.builders,
+      join = _require$$0$doc$build.join,
+      hardline = _require$$0$doc$build.hardline;
+  var hasPragma = pragma.hasPragma,
+      insertPragma = pragma.insertPragma;
 
   function createLanguage(linguistData, _ref) {
     var extend = _ref.extend,
@@ -15881,12 +15379,12 @@
     return language;
   }
 
-  var languages = [createLanguage(LINGUIST_LANGUAGES_PHP, {
+  var languages = [createLanguage(require$$2, {
     override: {
       parsers: ["php"],
       vscodeLanguageIds: ["php"]
     }
-  }), createLanguage(LINGUIST_LANGUAGES_HTML_PHP, {
+  }), createLanguage(require$$3, {
     override: {
       parsers: ["php"],
       vscodeLanguageIds: ["php"]
@@ -15901,7 +15399,7 @@
 
   var parsers = {
     php: {
-      parse: parse,
+      parse: parser,
       astFormat: "php",
       locStart: loc("start"),
       locEnd: loc("end"),
@@ -15918,17 +15416,17 @@
 
   var printers = {
     php: {
-      print: genericPrint,
+      print: printer,
       getVisitorKeys: getVisitorKeys,
       insertPragma: insertPragma,
-      massageAstNode: clean,
-      getCommentChildNodes: getCommentChildNodes,
-      canAttachComment: canAttachComment,
-      isBlockComment: isBlockComment,
+      massageAstNode: clean_1,
+      getCommentChildNodes: comments.getCommentChildNodes,
+      canAttachComment: comments.canAttachComment,
+      isBlockComment: comments.isBlockComment,
       handleComments: {
-        ownLine: handleOwnLineComment,
-        endOfLine: handleEndOfLineComment,
-        remaining: handleRemainingComment
+        ownLine: comments.handleOwnLineComment,
+        endOfLine: comments.handleEndOfLineComment,
+        remaining: comments.handleRemainingComment
       },
       willPrintOwnComments: function willPrintOwnComments(path) {
         var node = path.getValue();
@@ -15983,23 +15481,27 @@
       }
     }
   };
-  var defaultOptions = {
-    tabWidth: 4
-  };
-  var index = {
+  var src = {
     languages: languages,
     printers: printers,
     parsers: parsers,
     options: options,
-    defaultOptions: defaultOptions
+    defaultOptions: {
+      tabWidth: 4
+    }
   };
-
-  exports["default"] = index;
-  exports.defaultOptions = defaultOptions;
-  exports.languages = languages;
-  exports.options = options;
-  exports.parsers = parsers;
-  exports.printers = printers;
+  var src_1 = src.languages;
+  var src_2 = src.printers;
+  var src_3 = src.parsers;
+  var src_4 = src.options;
+  var src_5 = src.defaultOptions;
+
+  exports["default"] = src;
+  exports.defaultOptions = src_5;
+  exports.languages = src_1;
+  exports.options = src_4;
+  exports.parsers = src_3;
+  exports.printers = src_2;
 
   Object.defineProperty(exports, '__esModule', { value: true });

@fisker fisker marked this pull request as ready for review August 17, 2023 01:59
@fisker fisker requested a review from loilo August 17, 2023 01:59
Copy link
Collaborator

@czosel czosel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! 👍 Let's await @loilo's feedback on the standalone build before merging.

Copy link
Collaborator

@loilo loilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few suggestions I made in comments.
I have a strong stance on the exports thing, but wouldn't object if there are compeelling reasons to keep the default export.
The node: prefix is nice to have and makes sense to have in the ESM transition, but it's neither mandatory nor does it have to be there from the start.

src/index.js Outdated Show resolved Hide resolved
src/needs-parens.js Show resolved Hide resolved
Copy link
Collaborator

@loilo loilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

README.md Show resolved Hide resolved
@czosel czosel merged commit eb900b0 into prettier:main Aug 18, 2023
12 checks passed
@czosel
Copy link
Collaborator

czosel commented Aug 18, 2023

Released in v0.20.1 🎉

@fisker fisker deleted the esm branch August 18, 2023 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants