Skip to content

Commit

Permalink
minor (#663): simplified logic for builtin types
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzholzbauer committed Jul 25, 2024
1 parent 82b38cf commit cf329d0
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions kipper/target-js/src/code-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,17 +960,13 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {

const operand = semanticData.operand;

if(operand.getTypeSemanticData().evaluatedType instanceof BuiltInType) {
const runtimeType = TargetJS.getRuntimeType(operand.getTypeSemanticData().evaluatedType);
const runtimeType = TargetJS.getRuntimeType(operand.getTypeSemanticData().evaluatedType);

if(runtimeType instanceof BuiltInRuntimeType) {
return [`${TargetJS.internalObjectIdentifier}.builtIn.${runtimeType.name}`];
}
else {
return ["lol"];
}
if(runtimeType instanceof BuiltInRuntimeType) {
return [`${TargetJS.internalObjectIdentifier}.builtIn.${runtimeType.name}`];
}
else {
return [ runtimeType ]; // Implement logic for interfaces and classes
}

return [ ];
};
}

0 comments on commit cf329d0

Please sign in to comment.