• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Shenzhen Kaihong Digital.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package antlr.typescript;
17 
18 import java.util.ArrayList;
19 import java.util.List;
20 
21 /**
22  * <h3>类名:该类用于xxx</h3>
23  * description typescript parse tree node
24  *
25  * @author Administrator
26  *         date 2025-02-28
27  * @version 1.0
28  * @since 2025-02-28
29  */
30 public class TypeScriptTreeNode {
31     private String type;
32     private String text;
33     private List<TypeScriptTreeNode> children;
34 
TypeScriptTreeNode()35     public TypeScriptTreeNode() {}
36 
TypeScriptTreeNode(String type, String text)37     public TypeScriptTreeNode(String type, String text) {
38         this.type = type;
39         this.text = text;
40         this.children = new ArrayList<>();
41     }
42 
setType(String type)43     public void setType(String type) {
44         this.type = type;
45     }
46 
getType()47     public String getType() {
48         return type;
49     }
50 
setText(String text)51     public void setText(String text) {
52         this.text = text;
53     }
54 
getText()55     public String getText() {
56         return text;
57     }
58 
setChildren(List<TypeScriptTreeNode> children)59     public void setChildren(List<TypeScriptTreeNode> children) {
60         this.children = children;
61     }
62 
getChildren()63     public List<TypeScriptTreeNode> getChildren() {
64         return children;
65     }
66 }
67