Skip to content

Transformation Pipeline Refactor - #705

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

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

Conversation

@ark120202

@ark120202 ark120202 commented Aug 19, 2019

Copy link
Copy Markdown
Contributor

Resolves #615, closes #559.

Comment thread src/LuaAST.ts Outdated
Comment thread src/transformation/builtins/global.ts Outdated
Comment thread src/transformation/builtins/number.ts
Comment thread src/transformation/context/visitors.ts Outdated
Comment thread src/transformation/index.ts
Comment thread src/transformation/index.ts Outdated
Comment thread src/transformation/transformers/access.ts Outdated
Comment thread src/transformation/transformers/binary/destructuring-assignments.ts
Comment thread src/transformation/transformers/class/members/accessors.ts Outdated
Comment thread src/transformation/transformers/class/members/accessors.ts Outdated
Comment thread src/transformation/transformers/class/new.ts Outdated
Comment thread src/transformation/transformers/jump.ts Outdated
Comment thread test/unit/loops.spec.ts
Comment thread test/unit/typeof.spec.ts
Comment thread src/transformation/utils/lualib.ts Outdated
Comment thread src/transformation/utils/decorators/collect.ts Outdated
Comment thread src/transformation/transformers/modules/export.ts Outdated
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.

Comment thread src/transformation/transformers/todo-move-somewhere.ts Outdated
Comment thread src/transformation/transformers/typeof.ts Outdated
Comment thread src/transformation/transformers/typeof.ts Outdated
Comment thread src/transformation/utils/assignment-validation.ts
Comment thread src/transformation/builtins/function.ts Outdated
Comment thread src/plugins.ts
Comment thread src/plugins.ts Outdated
@ark120202
ark120202 force-pushed the transformation-pipeline-refactor branch from ca718f4 to 0c18503 Compare November 3, 2019 03:25
Comment thread src/transformation/transformers/access.ts
Comment thread src/transformation/transformers/call.ts
Comment thread src/transformation/transformers/class/new.ts Outdated
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

Comment thread src/transformation/transformers/enum.ts
Comment thread src/transformation/transformers/todo-move-somewhere.ts Outdated
Comment thread src/transformation/utils/annotations/collect.ts Outdated
Comment thread src/transformation/utils/annotations/index.ts Outdated
Comment thread src/transformation/utils/lualib.ts
@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
Comment thread src/plugins.ts Outdated
Comment thread src/transformation/transformers/variable.ts
Comment thread src/transformation/utils/symbols.ts
@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