Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.filter(variable => {
//HACK: let's filter out those constants we don't know
//how to read. they'll just clutter things up.
debug("variable %O", variable);
let definition = inlined[variable.id].definition;
return (
!definition.constant ||
CodecUtils.Definition.isSimpleConstant(definition.value)
);
});
node =>
node.nodeType === "FunctionDefinition" &&
CodecUtils.Definition.functionKind(node) === "constructor"
);
export function isSkippedNodeType(node) {
const otherSkippedTypes = ["VariableDeclarationStatement", "Mapping"];
return (
isDeliberatelySkippedNodeType(node) ||
otherSkippedTypes.includes(node.nodeType) ||
node.nodeType.includes("TypeName") || //HACK
//skip string literals too -- we'll handle that manually
(node.typeDescriptions !== undefined && //seems this sometimes happens?
Utils.Definition.typeClass(node) === "stringliteral")
);
}