Skip to content

Implemented try/catch and throw - #334

Merged
Perryvw merged 2 commits into
ts-to-lua-astfrom
feature/try-catch
Jan 13, 2019
Merged

Implemented try/catch and throw#334
Perryvw merged 2 commits into
ts-to-lua-astfrom
feature/try-catch

Conversation

@Perryvw

@Perryvw Perryvw commented Jan 12, 2019

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/LuaTransformer.ts Outdated
? [tryResult, this.transformIdentifier(statement.catchClause.variableDeclaration.name as ts.Identifier)]
: [tryResult];

const catchAssignment = this.createLocalOrGlobalDeclaration(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use tstl.createVariableDeclaration as this should never be global.

@Perryvw
Perryvw merged commit 3595bd4 into ts-to-lua-ast Jan 13, 2019
@Perryvw
Perryvw deleted the feature/try-catch branch January 19, 2019 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants