@herb-tools/rewriter 0.8.8 → 0.8.10

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.
package/dist/index.cjs CHANGED
@@ -290,7 +290,7 @@ class Token {
290
290
  }
291
291
 
292
292
  // NOTE: This file is generated by the templates/template.rb script and should not
293
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.8/templates/javascript/packages/core/src/errors.ts.erb
293
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.10/templates/javascript/packages/core/src/errors.ts.erb
294
294
  class HerbError {
295
295
  type;
296
296
  message;
@@ -827,6 +827,40 @@ class ERBMultipleBlocksInTagError extends HerbError {
827
827
  return output;
828
828
  }
829
829
  }
830
+ class ERBCaseWithConditionsError extends HerbError {
831
+ static from(data) {
832
+ return new ERBCaseWithConditionsError({
833
+ type: data.type,
834
+ message: data.message,
835
+ location: Location.from(data.location),
836
+ });
837
+ }
838
+ constructor(props) {
839
+ super(props.type, props.message, props.location);
840
+ }
841
+ toJSON() {
842
+ return {
843
+ ...super.toJSON(),
844
+ type: "ERB_CASE_WITH_CONDITIONS_ERROR",
845
+ };
846
+ }
847
+ toMonacoDiagnostic() {
848
+ return {
849
+ line: this.location.start.line,
850
+ column: this.location.start.column,
851
+ endLine: this.location.end.line,
852
+ endColumn: this.location.end.column,
853
+ message: this.message,
854
+ severity: 'error'
855
+ };
856
+ }
857
+ treeInspect() {
858
+ let output = "";
859
+ output += `@ ERBCaseWithConditionsError ${this.location.treeInspectWithLabel()}\n`;
860
+ output += `└── message: "${this.message}"\n`;
861
+ return output;
862
+ }
863
+ }
830
864
  function fromSerializedError(error) {
831
865
  switch (error.type) {
832
866
  case "UNEXPECTED_ERROR": return UnexpectedError.from(error);
@@ -841,6 +875,7 @@ function fromSerializedError(error) {
841
875
  case "ERB_CONTROL_FLOW_SCOPE_ERROR": return ERBControlFlowScopeError.from(error);
842
876
  case "MISSINGERB_END_TAG_ERROR": return MissingERBEndTagError.from(error);
843
877
  case "ERB_MULTIPLE_BLOCKS_IN_TAG_ERROR": return ERBMultipleBlocksInTagError.from(error);
878
+ case "ERB_CASE_WITH_CONDITIONS_ERROR": return ERBCaseWithConditionsError.from(error);
844
879
  default:
845
880
  throw new Error(`Unknown node type: ${error.type}`);
846
881
  }
@@ -855,7 +890,7 @@ function convertToUTF8(string) {
855
890
  }
856
891
 
857
892
  // NOTE: This file is generated by the templates/template.rb script and should not
858
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.8/templates/javascript/packages/core/src/nodes.ts.erb
893
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.10/templates/javascript/packages/core/src/nodes.ts.erb
859
894
  class Node {
860
895
  type;
861
896
  location;
@@ -3153,7 +3188,7 @@ function getNodesAfterPosition(nodes, position, inclusive = true) {
3153
3188
  }
3154
3189
 
3155
3190
  // NOTE: This file is generated by the templates/template.rb script and should not
3156
- // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.8/templates/javascript/packages/core/src/visitor.ts.erb
3191
+ // be modified manually. See /Users/marcoroth/Development/herb-release-0.8.10/templates/javascript/packages/core/src/visitor.ts.erb
3157
3192
  class Visitor {
3158
3193
  visit(node) {
3159
3194
  if (!node)