@@ -296,7 +296,7 @@ func (n *Node) Text() string {
296
296
case KindRegularExpressionLiteral :
297
297
return n .AsRegularExpressionLiteral ().Text
298
298
case KindJSDocText :
299
- return n .AsJSDocText ().Text
299
+ return strings . Join ( n .AsJSDocText ().text , "" )
300
300
}
301
301
panic (fmt .Sprintf ("Unhandled case in Node.Text: %T" , n .data ))
302
302
}
@@ -8814,40 +8814,40 @@ type JSDocTagBase struct {
8814
8814
8815
8815
type JSDocCommentBase struct {
8816
8816
NodeBase
8817
- Text string
8817
+ text [] string
8818
8818
}
8819
8819
8820
8820
// JSDoc comments
8821
8821
type JSDocText struct {
8822
8822
JSDocCommentBase
8823
8823
}
8824
8824
8825
- func (f * NodeFactory ) NewJSDocText (text string ) * Node {
8825
+ func (f * NodeFactory ) NewJSDocText (text [] string ) * Node {
8826
8826
data := f .jsdocTextPool .New ()
8827
- data .Text = text
8827
+ data .text = text
8828
8828
f .textCount ++
8829
8829
return f .newNode (KindJSDocText , data )
8830
8830
}
8831
8831
8832
8832
func (node * JSDocText ) Clone (f NodeFactoryCoercible ) * Node {
8833
- return cloneNode (f .AsNodeFactory ().NewJSDocText (node .Text ), node .AsNode (), f .AsNodeFactory ().hooks )
8833
+ return cloneNode (f .AsNodeFactory ().NewJSDocText (node .text ), node .AsNode (), f .AsNodeFactory ().hooks )
8834
8834
}
8835
8835
8836
8836
type JSDocLink struct {
8837
8837
JSDocCommentBase
8838
8838
name * Node // optional (should only be EntityName)
8839
8839
}
8840
8840
8841
- func (f * NodeFactory ) NewJSDocLink (name * Node , text string ) * Node {
8841
+ func (f * NodeFactory ) NewJSDocLink (name * Node , text [] string ) * Node {
8842
8842
data := & JSDocLink {}
8843
8843
data .name = name
8844
- data .Text = text
8844
+ data .text = text
8845
8845
f .textCount ++
8846
8846
return f .newNode (KindJSDocLink , data )
8847
8847
}
8848
8848
8849
- func (f * NodeFactory ) UpdateJSDocLink (node * JSDocLink , name * Node , text string ) * Node {
8850
- if name != node .name || text != node .Text {
8849
+ func (f * NodeFactory ) UpdateJSDocLink (node * JSDocLink , name * Node , text [] string ) * Node {
8850
+ if name != node .name || ! core . Same ( text , node .text ) {
8851
8851
return updateNode (f .NewJSDocLink (name , text ), node .AsNode (), f .hooks )
8852
8852
}
8853
8853
return node .AsNode ()
@@ -8858,11 +8858,11 @@ func (node *JSDocLink) ForEachChild(v Visitor) bool {
8858
8858
}
8859
8859
8860
8860
func (node * JSDocLink ) VisitEachChild (v * NodeVisitor ) * Node {
8861
- return v .Factory .UpdateJSDocLink (node , v .visitNode (node .name ), node .Text )
8861
+ return v .Factory .UpdateJSDocLink (node , v .visitNode (node .name ), node .text )
8862
8862
}
8863
8863
8864
8864
func (node * JSDocLink ) Clone (f NodeFactoryCoercible ) * Node {
8865
- return cloneNode (f .AsNodeFactory ().NewJSDocLink (node .Name (), node .Text ), node .AsNode (), f .AsNodeFactory ().hooks )
8865
+ return cloneNode (f .AsNodeFactory ().NewJSDocLink (node .Name (), node .text ), node .AsNode (), f .AsNodeFactory ().hooks )
8866
8866
}
8867
8867
8868
8868
func (node * JSDocLink ) Name () * DeclarationName {
@@ -8874,16 +8874,16 @@ type JSDocLinkPlain struct {
8874
8874
name * Node // optional (should only be EntityName)
8875
8875
}
8876
8876
8877
- func (f * NodeFactory ) NewJSDocLinkPlain (name * Node , text string ) * Node {
8877
+ func (f * NodeFactory ) NewJSDocLinkPlain (name * Node , text [] string ) * Node {
8878
8878
data := & JSDocLinkPlain {}
8879
8879
data .name = name
8880
- data .Text = text
8880
+ data .text = text
8881
8881
f .textCount ++
8882
8882
return f .newNode (KindJSDocLinkPlain , data )
8883
8883
}
8884
8884
8885
- func (f * NodeFactory ) UpdateJSDocLinkPlain (node * JSDocLinkPlain , name * Node , text string ) * Node {
8886
- if name != node .name || text != node .Text {
8885
+ func (f * NodeFactory ) UpdateJSDocLinkPlain (node * JSDocLinkPlain , name * Node , text [] string ) * Node {
8886
+ if name != node .name || ! core . Same ( text , node .text ) {
8887
8887
return updateNode (f .NewJSDocLinkPlain (name , text ), node .AsNode (), f .hooks )
8888
8888
}
8889
8889
return node .AsNode ()
@@ -8894,11 +8894,11 @@ func (node *JSDocLinkPlain) ForEachChild(v Visitor) bool {
8894
8894
}
8895
8895
8896
8896
func (node * JSDocLinkPlain ) VisitEachChild (v * NodeVisitor ) * Node {
8897
- return v .Factory .UpdateJSDocLinkPlain (node , v .visitNode (node .name ), node .Text )
8897
+ return v .Factory .UpdateJSDocLinkPlain (node , v .visitNode (node .name ), node .text )
8898
8898
}
8899
8899
8900
8900
func (node * JSDocLinkPlain ) Clone (f NodeFactoryCoercible ) * Node {
8901
- return cloneNode (f .AsNodeFactory ().NewJSDocLinkPlain (node .Name (), node .Text ), node .AsNode (), f .AsNodeFactory ().hooks )
8901
+ return cloneNode (f .AsNodeFactory ().NewJSDocLinkPlain (node .Name (), node .text ), node .AsNode (), f .AsNodeFactory ().hooks )
8902
8902
}
8903
8903
8904
8904
func (node * JSDocLinkPlain ) Name () * DeclarationName {
@@ -8910,16 +8910,16 @@ type JSDocLinkCode struct {
8910
8910
name * Node // optional (should only be EntityName)
8911
8911
}
8912
8912
8913
- func (f * NodeFactory ) NewJSDocLinkCode (name * Node , text string ) * Node {
8913
+ func (f * NodeFactory ) NewJSDocLinkCode (name * Node , text [] string ) * Node {
8914
8914
data := & JSDocLinkCode {}
8915
8915
data .name = name
8916
- data .Text = text
8916
+ data .text = text
8917
8917
f .textCount ++
8918
8918
return f .newNode (KindJSDocLinkCode , data )
8919
8919
}
8920
8920
8921
- func (f * NodeFactory ) UpdateJSDocLinkCode (node * JSDocLinkCode , name * Node , text string ) * Node {
8922
- if name != node .name || text != node .Text {
8921
+ func (f * NodeFactory ) UpdateJSDocLinkCode (node * JSDocLinkCode , name * Node , text [] string ) * Node {
8922
+ if name != node .name || ! core . Same ( text , node .text ) {
8923
8923
return updateNode (f .NewJSDocLinkCode (name , text ), node .AsNode (), f .hooks )
8924
8924
}
8925
8925
return node .AsNode ()
@@ -8930,11 +8930,11 @@ func (node *JSDocLinkCode) ForEachChild(v Visitor) bool {
8930
8930
}
8931
8931
8932
8932
func (node * JSDocLinkCode ) VisitEachChild (v * NodeVisitor ) * Node {
8933
- return v .Factory .UpdateJSDocLinkCode (node , v .visitNode (node .name ), node .Text )
8933
+ return v .Factory .UpdateJSDocLinkCode (node , v .visitNode (node .name ), node .text )
8934
8934
}
8935
8935
8936
8936
func (node * JSDocLinkCode ) Clone (f NodeFactoryCoercible ) * Node {
8937
- return cloneNode (f .AsNodeFactory ().NewJSDocLinkCode (node .Name (), node .Text ), node .AsNode (), f .AsNodeFactory ().hooks )
8937
+ return cloneNode (f .AsNodeFactory ().NewJSDocLinkCode (node .Name (), node .text ), node .AsNode (), f .AsNodeFactory ().hooks )
8938
8938
}
8939
8939
8940
8940
func (node * JSDocLinkCode ) Name () * DeclarationName {
0 commit comments