@rightcapital/phpdoc-parser 0.3.22--.194.1.0 → 0.3.22--.197.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -491,13 +491,12 @@ class TypeParser {
491
491
  parseArrayShapeKey(tokens) {
492
492
  const startLine = tokens.currentTokenLine();
493
493
  const startIndex = tokens.currentTokenIndex();
494
+ let key;
494
495
  if (tokens.isCurrentTokenType(lexer_1.Lexer.TOKEN_INTEGER)) {
495
- const key = new const_expr_integer_node_1.ConstExprIntegerNode(tokens.currentTokenValue().replaceAll('_', ''));
496
+ key = new const_expr_integer_node_1.ConstExprIntegerNode(tokens.currentTokenValue().replaceAll('_', ''));
496
497
  tokens.next();
497
- return this.enrichWithAttributes(tokens, key, startLine, startIndex);
498
498
  }
499
- let key;
500
- if (tokens.isCurrentTokenType(lexer_1.Lexer.TOKEN_SINGLE_QUOTED_STRING)) {
499
+ else if (tokens.isCurrentTokenType(lexer_1.Lexer.TOKEN_SINGLE_QUOTED_STRING)) {
501
500
  if (this.quoteAwareConstExprString) {
502
501
  key = new quote_aware_const_expr_string_node_1.QuoteAwareConstExprStringNode(string_unescaper_1.StringUnescaper.unescapeString(tokens.currentTokenValue()), quote_aware_const_expr_string_node_1.QuoteAwareConstExprStringNode.SINGLE_QUOTED);
503
502
  }
@@ -506,13 +505,14 @@ class TypeParser {
506
505
  }
507
506
  tokens.next();
508
507
  }
509
- if (tokens.isCurrentTokenType(lexer_1.Lexer.TOKEN_DOUBLE_QUOTED_STRING)) {
508
+ else if (tokens.isCurrentTokenType(lexer_1.Lexer.TOKEN_DOUBLE_QUOTED_STRING)) {
510
509
  if (this.quoteAwareConstExprString) {
511
510
  key = new quote_aware_const_expr_string_node_1.QuoteAwareConstExprStringNode(string_unescaper_1.StringUnescaper.unescapeString(tokens.currentTokenValue()), quote_aware_const_expr_string_node_1.QuoteAwareConstExprStringNode.DOUBLE_QUOTED);
512
511
  }
513
512
  else {
514
513
  key = new const_expr_string_node_1.ConstExprStringNode(tokens.currentTokenValue().replace(/(^"|"$)/g, ''));
515
514
  }
515
+ tokens.next();
516
516
  }
517
517
  else {
518
518
  key = new identifier_type_node_1.IdentifierTypeNode(tokens.currentTokenValue());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightcapital/phpdoc-parser",
3
- "version": "0.3.22-.194.1.0",
3
+ "version": "0.3.22-.197.1.0",
4
4
  "keywords": [
5
5
  "PHP",
6
6
  "PHPDoc",