@herb-tools/core 0.7.3 → 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.cjs
CHANGED
|
@@ -131,7 +131,7 @@ class Token {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
134
|
-
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.
|
|
134
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.5/templates/javascript/packages/core/src/errors.ts.erb
|
|
135
135
|
class HerbError {
|
|
136
136
|
type;
|
|
137
137
|
message;
|
|
@@ -588,7 +588,7 @@ function convertToUTF8(string) {
|
|
|
588
588
|
}
|
|
589
589
|
|
|
590
590
|
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
591
|
-
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.
|
|
591
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.5/templates/javascript/packages/core/src/nodes.ts.erb
|
|
592
592
|
class Node {
|
|
593
593
|
type;
|
|
594
594
|
location;
|
|
@@ -2841,7 +2841,7 @@ class ParseResult extends Result {
|
|
|
2841
2841
|
}
|
|
2842
2842
|
|
|
2843
2843
|
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
2844
|
-
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.
|
|
2844
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.5/templates/javascript/packages/core/src/node-type-guards.ts.erb
|
|
2845
2845
|
/**
|
|
2846
2846
|
* Type guard functions for AST nodes.
|
|
2847
2847
|
* These functions provide type checking by combining both instanceof
|
|
@@ -3735,7 +3735,7 @@ function toMonacoDiagnostic(diagnostic) {
|
|
|
3735
3735
|
}
|
|
3736
3736
|
|
|
3737
3737
|
var name = "@herb-tools/core";
|
|
3738
|
-
var version = "0.7.
|
|
3738
|
+
var version = "0.7.5";
|
|
3739
3739
|
var packageJSON = {
|
|
3740
3740
|
name: name,
|
|
3741
3741
|
version: version};
|
|
@@ -3958,7 +3958,7 @@ class HerbBackend {
|
|
|
3958
3958
|
}
|
|
3959
3959
|
|
|
3960
3960
|
// NOTE: This file is generated by the templates/template.rb script and should not
|
|
3961
|
-
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.
|
|
3961
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.7.5/templates/javascript/packages/core/src/visitor.ts.erb
|
|
3962
3962
|
class Visitor {
|
|
3963
3963
|
visit(node) {
|
|
3964
3964
|
if (!node)
|
|
@@ -3971,97 +3971,151 @@ class Visitor {
|
|
|
3971
3971
|
visitChildNodes(node) {
|
|
3972
3972
|
node.compactChildNodes().forEach(node => node.accept(this));
|
|
3973
3973
|
}
|
|
3974
|
+
visitNode(_node) {
|
|
3975
|
+
// Default implementation does nothing
|
|
3976
|
+
}
|
|
3977
|
+
visitERBNode(_node) {
|
|
3978
|
+
// Default implementation does nothing
|
|
3979
|
+
}
|
|
3974
3980
|
visitDocumentNode(node) {
|
|
3981
|
+
this.visitNode(node);
|
|
3975
3982
|
this.visitChildNodes(node);
|
|
3976
3983
|
}
|
|
3977
3984
|
visitLiteralNode(node) {
|
|
3985
|
+
this.visitNode(node);
|
|
3978
3986
|
this.visitChildNodes(node);
|
|
3979
3987
|
}
|
|
3980
3988
|
visitHTMLOpenTagNode(node) {
|
|
3989
|
+
this.visitNode(node);
|
|
3981
3990
|
this.visitChildNodes(node);
|
|
3982
3991
|
}
|
|
3983
3992
|
visitHTMLCloseTagNode(node) {
|
|
3993
|
+
this.visitNode(node);
|
|
3984
3994
|
this.visitChildNodes(node);
|
|
3985
3995
|
}
|
|
3986
3996
|
visitHTMLElementNode(node) {
|
|
3997
|
+
this.visitNode(node);
|
|
3987
3998
|
this.visitChildNodes(node);
|
|
3988
3999
|
}
|
|
3989
4000
|
visitHTMLAttributeValueNode(node) {
|
|
4001
|
+
this.visitNode(node);
|
|
3990
4002
|
this.visitChildNodes(node);
|
|
3991
4003
|
}
|
|
3992
4004
|
visitHTMLAttributeNameNode(node) {
|
|
4005
|
+
this.visitNode(node);
|
|
3993
4006
|
this.visitChildNodes(node);
|
|
3994
4007
|
}
|
|
3995
4008
|
visitHTMLAttributeNode(node) {
|
|
4009
|
+
this.visitNode(node);
|
|
3996
4010
|
this.visitChildNodes(node);
|
|
3997
4011
|
}
|
|
3998
4012
|
visitHTMLTextNode(node) {
|
|
4013
|
+
this.visitNode(node);
|
|
3999
4014
|
this.visitChildNodes(node);
|
|
4000
4015
|
}
|
|
4001
4016
|
visitHTMLCommentNode(node) {
|
|
4017
|
+
this.visitNode(node);
|
|
4002
4018
|
this.visitChildNodes(node);
|
|
4003
4019
|
}
|
|
4004
4020
|
visitHTMLDoctypeNode(node) {
|
|
4021
|
+
this.visitNode(node);
|
|
4005
4022
|
this.visitChildNodes(node);
|
|
4006
4023
|
}
|
|
4007
4024
|
visitXMLDeclarationNode(node) {
|
|
4025
|
+
this.visitNode(node);
|
|
4008
4026
|
this.visitChildNodes(node);
|
|
4009
4027
|
}
|
|
4010
4028
|
visitCDATANode(node) {
|
|
4029
|
+
this.visitNode(node);
|
|
4011
4030
|
this.visitChildNodes(node);
|
|
4012
4031
|
}
|
|
4013
4032
|
visitWhitespaceNode(node) {
|
|
4033
|
+
this.visitNode(node);
|
|
4014
4034
|
this.visitChildNodes(node);
|
|
4015
4035
|
}
|
|
4016
4036
|
visitERBContentNode(node) {
|
|
4037
|
+
this.visitNode(node);
|
|
4038
|
+
this.visitERBNode(node);
|
|
4017
4039
|
this.visitChildNodes(node);
|
|
4018
4040
|
}
|
|
4019
4041
|
visitERBEndNode(node) {
|
|
4042
|
+
this.visitNode(node);
|
|
4043
|
+
this.visitERBNode(node);
|
|
4020
4044
|
this.visitChildNodes(node);
|
|
4021
4045
|
}
|
|
4022
4046
|
visitERBElseNode(node) {
|
|
4047
|
+
this.visitNode(node);
|
|
4048
|
+
this.visitERBNode(node);
|
|
4023
4049
|
this.visitChildNodes(node);
|
|
4024
4050
|
}
|
|
4025
4051
|
visitERBIfNode(node) {
|
|
4052
|
+
this.visitNode(node);
|
|
4053
|
+
this.visitERBNode(node);
|
|
4026
4054
|
this.visitChildNodes(node);
|
|
4027
4055
|
}
|
|
4028
4056
|
visitERBBlockNode(node) {
|
|
4057
|
+
this.visitNode(node);
|
|
4058
|
+
this.visitERBNode(node);
|
|
4029
4059
|
this.visitChildNodes(node);
|
|
4030
4060
|
}
|
|
4031
4061
|
visitERBWhenNode(node) {
|
|
4062
|
+
this.visitNode(node);
|
|
4063
|
+
this.visitERBNode(node);
|
|
4032
4064
|
this.visitChildNodes(node);
|
|
4033
4065
|
}
|
|
4034
4066
|
visitERBCaseNode(node) {
|
|
4067
|
+
this.visitNode(node);
|
|
4068
|
+
this.visitERBNode(node);
|
|
4035
4069
|
this.visitChildNodes(node);
|
|
4036
4070
|
}
|
|
4037
4071
|
visitERBCaseMatchNode(node) {
|
|
4072
|
+
this.visitNode(node);
|
|
4073
|
+
this.visitERBNode(node);
|
|
4038
4074
|
this.visitChildNodes(node);
|
|
4039
4075
|
}
|
|
4040
4076
|
visitERBWhileNode(node) {
|
|
4077
|
+
this.visitNode(node);
|
|
4078
|
+
this.visitERBNode(node);
|
|
4041
4079
|
this.visitChildNodes(node);
|
|
4042
4080
|
}
|
|
4043
4081
|
visitERBUntilNode(node) {
|
|
4082
|
+
this.visitNode(node);
|
|
4083
|
+
this.visitERBNode(node);
|
|
4044
4084
|
this.visitChildNodes(node);
|
|
4045
4085
|
}
|
|
4046
4086
|
visitERBForNode(node) {
|
|
4087
|
+
this.visitNode(node);
|
|
4088
|
+
this.visitERBNode(node);
|
|
4047
4089
|
this.visitChildNodes(node);
|
|
4048
4090
|
}
|
|
4049
4091
|
visitERBRescueNode(node) {
|
|
4092
|
+
this.visitNode(node);
|
|
4093
|
+
this.visitERBNode(node);
|
|
4050
4094
|
this.visitChildNodes(node);
|
|
4051
4095
|
}
|
|
4052
4096
|
visitERBEnsureNode(node) {
|
|
4097
|
+
this.visitNode(node);
|
|
4098
|
+
this.visitERBNode(node);
|
|
4053
4099
|
this.visitChildNodes(node);
|
|
4054
4100
|
}
|
|
4055
4101
|
visitERBBeginNode(node) {
|
|
4102
|
+
this.visitNode(node);
|
|
4103
|
+
this.visitERBNode(node);
|
|
4056
4104
|
this.visitChildNodes(node);
|
|
4057
4105
|
}
|
|
4058
4106
|
visitERBUnlessNode(node) {
|
|
4107
|
+
this.visitNode(node);
|
|
4108
|
+
this.visitERBNode(node);
|
|
4059
4109
|
this.visitChildNodes(node);
|
|
4060
4110
|
}
|
|
4061
4111
|
visitERBYieldNode(node) {
|
|
4112
|
+
this.visitNode(node);
|
|
4113
|
+
this.visitERBNode(node);
|
|
4062
4114
|
this.visitChildNodes(node);
|
|
4063
4115
|
}
|
|
4064
4116
|
visitERBInNode(node) {
|
|
4117
|
+
this.visitNode(node);
|
|
4118
|
+
this.visitERBNode(node);
|
|
4065
4119
|
this.visitChildNodes(node);
|
|
4066
4120
|
}
|
|
4067
4121
|
}
|