@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.
@@ -161,7 +161,7 @@
161
161
  }
162
162
 
163
163
  // NOTE: This file is generated by the templates/template.rb script and should not
164
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.3/templates/javascript/packages/core/src/errors.ts.erb
164
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.5/templates/javascript/packages/core/src/errors.ts.erb
165
165
  class HerbError {
166
166
  type;
167
167
  message;
@@ -664,6 +664,40 @@
664
664
  return output;
665
665
  }
666
666
  }
667
+ class ERBMultipleBlocksInTagError extends HerbError {
668
+ static from(data) {
669
+ return new ERBMultipleBlocksInTagError({
670
+ type: data.type,
671
+ message: data.message,
672
+ location: Location.from(data.location),
673
+ });
674
+ }
675
+ constructor(props) {
676
+ super(props.type, props.message, props.location);
677
+ }
678
+ toJSON() {
679
+ return {
680
+ ...super.toJSON(),
681
+ type: "ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR",
682
+ };
683
+ }
684
+ toMonacoDiagnostic() {
685
+ return {
686
+ line: this.location.start.line,
687
+ column: this.location.start.column,
688
+ endLine: this.location.end.line,
689
+ endColumn: this.location.end.column,
690
+ message: this.message,
691
+ severity: 'error'
692
+ };
693
+ }
694
+ treeInspect() {
695
+ let output = "";
696
+ output += `@ ERBMultipleBlocksInTagError ${this.location.treeInspectWithLabel()}\n`;
697
+ output += `└── message: "${this.message}"\n`;
698
+ return output;
699
+ }
700
+ }
667
701
  function fromSerializedError(error) {
668
702
  switch (error.type) {
669
703
  case "UNEXPECTED_ERROR": return UnexpectedError.from(error);
@@ -677,6 +711,7 @@
677
711
  case "RUBY_PARSE_ERROR": return RubyParseError.from(error);
678
712
  case "ERB_CONTROL_FLOW_SCOPE_ERROR": return ERBControlFlowScopeError.from(error);
679
713
  case "MISSINGERB_END_TAG_ERROR": return MissingERBEndTagError.from(error);
714
+ case "ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR": return ERBMultipleBlocksInTagError.from(error);
680
715
  default:
681
716
  throw new Error(`Unknown node type: ${error.type}`);
682
717
  }
@@ -698,7 +733,7 @@
698
733
  }
699
734
 
700
735
  // NOTE: This file is generated by the templates/template.rb script and should not
701
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.3/templates/javascript/packages/core/src/nodes.ts.erb
736
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.5/templates/javascript/packages/core/src/nodes.ts.erb
702
737
  class Node {
703
738
  type;
704
739
  location;
@@ -2951,7 +2986,7 @@
2951
2986
  }
2952
2987
 
2953
2988
  // NOTE: This file is generated by the templates/template.rb script and should not
2954
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.3/templates/javascript/packages/core/src/node-type-guards.ts.erb
2989
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.5/templates/javascript/packages/core/src/node-type-guards.ts.erb
2955
2990
  /**
2956
2991
  * Type guard functions for AST nodes.
2957
2992
  * These functions provide type checking by combining both instanceof
@@ -4031,7 +4066,7 @@
4031
4066
  }
4032
4067
 
4033
4068
  var name = "@herb-tools/core";
4034
- var version = "0.8.3";
4069
+ var version = "0.8.5";
4035
4070
  var packageJSON = {
4036
4071
  name: name,
4037
4072
  version: version};
@@ -4254,7 +4289,7 @@
4254
4289
  }
4255
4290
 
4256
4291
  // NOTE: This file is generated by the templates/template.rb script and should not
4257
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.3/templates/javascript/packages/core/src/visitor.ts.erb
4292
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.5/templates/javascript/packages/core/src/visitor.ts.erb
4258
4293
  class Visitor {
4259
4294
  visit(node) {
4260
4295
  if (!node)
@@ -4432,6 +4467,7 @@
4432
4467
  exports.ERBForNode = ERBForNode;
4433
4468
  exports.ERBIfNode = ERBIfNode;
4434
4469
  exports.ERBInNode = ERBInNode;
4470
+ exports.ERBMultipleBlocksInTagError = ERBMultipleBlocksInTagError;
4435
4471
  exports.ERBNodeClasses = ERBNodeClasses;
4436
4472
  exports.ERBRescueNode = ERBRescueNode;
4437
4473
  exports.ERBUnlessNode = ERBUnlessNode;