@herb-tools/core 0.8.3 → 0.8.5

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.
@@ -157,7 +157,7 @@ class Token {
157
157
  }
158
158
 
159
159
  // NOTE: This file is generated by the templates/template.rb script and should not
160
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.3/templates/javascript/packages/core/src/errors.ts.erb
160
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.5/templates/javascript/packages/core/src/errors.ts.erb
161
161
  class HerbError {
162
162
  type;
163
163
  message;
@@ -660,6 +660,40 @@ class MissingERBEndTagError extends HerbError {
660
660
  return output;
661
661
  }
662
662
  }
663
+ class ERBMultipleBlocksInTagError extends HerbError {
664
+ static from(data) {
665
+ return new ERBMultipleBlocksInTagError({
666
+ type: data.type,
667
+ message: data.message,
668
+ location: Location.from(data.location),
669
+ });
670
+ }
671
+ constructor(props) {
672
+ super(props.type, props.message, props.location);
673
+ }
674
+ toJSON() {
675
+ return {
676
+ ...super.toJSON(),
677
+ type: "ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR",
678
+ };
679
+ }
680
+ toMonacoDiagnostic() {
681
+ return {
682
+ line: this.location.start.line,
683
+ column: this.location.start.column,
684
+ endLine: this.location.end.line,
685
+ endColumn: this.location.end.column,
686
+ message: this.message,
687
+ severity: 'error'
688
+ };
689
+ }
690
+ treeInspect() {
691
+ let output = "";
692
+ output += `@ ERBMultipleBlocksInTagError ${this.location.treeInspectWithLabel()}\n`;
693
+ output += `└── message: "${this.message}"\n`;
694
+ return output;
695
+ }
696
+ }
663
697
  function fromSerializedError(error) {
664
698
  switch (error.type) {
665
699
  case "UNEXPECTED_ERROR": return UnexpectedError.from(error);
@@ -673,6 +707,7 @@ function fromSerializedError(error) {
673
707
  case "RUBY_PARSE_ERROR": return RubyParseError.from(error);
674
708
  case "ERB_CONTROL_FLOW_SCOPE_ERROR": return ERBControlFlowScopeError.from(error);
675
709
  case "MISSINGERB_END_TAG_ERROR": return MissingERBEndTagError.from(error);
710
+ case "ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR": return ERBMultipleBlocksInTagError.from(error);
676
711
  default:
677
712
  throw new Error(`Unknown node type: ${error.type}`);
678
713
  }
@@ -694,7 +729,7 @@ function convertToUTF8(string) {
694
729
  }
695
730
 
696
731
  // NOTE: This file is generated by the templates/template.rb script and should not
697
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.3/templates/javascript/packages/core/src/nodes.ts.erb
732
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.5/templates/javascript/packages/core/src/nodes.ts.erb
698
733
  class Node {
699
734
  type;
700
735
  location;
@@ -2947,7 +2982,7 @@ class ParseResult extends Result {
2947
2982
  }
2948
2983
 
2949
2984
  // NOTE: This file is generated by the templates/template.rb script and should not
2950
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.3/templates/javascript/packages/core/src/node-type-guards.ts.erb
2985
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.5/templates/javascript/packages/core/src/node-type-guards.ts.erb
2951
2986
  /**
2952
2987
  * Type guard functions for AST nodes.
2953
2988
  * These functions provide type checking by combining both instanceof
@@ -4027,7 +4062,7 @@ function didyoumeanRanked(input, list, threshold) {
4027
4062
  }
4028
4063
 
4029
4064
  var name = "@herb-tools/core";
4030
- var version = "0.8.3";
4065
+ var version = "0.8.5";
4031
4066
  var packageJSON = {
4032
4067
  name: name,
4033
4068
  version: version};
@@ -4250,7 +4285,7 @@ class HerbBackend {
4250
4285
  }
4251
4286
 
4252
4287
  // NOTE: This file is generated by the templates/template.rb script and should not
4253
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.3/templates/javascript/packages/core/src/visitor.ts.erb
4288
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.5/templates/javascript/packages/core/src/visitor.ts.erb
4254
4289
  class Visitor {
4255
4290
  visit(node) {
4256
4291
  if (!node)
@@ -4428,6 +4463,7 @@ exports.ERBEnsureNode = ERBEnsureNode;
4428
4463
  exports.ERBForNode = ERBForNode;
4429
4464
  exports.ERBIfNode = ERBIfNode;
4430
4465
  exports.ERBInNode = ERBInNode;
4466
+ exports.ERBMultipleBlocksInTagError = ERBMultipleBlocksInTagError;
4431
4467
  exports.ERBNodeClasses = ERBNodeClasses;
4432
4468
  exports.ERBRescueNode = ERBRescueNode;
4433
4469
  exports.ERBUnlessNode = ERBUnlessNode;