Skip to content

Commit

Permalink
Merge pull request #2811 from entrylabs/issue/8675
Browse files Browse the repository at this point in the history
이슈 8675 처리
  • Loading branch information
kimorkim authored Aug 28, 2024
2 parents 4bdf3c4 + 46d8b14 commit 29e90f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 5 additions & 1 deletion src/playground/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ Entry.Block = class Block {
return this.thread;
}

getStatements() {
return this.statements[0];
}

insertAfter(blocks) {
this.thread.insertByBlock(this, blocks);
}
Expand Down Expand Up @@ -336,7 +340,7 @@ Entry.Block = class Block {
});

if (this._backupParams) {
json._backupParams = this._backupParams.map(function(p) {
json._backupParams = this._backupParams.map(function (p) {
if (p instanceof Entry.Block) {
return p.toJSON();
} else {
Expand Down
12 changes: 4 additions & 8 deletions src/textcoding/parser/core/block/blockToPy.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,7 @@ Entry.BlockToPyParser = class {
if (func.params && func.params.length !== 0) {
paramResult = func.params.join(', ').trim();
}
result = result
.concat('(')
.concat(paramResult)
.concat(')');
result = result.concat('(').concat(paramResult).concat(')');

if (isExpression) {
// 선언된 함수 사용하는 블록의 경우
Expand Down Expand Up @@ -666,10 +663,9 @@ Entry.BlockToPyParser = class {

Entry.TextCodingUtil.initQueue();

const funcContents = func.content
.getEventMap('funcDef')[0]
.getThread()
.getBlocks();
const funcContents = func.content.getEventMap('funcDef')[0].getThread().getBlocks();
const statements = func.content.getEventMap('funcDef')[0].getStatements().getBlocks();
statements.forEach((value) => funcContents.push(value));
const defBlock = funcContents.shift();

const funcComment = defBlock.getCommentValue();
Expand Down

0 comments on commit 29e90f3

Please sign in to comment.