@herb-tools/core 0.7.4 → 0.7.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.
- package/dist/herb-core.browser.js +59 -5
- package/dist/herb-core.browser.js.map +1 -1
- package/dist/herb-core.cjs +59 -5
- package/dist/herb-core.cjs.map +1 -1
- package/dist/herb-core.esm.js +59 -5
- package/dist/herb-core.esm.js.map +1 -1
- package/dist/herb-core.umd.js +59 -5
- package/dist/herb-core.umd.js.map +1 -1
- package/dist/types/visitor.d.ts +46 -2
- package/package.json +1 -1
- package/src/errors.ts +1 -1
- package/src/node-type-guards.ts +1 -1
- package/src/nodes.ts +1 -1
- package/src/visitor.ts +102 -2
package/dist/herb-core.umd.js
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
138
|
-
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.
|
|
138
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.5/templates/javascript/packages/core/src/errors.ts.erb
|
|
139
139
|
class HerbError {
|
|
140
140
|
type;
|
|
141
141
|
message;
|
|
@@ -592,7 +592,7 @@
|
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
595
|
-
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.
|
|
595
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.5/templates/javascript/packages/core/src/nodes.ts.erb
|
|
596
596
|
class Node {
|
|
597
597
|
type;
|
|
598
598
|
location;
|
|
@@ -2845,7 +2845,7 @@
|
|
|
2845
2845
|
}
|
|
2846
2846
|
|
|
2847
2847
|
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
2848
|
-
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.
|
|
2848
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.5/templates/javascript/packages/core/src/node-type-guards.ts.erb
|
|
2849
2849
|
/**
|
|
2850
2850
|
* Type guard functions for AST nodes.
|
|
2851
2851
|
* These functions provide type checking by combining both instanceof
|
|
@@ -3739,7 +3739,7 @@
|
|
|
3739
3739
|
}
|
|
3740
3740
|
|
|
3741
3741
|
var name = "@herb-tools/core";
|
|
3742
|
-
var version = "0.7.
|
|
3742
|
+
var version = "0.7.5";
|
|
3743
3743
|
var packageJSON = {
|
|
3744
3744
|
name: name,
|
|
3745
3745
|
version: version};
|
|
@@ -3962,7 +3962,7 @@
|
|
|
3962
3962
|
}
|
|
3963
3963
|
|
|
3964
3964
|
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
3965
|
-
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.
|
|
3965
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.5/templates/javascript/packages/core/src/visitor.ts.erb
|
|
3966
3966
|
class Visitor {
|
|
3967
3967
|
visit(node) {
|
|
3968
3968
|
if (!node)
|
|
@@ -3975,97 +3975,151 @@
|
|
|
3975
3975
|
visitChildNodes(node) {
|
|
3976
3976
|
node.compactChildNodes().forEach(node => node.accept(this));
|
|
3977
3977
|
}
|
|
3978
|
+
visitNode(_node) {
|
|
3979
|
+
// Default implementation does nothing
|
|
3980
|
+
}
|
|
3981
|
+
visitERBNode(_node) {
|
|
3982
|
+
// Default implementation does nothing
|
|
3983
|
+
}
|
|
3978
3984
|
visitDocumentNode(node) {
|
|
3985
|
+
this.visitNode(node);
|
|
3979
3986
|
this.visitChildNodes(node);
|
|
3980
3987
|
}
|
|
3981
3988
|
visitLiteralNode(node) {
|
|
3989
|
+
this.visitNode(node);
|
|
3982
3990
|
this.visitChildNodes(node);
|
|
3983
3991
|
}
|
|
3984
3992
|
visitHTMLOpenTagNode(node) {
|
|
3993
|
+
this.visitNode(node);
|
|
3985
3994
|
this.visitChildNodes(node);
|
|
3986
3995
|
}
|
|
3987
3996
|
visitHTMLCloseTagNode(node) {
|
|
3997
|
+
this.visitNode(node);
|
|
3988
3998
|
this.visitChildNodes(node);
|
|
3989
3999
|
}
|
|
3990
4000
|
visitHTMLElementNode(node) {
|
|
4001
|
+
this.visitNode(node);
|
|
3991
4002
|
this.visitChildNodes(node);
|
|
3992
4003
|
}
|
|
3993
4004
|
visitHTMLAttributeValueNode(node) {
|
|
4005
|
+
this.visitNode(node);
|
|
3994
4006
|
this.visitChildNodes(node);
|
|
3995
4007
|
}
|
|
3996
4008
|
visitHTMLAttributeNameNode(node) {
|
|
4009
|
+
this.visitNode(node);
|
|
3997
4010
|
this.visitChildNodes(node);
|
|
3998
4011
|
}
|
|
3999
4012
|
visitHTMLAttributeNode(node) {
|
|
4013
|
+
this.visitNode(node);
|
|
4000
4014
|
this.visitChildNodes(node);
|
|
4001
4015
|
}
|
|
4002
4016
|
visitHTMLTextNode(node) {
|
|
4017
|
+
this.visitNode(node);
|
|
4003
4018
|
this.visitChildNodes(node);
|
|
4004
4019
|
}
|
|
4005
4020
|
visitHTMLCommentNode(node) {
|
|
4021
|
+
this.visitNode(node);
|
|
4006
4022
|
this.visitChildNodes(node);
|
|
4007
4023
|
}
|
|
4008
4024
|
visitHTMLDoctypeNode(node) {
|
|
4025
|
+
this.visitNode(node);
|
|
4009
4026
|
this.visitChildNodes(node);
|
|
4010
4027
|
}
|
|
4011
4028
|
visitXMLDeclarationNode(node) {
|
|
4029
|
+
this.visitNode(node);
|
|
4012
4030
|
this.visitChildNodes(node);
|
|
4013
4031
|
}
|
|
4014
4032
|
visitCDATANode(node) {
|
|
4033
|
+
this.visitNode(node);
|
|
4015
4034
|
this.visitChildNodes(node);
|
|
4016
4035
|
}
|
|
4017
4036
|
visitWhitespaceNode(node) {
|
|
4037
|
+
this.visitNode(node);
|
|
4018
4038
|
this.visitChildNodes(node);
|
|
4019
4039
|
}
|
|
4020
4040
|
visitERBContentNode(node) {
|
|
4041
|
+
this.visitNode(node);
|
|
4042
|
+
this.visitERBNode(node);
|
|
4021
4043
|
this.visitChildNodes(node);
|
|
4022
4044
|
}
|
|
4023
4045
|
visitERBEndNode(node) {
|
|
4046
|
+
this.visitNode(node);
|
|
4047
|
+
this.visitERBNode(node);
|
|
4024
4048
|
this.visitChildNodes(node);
|
|
4025
4049
|
}
|
|
4026
4050
|
visitERBElseNode(node) {
|
|
4051
|
+
this.visitNode(node);
|
|
4052
|
+
this.visitERBNode(node);
|
|
4027
4053
|
this.visitChildNodes(node);
|
|
4028
4054
|
}
|
|
4029
4055
|
visitERBIfNode(node) {
|
|
4056
|
+
this.visitNode(node);
|
|
4057
|
+
this.visitERBNode(node);
|
|
4030
4058
|
this.visitChildNodes(node);
|
|
4031
4059
|
}
|
|
4032
4060
|
visitERBBlockNode(node) {
|
|
4061
|
+
this.visitNode(node);
|
|
4062
|
+
this.visitERBNode(node);
|
|
4033
4063
|
this.visitChildNodes(node);
|
|
4034
4064
|
}
|
|
4035
4065
|
visitERBWhenNode(node) {
|
|
4066
|
+
this.visitNode(node);
|
|
4067
|
+
this.visitERBNode(node);
|
|
4036
4068
|
this.visitChildNodes(node);
|
|
4037
4069
|
}
|
|
4038
4070
|
visitERBCaseNode(node) {
|
|
4071
|
+
this.visitNode(node);
|
|
4072
|
+
this.visitERBNode(node);
|
|
4039
4073
|
this.visitChildNodes(node);
|
|
4040
4074
|
}
|
|
4041
4075
|
visitERBCaseMatchNode(node) {
|
|
4076
|
+
this.visitNode(node);
|
|
4077
|
+
this.visitERBNode(node);
|
|
4042
4078
|
this.visitChildNodes(node);
|
|
4043
4079
|
}
|
|
4044
4080
|
visitERBWhileNode(node) {
|
|
4081
|
+
this.visitNode(node);
|
|
4082
|
+
this.visitERBNode(node);
|
|
4045
4083
|
this.visitChildNodes(node);
|
|
4046
4084
|
}
|
|
4047
4085
|
visitERBUntilNode(node) {
|
|
4086
|
+
this.visitNode(node);
|
|
4087
|
+
this.visitERBNode(node);
|
|
4048
4088
|
this.visitChildNodes(node);
|
|
4049
4089
|
}
|
|
4050
4090
|
visitERBForNode(node) {
|
|
4091
|
+
this.visitNode(node);
|
|
4092
|
+
this.visitERBNode(node);
|
|
4051
4093
|
this.visitChildNodes(node);
|
|
4052
4094
|
}
|
|
4053
4095
|
visitERBRescueNode(node) {
|
|
4096
|
+
this.visitNode(node);
|
|
4097
|
+
this.visitERBNode(node);
|
|
4054
4098
|
this.visitChildNodes(node);
|
|
4055
4099
|
}
|
|
4056
4100
|
visitERBEnsureNode(node) {
|
|
4101
|
+
this.visitNode(node);
|
|
4102
|
+
this.visitERBNode(node);
|
|
4057
4103
|
this.visitChildNodes(node);
|
|
4058
4104
|
}
|
|
4059
4105
|
visitERBBeginNode(node) {
|
|
4106
|
+
this.visitNode(node);
|
|
4107
|
+
this.visitERBNode(node);
|
|
4060
4108
|
this.visitChildNodes(node);
|
|
4061
4109
|
}
|
|
4062
4110
|
visitERBUnlessNode(node) {
|
|
4111
|
+
this.visitNode(node);
|
|
4112
|
+
this.visitERBNode(node);
|
|
4063
4113
|
this.visitChildNodes(node);
|
|
4064
4114
|
}
|
|
4065
4115
|
visitERBYieldNode(node) {
|
|
4116
|
+
this.visitNode(node);
|
|
4117
|
+
this.visitERBNode(node);
|
|
4066
4118
|
this.visitChildNodes(node);
|
|
4067
4119
|
}
|
|
4068
4120
|
visitERBInNode(node) {
|
|
4121
|
+
this.visitNode(node);
|
|
4122
|
+
this.visitERBNode(node);
|
|
4069
4123
|
this.visitChildNodes(node);
|
|
4070
4124
|
}
|
|
4071
4125
|
}
|