From 7b252bda771686df82c09a8dce68355e1c42c9e3 Mon Sep 17 00:00:00 2001 From: thsparks Date: Thu, 26 Sep 2024 00:22:43 -0700 Subject: [PATCH] Noodling on decompiler stuff --- pxtcompiler/emitter/decompiler.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pxtcompiler/emitter/decompiler.ts b/pxtcompiler/emitter/decompiler.ts index 5edb8a972a44..a5e92fe6e0d2 100644 --- a/pxtcompiler/emitter/decompiler.ts +++ b/pxtcompiler/emitter/decompiler.ts @@ -33,7 +33,8 @@ namespace ts.pxtc.decompiler { export enum CommentKind { SingleLine, - MultiLine + MultiLine, + Review } export interface MultiLineComment extends CommentInfo { @@ -46,6 +47,11 @@ namespace ts.pxtc.decompiler { text: string; } + export interface ReviewComment extends CommentInfo { + kind: CommentKind.Review; + lines: string[]; + } + export type Comment = MultiLineComment | SingleLineComment; export const DECOMPILER_ERROR = 9267; @@ -1313,6 +1319,8 @@ ${output}`; * d. If the comment is not followed with an empty line, group it with the next statement or event * e. All other comments are workspace comments * + * If it's a review comment, we apply it in as a block field instead of a normal blockly comment. (TODO thsparks.) + * * The below function gathers any comments associated to the Node, and attaches them * to the StatementNode. */