Skip to content

Transformation Pipeline Refactor#705

Merged
Perryvw merged 44 commits intoTypeScriptToLua:masterfrom
ark120202:transformation-pipeline-refactor
Dec 7, 2019
Merged

Transformation Pipeline Refactor#705
Perryvw merged 44 commits intoTypeScriptToLua:masterfrom
ark120202:transformation-pipeline-refactor

Conversation

@ark120202
Copy link
Copy Markdown
Contributor

@ark120202 ark120202 commented Aug 19, 2019

Resolves #615, closes #559.

return exportSpecifiers.map(exportSpecifier => transformExportSpecifier(context, exportSpecifier));
}

// export { ... } from "...";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like this coding style from this file, as a general reminder also to myself, maybe we should add this to some style guide.

@ark120202 ark120202 force-pushed the transformation-pipeline-refactor branch from ca718f4 to 0c18503 Compare November 3, 2019 03:25
const expression = ts.isExpressionStatement(node) ? node.expression : node;
if (ts.isDeleteExpression(expression)) {
return lua.createAssignmentStatement(
cast(context.transformExpression(expression.expression), lua.isAssignmentLeftHandSideExpression),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How about renaming cast to verifyType?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For me, verify implies that it's returning an error on failure, not throwing.

Maybe something like assertWith(value, cast) (which is just assert(cast(value)), but with a better failure message)? We'd have to upgrade TS to 3.7 for that though

@ark120202 ark120202 mentioned this pull request Nov 18, 2019
@ark120202 ark120202 force-pushed the transformation-pipeline-refactor branch from 01cbec6 to 6a3af12 Compare November 24, 2019 00:54
@ark120202 ark120202 marked this pull request as ready for review December 7, 2019 16:15
@Perryvw Perryvw merged commit e238cc7 into TypeScriptToLua:master Dec 7, 2019
@ark120202 ark120202 deleted the transformation-pipeline-refactor branch December 7, 2019 16:35
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.

Pluggable transformer design Rename Decorator to Directive

2 participants