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