Skip to content

Commit

Permalink
More compiler noodling, doesn't do anything yet
Browse files Browse the repository at this point in the history
  • Loading branch information
thsparks committed Sep 26, 2024
1 parent ccdfcbb commit 37f4f97
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pxtblocks/compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import { append, countOptionals, escapeVarName, forEachChildExpression, getInput
import { isArrayType } from "../toolbox";
import { MutatorTypes } from "../legacyMutations";
import { trackAllVariables } from "./variables";
import { FieldTilemap, FieldTextInput } from "../fields";
import { FieldTilemap, FieldTextInput, getBlockDataForField } from "../fields";
import { CommonFunctionBlock } from "../plugins/functions/commonFunctionMixin";
import { REVIEW_COMMENT_FIELD_NAME } from "../plugins/comments/reviewCommentIcon";


interface Rect {
Expand Down Expand Up @@ -801,6 +802,13 @@ function maybeAddComment(b: Blockly.Block, comments: string[]) {
}
}

function maybeAddReviewComment(b: Blockly.Block, reviewComments: string[]) {
const reviewComment = getBlockDataForField(b, REVIEW_COMMENT_FIELD_NAME);
if (reviewComment) {
reviewComments.push(reviewComment);
}
}

function addCommentNodes(comments: string[], r: pxt.blocks.JsNode[]) {
const commentNodes: pxt.blocks.JsNode[] = []

Expand Down Expand Up @@ -1347,4 +1355,4 @@ function eventArgs(call: StdFunc, b: Blockly.Block): pxt.blocks.BlockParameter[]

export function workerOpAsync(op: string, arg: pxtc.service.OpArg) {
return pxt.worker.getWorker(pxt.webConfig.workerjs).opAsync(op, arg)
}
}

0 comments on commit 37f4f97

Please sign in to comment.