@herb-tools/core 0.7.5 → 0.8.1
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/README.md +1 -1
- package/dist/herb-core.browser.js +297 -15
- package/dist/herb-core.browser.js.map +1 -1
- package/dist/herb-core.cjs +301 -14
- package/dist/herb-core.cjs.map +1 -1
- package/dist/herb-core.esm.js +297 -15
- package/dist/herb-core.esm.js.map +1 -1
- package/dist/herb-core.umd.js +301 -14
- package/dist/herb-core.umd.js.map +1 -1
- package/dist/types/ast-utils.d.ts +7 -2
- package/dist/types/didyoumean.d.ts +46 -0
- package/dist/types/errors.d.ts +41 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/levenshtein.d.ts +1 -0
- package/dist/types/location.d.ts +2 -0
- package/dist/types/position.d.ts +2 -0
- package/dist/types/range.d.ts +2 -0
- package/package.json +1 -2
- package/src/ast-utils.ts +9 -2
- package/src/didyoumean.ts +88 -0
- package/src/errors.ts +129 -1
- package/src/index.ts +3 -1
- package/src/levenshtein.ts +119 -0
- package/src/location.ts +17 -4
- package/src/node-type-guards.ts +1 -1
- package/src/nodes.ts +1 -1
- package/src/position.ts +12 -2
- package/src/range.ts +12 -2
- package/src/visitor.ts +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
class Position {
|
|
2
2
|
line;
|
|
3
3
|
column;
|
|
4
|
-
static from(
|
|
5
|
-
|
|
4
|
+
static from(positionOrLine, column) {
|
|
5
|
+
if (typeof positionOrLine === "number") {
|
|
6
|
+
return new Position(positionOrLine, column);
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
return new Position(positionOrLine.line, positionOrLine.column);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
static get zero() {
|
|
13
|
+
return new Position(0, 0);
|
|
6
14
|
}
|
|
7
15
|
constructor(line, column) {
|
|
8
16
|
this.line = line;
|
|
@@ -28,10 +36,20 @@ class Position {
|
|
|
28
36
|
class Location {
|
|
29
37
|
start;
|
|
30
38
|
end;
|
|
31
|
-
static from(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
static from(locationOrLine, column, endLine, endColumn) {
|
|
40
|
+
if (typeof locationOrLine === "number") {
|
|
41
|
+
const start = Position.from(locationOrLine, column);
|
|
42
|
+
const end = Position.from(endLine, endColumn);
|
|
43
|
+
return new Location(start, end);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const start = Position.from(locationOrLine.start);
|
|
47
|
+
const end = Position.from(locationOrLine.end);
|
|
48
|
+
return new Location(start, end);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
static get zero() {
|
|
52
|
+
return new Location(Position.zero, Position.zero);
|
|
35
53
|
}
|
|
36
54
|
constructor(start, end) {
|
|
37
55
|
this.start = start;
|
|
@@ -63,8 +81,16 @@ class Location {
|
|
|
63
81
|
class Range {
|
|
64
82
|
start;
|
|
65
83
|
end;
|
|
66
|
-
static from(
|
|
67
|
-
|
|
84
|
+
static from(rangeOrStart, end) {
|
|
85
|
+
if (typeof rangeOrStart === "number") {
|
|
86
|
+
return new Range(rangeOrStart, end);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return new Range(rangeOrStart[0], rangeOrStart[1]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
static get zero() {
|
|
93
|
+
return new Range(0, 0);
|
|
68
94
|
}
|
|
69
95
|
constructor(start, end) {
|
|
70
96
|
this.start = start;
|
|
@@ -129,7 +155,7 @@ class Token {
|
|
|
129
155
|
}
|
|
130
156
|
|
|
131
157
|
// 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.
|
|
158
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.8.1/templates/javascript/packages/core/src/errors.ts.erb
|
|
133
159
|
class HerbError {
|
|
134
160
|
type;
|
|
135
161
|
message;
|
|
@@ -554,6 +580,84 @@ class RubyParseError extends HerbError {
|
|
|
554
580
|
return output;
|
|
555
581
|
}
|
|
556
582
|
}
|
|
583
|
+
class ERBControlFlowScopeError extends HerbError {
|
|
584
|
+
keyword;
|
|
585
|
+
static from(data) {
|
|
586
|
+
return new ERBControlFlowScopeError({
|
|
587
|
+
type: data.type,
|
|
588
|
+
message: data.message,
|
|
589
|
+
location: Location.from(data.location),
|
|
590
|
+
keyword: data.keyword,
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
constructor(props) {
|
|
594
|
+
super(props.type, props.message, props.location);
|
|
595
|
+
this.keyword = props.keyword;
|
|
596
|
+
}
|
|
597
|
+
toJSON() {
|
|
598
|
+
return {
|
|
599
|
+
...super.toJSON(),
|
|
600
|
+
type: "ERB_CONTROL_FLOW_SCOPE_ERROR",
|
|
601
|
+
keyword: this.keyword,
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
toMonacoDiagnostic() {
|
|
605
|
+
return {
|
|
606
|
+
line: this.location.start.line,
|
|
607
|
+
column: this.location.start.column,
|
|
608
|
+
endLine: this.location.end.line,
|
|
609
|
+
endColumn: this.location.end.column,
|
|
610
|
+
message: this.message,
|
|
611
|
+
severity: 'error'
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
treeInspect() {
|
|
615
|
+
let output = "";
|
|
616
|
+
output += `@ ERBControlFlowScopeError ${this.location.treeInspectWithLabel()}\n`;
|
|
617
|
+
output += `├── message: "${this.message}"\n`;
|
|
618
|
+
output += `└── keyword: ${JSON.stringify(this.keyword)}\n`;
|
|
619
|
+
return output;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
class MissingERBEndTagError extends HerbError {
|
|
623
|
+
keyword;
|
|
624
|
+
static from(data) {
|
|
625
|
+
return new MissingERBEndTagError({
|
|
626
|
+
type: data.type,
|
|
627
|
+
message: data.message,
|
|
628
|
+
location: Location.from(data.location),
|
|
629
|
+
keyword: data.keyword,
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
constructor(props) {
|
|
633
|
+
super(props.type, props.message, props.location);
|
|
634
|
+
this.keyword = props.keyword;
|
|
635
|
+
}
|
|
636
|
+
toJSON() {
|
|
637
|
+
return {
|
|
638
|
+
...super.toJSON(),
|
|
639
|
+
type: "MISSINGERB_END_TAG_ERROR",
|
|
640
|
+
keyword: this.keyword,
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
toMonacoDiagnostic() {
|
|
644
|
+
return {
|
|
645
|
+
line: this.location.start.line,
|
|
646
|
+
column: this.location.start.column,
|
|
647
|
+
endLine: this.location.end.line,
|
|
648
|
+
endColumn: this.location.end.column,
|
|
649
|
+
message: this.message,
|
|
650
|
+
severity: 'error'
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
treeInspect() {
|
|
654
|
+
let output = "";
|
|
655
|
+
output += `@ MissingERBEndTagError ${this.location.treeInspectWithLabel()}\n`;
|
|
656
|
+
output += `├── message: "${this.message}"\n`;
|
|
657
|
+
output += `└── keyword: ${JSON.stringify(this.keyword)}\n`;
|
|
658
|
+
return output;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
557
661
|
function fromSerializedError(error) {
|
|
558
662
|
switch (error.type) {
|
|
559
663
|
case "UNEXPECTED_ERROR": return UnexpectedError.from(error);
|
|
@@ -565,6 +669,8 @@ function fromSerializedError(error) {
|
|
|
565
669
|
case "VOID_ELEMENT_CLOSING_TAG_ERROR": return VoidElementClosingTagError.from(error);
|
|
566
670
|
case "UNCLOSED_ELEMENT_ERROR": return UnclosedElementError.from(error);
|
|
567
671
|
case "RUBY_PARSE_ERROR": return RubyParseError.from(error);
|
|
672
|
+
case "ERB_CONTROL_FLOW_SCOPE_ERROR": return ERBControlFlowScopeError.from(error);
|
|
673
|
+
case "MISSINGERB_END_TAG_ERROR": return MissingERBEndTagError.from(error);
|
|
568
674
|
default:
|
|
569
675
|
throw new Error(`Unknown node type: ${error.type}`);
|
|
570
676
|
}
|
|
@@ -586,7 +692,7 @@ function convertToUTF8(string) {
|
|
|
586
692
|
}
|
|
587
693
|
|
|
588
694
|
// 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.
|
|
695
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.8.1/templates/javascript/packages/core/src/nodes.ts.erb
|
|
590
696
|
class Node {
|
|
591
697
|
type;
|
|
592
698
|
location;
|
|
@@ -2839,7 +2945,7 @@ class ParseResult extends Result {
|
|
|
2839
2945
|
}
|
|
2840
2946
|
|
|
2841
2947
|
// 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.
|
|
2948
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.8.1/templates/javascript/packages/core/src/node-type-guards.ts.erb
|
|
2843
2949
|
/**
|
|
2844
2950
|
* Type guard functions for AST nodes.
|
|
2845
2951
|
* These functions provide type checking by combining both instanceof
|
|
@@ -3460,7 +3566,7 @@ function filterERBInNodes(nodes) {
|
|
|
3460
3566
|
* Checks if a node is an ERB output node (generates content: <%= %> or <%== %>)
|
|
3461
3567
|
*/
|
|
3462
3568
|
function isERBOutputNode(node) {
|
|
3463
|
-
if (!
|
|
3569
|
+
if (!isERBNode(node))
|
|
3464
3570
|
return false;
|
|
3465
3571
|
if (!node.tag_opening?.value)
|
|
3466
3572
|
return false;
|
|
@@ -3732,8 +3838,184 @@ function toMonacoDiagnostic(diagnostic) {
|
|
|
3732
3838
|
};
|
|
3733
3839
|
}
|
|
3734
3840
|
|
|
3841
|
+
/*
|
|
3842
|
+
* The following code is derived from the "js-levenshtein" repository,
|
|
3843
|
+
* Copyright (c) 2017 Gustaf Andersson (https://github.com/gustf/js-levenshtein)
|
|
3844
|
+
* Licensed under the MIT License (https://github.com/gustf/js-levenshtein/blob/master/LICENSE).
|
|
3845
|
+
*
|
|
3846
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
3847
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
3848
|
+
* in the Software without restriction, including without limitation the rights
|
|
3849
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
3850
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
3851
|
+
* furnished to do so, subject to the following conditions:
|
|
3852
|
+
*
|
|
3853
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
3854
|
+
* copies or substantial portions of the Software.
|
|
3855
|
+
*
|
|
3856
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
3857
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
3858
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
3859
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
3860
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
3861
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
3862
|
+
* SOFTWARE.
|
|
3863
|
+
*
|
|
3864
|
+
* https://github.com/marcoroth/stimulus-lsp/blob/52268d4a4d06504dde6cb81f505a23b5db5d5759/server/src/levenshtein.ts
|
|
3865
|
+
*
|
|
3866
|
+
*/
|
|
3867
|
+
function levenshtein(a, b) {
|
|
3868
|
+
function _min(d0, d1, d2, bx, ay) {
|
|
3869
|
+
return d0 < d1 || d2 < d1 ? (d0 > d2 ? d2 + 1 : d0 + 1) : bx === ay ? d1 : d1 + 1;
|
|
3870
|
+
}
|
|
3871
|
+
if (a === b) {
|
|
3872
|
+
return 0;
|
|
3873
|
+
}
|
|
3874
|
+
if (a.length > b.length) {
|
|
3875
|
+
const tmp = a;
|
|
3876
|
+
a = b;
|
|
3877
|
+
b = tmp;
|
|
3878
|
+
}
|
|
3879
|
+
let la = a.length;
|
|
3880
|
+
let lb = b.length;
|
|
3881
|
+
while (la > 0 && a.charCodeAt(la - 1) === b.charCodeAt(lb - 1)) {
|
|
3882
|
+
la--;
|
|
3883
|
+
lb--;
|
|
3884
|
+
}
|
|
3885
|
+
let offset = 0;
|
|
3886
|
+
while (offset < la && a.charCodeAt(offset) === b.charCodeAt(offset)) {
|
|
3887
|
+
offset++;
|
|
3888
|
+
}
|
|
3889
|
+
la -= offset;
|
|
3890
|
+
lb -= offset;
|
|
3891
|
+
if (la === 0 || lb < 3) {
|
|
3892
|
+
return lb;
|
|
3893
|
+
}
|
|
3894
|
+
let x = 0;
|
|
3895
|
+
let y;
|
|
3896
|
+
let d0;
|
|
3897
|
+
let d1;
|
|
3898
|
+
let d2;
|
|
3899
|
+
let d3;
|
|
3900
|
+
let dd;
|
|
3901
|
+
let dy;
|
|
3902
|
+
let ay;
|
|
3903
|
+
let bx0;
|
|
3904
|
+
let bx1;
|
|
3905
|
+
let bx2;
|
|
3906
|
+
let bx3;
|
|
3907
|
+
const vector = [];
|
|
3908
|
+
for (y = 0; y < la; y++) {
|
|
3909
|
+
vector.push(y + 1);
|
|
3910
|
+
vector.push(a.charCodeAt(offset + y));
|
|
3911
|
+
}
|
|
3912
|
+
const len = vector.length - 1;
|
|
3913
|
+
for (; x < lb - 3;) {
|
|
3914
|
+
bx0 = b.charCodeAt(offset + (d0 = x));
|
|
3915
|
+
bx1 = b.charCodeAt(offset + (d1 = x + 1));
|
|
3916
|
+
bx2 = b.charCodeAt(offset + (d2 = x + 2));
|
|
3917
|
+
bx3 = b.charCodeAt(offset + (d3 = x + 3));
|
|
3918
|
+
dd = x += 4;
|
|
3919
|
+
for (y = 0; y < len; y += 2) {
|
|
3920
|
+
dy = vector[y];
|
|
3921
|
+
ay = vector[y + 1];
|
|
3922
|
+
d0 = _min(dy, d0, d1, bx0, ay);
|
|
3923
|
+
d1 = _min(d0, d1, d2, bx1, ay);
|
|
3924
|
+
d2 = _min(d1, d2, d3, bx2, ay);
|
|
3925
|
+
dd = _min(d2, d3, dd, bx3, ay);
|
|
3926
|
+
vector[y] = dd;
|
|
3927
|
+
d3 = d2;
|
|
3928
|
+
d2 = d1;
|
|
3929
|
+
d1 = d0;
|
|
3930
|
+
d0 = dy;
|
|
3931
|
+
}
|
|
3932
|
+
}
|
|
3933
|
+
for (; x < lb;) {
|
|
3934
|
+
bx0 = b.charCodeAt(offset + (d0 = x));
|
|
3935
|
+
dd = ++x;
|
|
3936
|
+
for (y = 0; y < len; y += 2) {
|
|
3937
|
+
dy = vector[y];
|
|
3938
|
+
vector[y] = dd = _min(dy, d0, dd, bx0, vector[y + 1]);
|
|
3939
|
+
d0 = dy;
|
|
3940
|
+
}
|
|
3941
|
+
}
|
|
3942
|
+
return dd;
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3945
|
+
/**
|
|
3946
|
+
* Ranks a list of strings by their Levenshtein distance from the input string.
|
|
3947
|
+
* Items are sorted in ascending order by distance, with closer matches first.
|
|
3948
|
+
*
|
|
3949
|
+
* @param input - The string to compare against
|
|
3950
|
+
* @param list - The list of strings to rank
|
|
3951
|
+
* @returns An array of objects containing the item and its distance score, sorted by score
|
|
3952
|
+
*/
|
|
3953
|
+
function rank(input, list) {
|
|
3954
|
+
return list.map(item => {
|
|
3955
|
+
const score = levenshtein(input.toLowerCase(), item.toLowerCase());
|
|
3956
|
+
return { item, score };
|
|
3957
|
+
}).sort((a, b) => a.score - b.score);
|
|
3958
|
+
}
|
|
3959
|
+
/**
|
|
3960
|
+
* Finds the closest matching string from a list using Levenshtein distance.
|
|
3961
|
+
* Performs case-insensitive comparison.
|
|
3962
|
+
*
|
|
3963
|
+
* @param input - The string to match against
|
|
3964
|
+
* @param list - The list of candidate strings to search
|
|
3965
|
+
* @param threshold - Maximum Levenshtein distance to consider a match. If undefined, returns the closest match regardless of distance.
|
|
3966
|
+
* @returns The closest matching string from the list, or null if the list is empty or no match is within the threshold
|
|
3967
|
+
*
|
|
3968
|
+
* @example
|
|
3969
|
+
* ```ts
|
|
3970
|
+
* didyoumean('speling', ['spelling', 'writing', 'reading']) // Returns 'spelling'
|
|
3971
|
+
* didyoumean('test', []) // Returns null
|
|
3972
|
+
* didyoumean('speling', ['spelling', 'writing', 'reading'], 2) // Returns 'spelling' (distance: 1)
|
|
3973
|
+
* didyoumean('xyz', ['spelling', 'writing', 'reading'], 2) // Returns null (all distances > 2)
|
|
3974
|
+
* ```
|
|
3975
|
+
*/
|
|
3976
|
+
function didyoumean(input, list, threshold) {
|
|
3977
|
+
if (list.length === 0)
|
|
3978
|
+
return null;
|
|
3979
|
+
const scores = rank(input, list);
|
|
3980
|
+
if (scores.length === 0)
|
|
3981
|
+
return null;
|
|
3982
|
+
const closest = scores[0];
|
|
3983
|
+
if (threshold !== undefined && closest.score > threshold)
|
|
3984
|
+
return null;
|
|
3985
|
+
return closest.item;
|
|
3986
|
+
}
|
|
3987
|
+
/**
|
|
3988
|
+
* Returns all strings from a list ranked by their Levenshtein distance from the input string.
|
|
3989
|
+
* Performs case-insensitive comparison. Results are sorted with closest matches first.
|
|
3990
|
+
*
|
|
3991
|
+
* @param input - The string to match against
|
|
3992
|
+
* @param list - The list of candidate strings to rank
|
|
3993
|
+
* @param threshold - Maximum Levenshtein distance to include in results. If undefined, returns all ranked results.
|
|
3994
|
+
* @returns An array of ranked results with items and scores, or an empty array if the list is empty or no matches are within the threshold
|
|
3995
|
+
*
|
|
3996
|
+
* @example
|
|
3997
|
+
* ```ts
|
|
3998
|
+
* didyoumeanRanked('speling', ['spelling', 'writing', 'reading'])
|
|
3999
|
+
* // Returns [{ item: 'spelling', score: 1 }, { item: 'reading', score: 5 }, { item: 'writing', score: 6 }]
|
|
4000
|
+
*
|
|
4001
|
+
* didyoumeanRanked('speling', ['spelling', 'writing', 'reading'], 2)
|
|
4002
|
+
* // Returns [{ item: 'spelling', score: 1 }]
|
|
4003
|
+
*
|
|
4004
|
+
* didyoumeanRanked('test', []) // Returns []
|
|
4005
|
+
* ```
|
|
4006
|
+
*/
|
|
4007
|
+
function didyoumeanRanked(input, list, threshold) {
|
|
4008
|
+
if (list.length === 0)
|
|
4009
|
+
return [];
|
|
4010
|
+
const scores = rank(input, list);
|
|
4011
|
+
if (threshold !== undefined) {
|
|
4012
|
+
return scores.filter(result => result.score <= threshold);
|
|
4013
|
+
}
|
|
4014
|
+
return scores;
|
|
4015
|
+
}
|
|
4016
|
+
|
|
3735
4017
|
var name = "@herb-tools/core";
|
|
3736
|
-
var version = "0.
|
|
4018
|
+
var version = "0.8.1";
|
|
3737
4019
|
var packageJSON = {
|
|
3738
4020
|
name: name,
|
|
3739
4021
|
version: version};
|
|
@@ -3956,7 +4238,7 @@ class HerbBackend {
|
|
|
3956
4238
|
}
|
|
3957
4239
|
|
|
3958
4240
|
// 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.
|
|
4241
|
+
// be modified manually. See /Users/marcoroth/Development/herb-release-0.8.1/templates/javascript/packages/core/src/visitor.ts.erb
|
|
3960
4242
|
class Visitor {
|
|
3961
4243
|
visit(node) {
|
|
3962
4244
|
if (!node)
|
|
@@ -4118,5 +4400,5 @@ class Visitor {
|
|
|
4118
4400
|
}
|
|
4119
4401
|
}
|
|
4120
4402
|
|
|
4121
|
-
export { AST_TYPE_GUARDS, CDATANode, DEFAULT_PARSER_OPTIONS, DocumentNode, ERBBeginNode, ERBBlockNode, ERBCaseMatchNode, ERBCaseNode, ERBContentNode, ERBElseNode, ERBEndNode, ERBEnsureNode, ERBForNode, ERBIfNode, ERBInNode, ERBNodeClasses, ERBRescueNode, ERBUnlessNode, ERBUntilNode, ERBWhenNode, ERBWhileNode, ERBYieldNode, HTMLAttributeNameNode, HTMLAttributeNode, HTMLAttributeValueNode, HTMLCloseTagNode, HTMLCommentNode, HTMLDoctypeNode, HTMLElementNode, HTMLOpenTagNode, HTMLTextNode, HerbBackend, HerbError, HerbWarning, LexResult, LiteralNode, Location, MissingClosingTagError, MissingOpeningTagError, NODE_TYPE_GUARDS, Node, ParseResult, Position, QuotesMismatchError, Range, Result, RubyParseError, TagNamesMismatchError, Token, TokenList, UnclosedElementError, UnexpectedError, UnexpectedTokenError, Visitor, VoidElementClosingTagError, WhitespaceNode, XMLDeclarationNode, _TYPECHECK, areAllOfType, convertToUTF8, ensureLibHerbBackend, ensureString, filterCDATANodes, filterDocumentNodes, filterERBBeginNodes, filterERBBlockNodes, filterERBCaseMatchNodes, filterERBCaseNodes, filterERBContentNodes, filterERBElseNodes, filterERBEndNodes, filterERBEnsureNodes, filterERBForNodes, filterERBIfNodes, filterERBInNodes, filterERBRescueNodes, filterERBUnlessNodes, filterERBUntilNodes, filterERBWhenNodes, filterERBWhileNodes, filterERBYieldNodes, filterHTMLAttributeNameNodes, filterHTMLAttributeNodes, filterHTMLAttributeValueNodes, filterHTMLCloseTagNodes, filterHTMLCommentNodes, filterHTMLDoctypeNodes, filterHTMLElementNodes, filterHTMLOpenTagNodes, filterHTMLTextNodes, filterLiteralNodes, filterNodes, filterWhitespaceNodes, filterXMLDeclarationNodes, fromSerializedError, fromSerializedNode, getCombinedAttributeName, getCombinedStringFromNodes, getNodesAfterLocation, getNodesAfterPosition, getNodesBeforeLocation, getNodesBeforePosition, getStaticAttributeName, getStaticContentFromNodes, getStaticStringFromNodes, getTagName, getValidatableStaticContent, hasChildren, hasDynamicAttributeName, hasERBContent, hasERBOutput, hasStaticAttributeName, hasStaticContent, isAnyOf, isCDATANode, isCommentNode, isDocumentNode, isERBBeginNode, isERBBlockNode, isERBCaseMatchNode, isERBCaseNode, isERBContentNode, isERBControlFlowNode, isERBElseNode, isERBEndNode, isERBEnsureNode, isERBForNode, isERBIfNode, isERBInNode, isERBNode, isERBOutputNode, isERBRescueNode, isERBUnlessNode, isERBUntilNode, isERBWhenNode, isERBWhileNode, isERBYieldNode, isEffectivelyStatic, isHTMLAttributeNameNode, isHTMLAttributeNode, isHTMLAttributeValueNode, isHTMLCloseTagNode, isHTMLCommentNode, isHTMLDoctypeNode, isHTMLElementNode, isHTMLNode, isHTMLOpenTagNode, isHTMLTextNode, isLibHerbBackend, isLiteralNode, isNode, isNoneOf, isParseResult, isPositionAfter, isPositionEqual, isToken, isWhitespaceNode, isXMLDeclarationNode, splitNodesAroundLocation, splitNodesAroundPosition, toMonacoDiagnostic };
|
|
4403
|
+
export { AST_TYPE_GUARDS, CDATANode, DEFAULT_PARSER_OPTIONS, DocumentNode, ERBBeginNode, ERBBlockNode, ERBCaseMatchNode, ERBCaseNode, ERBContentNode, ERBControlFlowScopeError, ERBElseNode, ERBEndNode, ERBEnsureNode, ERBForNode, ERBIfNode, ERBInNode, ERBNodeClasses, ERBRescueNode, ERBUnlessNode, ERBUntilNode, ERBWhenNode, ERBWhileNode, ERBYieldNode, HTMLAttributeNameNode, HTMLAttributeNode, HTMLAttributeValueNode, HTMLCloseTagNode, HTMLCommentNode, HTMLDoctypeNode, HTMLElementNode, HTMLOpenTagNode, HTMLTextNode, HerbBackend, HerbError, HerbWarning, LexResult, LiteralNode, Location, MissingClosingTagError, MissingERBEndTagError, MissingOpeningTagError, NODE_TYPE_GUARDS, Node, ParseResult, Position, QuotesMismatchError, Range, Result, RubyParseError, TagNamesMismatchError, Token, TokenList, UnclosedElementError, UnexpectedError, UnexpectedTokenError, Visitor, VoidElementClosingTagError, WhitespaceNode, XMLDeclarationNode, _TYPECHECK, areAllOfType, convertToUTF8, didyoumean, didyoumeanRanked, ensureLibHerbBackend, ensureString, filterCDATANodes, filterDocumentNodes, filterERBBeginNodes, filterERBBlockNodes, filterERBCaseMatchNodes, filterERBCaseNodes, filterERBContentNodes, filterERBElseNodes, filterERBEndNodes, filterERBEnsureNodes, filterERBForNodes, filterERBIfNodes, filterERBInNodes, filterERBRescueNodes, filterERBUnlessNodes, filterERBUntilNodes, filterERBWhenNodes, filterERBWhileNodes, filterERBYieldNodes, filterHTMLAttributeNameNodes, filterHTMLAttributeNodes, filterHTMLAttributeValueNodes, filterHTMLCloseTagNodes, filterHTMLCommentNodes, filterHTMLDoctypeNodes, filterHTMLElementNodes, filterHTMLOpenTagNodes, filterHTMLTextNodes, filterLiteralNodes, filterNodes, filterWhitespaceNodes, filterXMLDeclarationNodes, fromSerializedError, fromSerializedNode, getCombinedAttributeName, getCombinedStringFromNodes, getNodesAfterLocation, getNodesAfterPosition, getNodesBeforeLocation, getNodesBeforePosition, getStaticAttributeName, getStaticContentFromNodes, getStaticStringFromNodes, getTagName, getValidatableStaticContent, hasChildren, hasDynamicAttributeName, hasERBContent, hasERBOutput, hasStaticAttributeName, hasStaticContent, isAnyOf, isCDATANode, isCommentNode, isDocumentNode, isERBBeginNode, isERBBlockNode, isERBCaseMatchNode, isERBCaseNode, isERBContentNode, isERBControlFlowNode, isERBElseNode, isERBEndNode, isERBEnsureNode, isERBForNode, isERBIfNode, isERBInNode, isERBNode, isERBOutputNode, isERBRescueNode, isERBUnlessNode, isERBUntilNode, isERBWhenNode, isERBWhileNode, isERBYieldNode, isEffectivelyStatic, isHTMLAttributeNameNode, isHTMLAttributeNode, isHTMLAttributeValueNode, isHTMLCloseTagNode, isHTMLCommentNode, isHTMLDoctypeNode, isHTMLElementNode, isHTMLNode, isHTMLOpenTagNode, isHTMLTextNode, isLibHerbBackend, isLiteralNode, isNode, isNoneOf, isParseResult, isPositionAfter, isPositionEqual, isToken, isWhitespaceNode, isXMLDeclarationNode, levenshtein, splitNodesAroundLocation, splitNodesAroundPosition, toMonacoDiagnostic };
|
|
4122
4404
|
//# sourceMappingURL=herb-core.browser.js.map
|