use Identifier instead of just a plain string when getting tuple-element-names

This commit is contained in:
Erik Krogh Kristensen
2020-08-12 16:55:55 +02:00
parent a7a016c5df
commit fd9eb1d40b
9 changed files with 22 additions and 36 deletions

View File

@@ -1,5 +1,6 @@
package com.semmle.ts.ast;
import com.semmle.js.ast.Identifier;
import com.semmle.js.ast.SourceLocation;
import com.semmle.js.ast.Visitor;
import java.util.List;
@@ -7,9 +8,9 @@ import java.util.List;
/** A tuple type, such as <tt>[number, string]</tt>. */
public class TupleTypeExpr extends TypeExpression {
private final List<ITypeExpression> elementTypes;
private final List<String> elementNames;
private final List<Identifier> elementNames;
public TupleTypeExpr(SourceLocation loc, List<ITypeExpression> elementTypes, List<String> elementNames) {
public TupleTypeExpr(SourceLocation loc, List<ITypeExpression> elementTypes, List<Identifier> elementNames) {
super("TupleTypeExpr", loc);
this.elementTypes = elementTypes;
this.elementNames = elementNames;
@@ -19,7 +20,7 @@ public class TupleTypeExpr extends TypeExpression {
return elementTypes;
}
public List<String> getElementNames() {
public List<Identifier> getElementNames() {
return elementNames;
}