Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyProgrammist committed Dec 21, 2023
1 parent 498c225 commit 83fb037
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/codegen/generators/typescript/type_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,16 @@ export function handleType(fieldType: TLBFieldType, expr: ParserExpression, fiel
exprForParam = {argLoadExpr: undefined, argStoreExpr: undefined, paramType: 'Address', fieldLoadSuffix: 'Address', fieldStoreSuffix: 'Address'}
}
} else {
if (constructor.variablesMap.get(expr.name)?.type == '#') {
result.loadExpr = getVarExprByName(expr.name, constructor)
let typeName = expr.name
if (fieldType.kind == 'TLBNamedType' && fieldType.name != 'tmplololokekeke') {
typeName = fieldType.name;
}

if (constructor.variablesMap.get(typeName)?.type == '#') {
result.loadExpr = getVarExprByName(typeName, constructor)
result.storeExpr = tExpressionStatement(result.loadExpr);
} else {
let typeName = expr.name
if (fieldType.kind == 'TLBNamedType' && fieldType.name != 'tmplololokekeke') {
typeName = fieldType.name;
}

result.typeParamExpr = tIdentifier(typeName);
if (isField) {
result.loadExpr = tFunctionCall(tIdentifier('load' + typeName), [tIdentifier(theSlice)])
Expand Down

0 comments on commit 83fb037

Please sign in to comment.