Skip to content

Commit

Permalink
Noodling on decompiler stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
thsparks committed Sep 26, 2024
1 parent f6dc659 commit 7b252bd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pxtcompiler/emitter/decompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ namespace ts.pxtc.decompiler {

export enum CommentKind {
SingleLine,
MultiLine
MultiLine,
Review
}

export interface MultiLineComment extends CommentInfo {
Expand All @@ -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;
Expand Down Expand Up @@ -1313,6 +1319,8 @@ ${output}</xml>`;
* 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.
*/
Expand Down

0 comments on commit 7b252bd

Please sign in to comment.