Skip to content

Commit 1769c28

Browse files
committed
bah
1 parent e289c1a commit 1769c28

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

‎v5-unity/js/pytutor.ts‎

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,6 @@ export class ExecutionVisualizer {
10471047
myViz.prevLineIsReturn = prevIsReturn;
10481048
}
10491049

1050-
// TODO: this is used by opt-frontend.ts; find a cleaner way to expose
1051-
// NB: copy-and-paste from isOutputLineVisible with some minor tweaks
10521050
isOutputLineVisibleForBubbles(lineDivID) {
10531051
var pcod = this.domRoot.find('#pyCodeOutputDiv');
10541052

@@ -3078,7 +3076,12 @@ class CodeDisplay {
30783076
codToDisplay: string;
30793077

30803078
// initialize in renderPyCodeOutput()
3081-
codeOutputLines: any[];
3079+
// an array of objects with the following fields:
3080+
// 'text' - the text of the line of code
3081+
// 'lineNumber' - one-indexed (always the array index + 1)
3082+
// 'executionPoints' - an ordered array of zero-indexed execution points where this line was executed
3083+
// 'breakpointHere' - has a breakpoint been set here?
3084+
codeOutputLines: {text: string, lineNumber: number, executionPoints: number[], breakpointHere: boolean}[];
30823085

30833086
leftGutterSvgInitialized: boolean = false;
30843087
arrowOffsetY: number;
@@ -3169,12 +3172,6 @@ class CodeDisplay {
31693172

31703173
renderPyCodeOutput() {
31713174
var myCodOutput = this; // capture
3172-
3173-
// an array of objects with the following fields:
3174-
// 'text' - the text of the line of code
3175-
// 'lineNumber' - one-indexed (always the array index + 1)
3176-
// 'executionPoints' - an ordered array of zero-indexed execution points where this line was executed
3177-
// 'breakpointHere' - has a breakpoint been set here?
31783175
this.codeOutputLines = [];
31793176

31803177
var lines = this.codToDisplay.split('\n');
@@ -3183,12 +3180,12 @@ class CodeDisplay {
31833180
// instead of here in CodeDisplay?
31843181
for (var i = 0; i < lines.length; i++) {
31853182
var cod = lines[i];
3186-
3187-
var n: any = {};
3188-
n.text = cod;
3189-
n.lineNumber = i + 1;
3190-
n.executionPoints = [];
3191-
n.breakpointHere = false;
3183+
var n: {text: string, lineNumber: number, executionPoints: number[], breakpointHere: boolean} = {
3184+
text: cod,
3185+
lineNumber: i + 1,
3186+
executionPoints: [],
3187+
breakpointHere: false,
3188+
};
31923189

31933190
$.each(this.owner.curTrace, function(j, elt) {
31943191
if (elt.line == n.lineNumber) {

0 commit comments

Comments
 (0)