mirror of
https://github.com/github/codeql.git
synced 2026-01-04 10:10:20 +01:00
add support for namespaced JSX attributes
This commit is contained in:
@@ -1552,8 +1552,13 @@ public class TypeScriptASTConverter {
|
||||
}
|
||||
|
||||
private Node convertJsxAttribute(JsonObject node, SourceLocation loc) throws ParseError {
|
||||
JsonObject nameNode = node.get("name").getAsJsonObject();
|
||||
if (nameNode.get("name") != null) {
|
||||
// it's a namespaced attribute
|
||||
nameNode = nameNode.get("name").getAsJsonObject();
|
||||
}
|
||||
return new JSXAttribute(
|
||||
loc, convertJSXName(convertChild(node, "name")), convertChild(node, "initializer"));
|
||||
loc, convertJSXName(((Expression)convertNode(nameNode, null))), convertChild(node, "initializer")); // 2
|
||||
}
|
||||
|
||||
private Node convertJsxClosingElement(JsonObject node, SourceLocation loc) throws ParseError {
|
||||
|
||||
Reference in New Issue
Block a user