Skip to content

Commit

Permalink
codegen: collect type name too
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Jan 25, 2024
1 parent b0cf14f commit 08a272e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/codeGen.js
Original file line number Diff line number Diff line change
Expand Up @@ -1759,11 +1759,12 @@ const extractTypeAnnotation = decl => {
elementType = extractTypeAnnotation(a.elementType).type;
}

const typeName = type;
type = typeAnnoToPorfType(type);

// if (decl.name) console.log(decl.name, { type, elementType });

return { type, elementType };
return { type, typeName, elementType };
};

const generateVar = (scope, decl) => {
Expand Down

0 comments on commit 08a272e

Please sign in to comment.