Skip to content

Commit

Permalink
Merge pull request #24 from georgejecook/fix/fix-crash-on-chekcing-fu…
Browse files Browse the repository at this point in the history
…nctions

Fix/fix crash on chekcing functions
  • Loading branch information
georgejecook authored Nov 7, 2021
2 parents 82cd080 + 67f1f94 commit d1c679a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [0.13.1](https://github.com/georgejecook/maestro-roku-bsc-plugin/compare/0.13.0...0.13.1)
## [0.13.2](https://github.com/georgejecook/maestro-roku-bsc-plugin/compare/0.13.1...0.13.2)

### Merged

- chore: imrpoves logging [`#23`](https://github.com/georgejecook/maestro-roku-bsc-plugin/pull/23)

### Commits

- version bump [`81275e7`](https://github.com/georgejecook/maestro-roku-bsc-plugin/commit/81275e77d1393cacbd2a3b7f437df32d12bd94ec)

## [0.13.1](https://github.com/georgejecook/maestro-roku-bsc-plugin/compare/0.13.0...0.13.1) - 2021-10-21

### Commits

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maestro-roku-bsc-plugin",
"version": "0.13.1",
"version": "0.13.2",
"description": "Visual studio plugin for maestro brightscript development",
"files": [
"dist/**/!(*.spec.*)*",
Expand Down
7 changes: 5 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,11 @@ export class MaestroPlugin implements CompilerPlugin {
}
if (this.maestroConfig.stripParamTypes) {
for (let fs of entry.file.parser.references.functionExpressions) {
if (fs.returnType && !isVoidType(fs.returnType) && !isDynamicType(fs.returnType) && !this.maestroConfig.paramStripExceptions.includes(fs.functionStatement.name.text)) {
fs.returnType = new DynamicType();
if (fs.returnType && !isVoidType(fs.returnType) && !isDynamicType(fs.returnType)) {
const name = fs.functionStatement?.name?.text || fs.parentFunction?.functionStatement?.name?.text;
if (!this.maestroConfig.paramStripExceptions.includes(name)) {
fs.returnType = new DynamicType();
}
}
for (let param of fs.parameters) {
param.asToken = null;
Expand Down

0 comments on commit d1c679a

Please sign in to comment.