Browse Source

add display for `callStack`

Stephan Fuchs 4 months ago
parent
commit
f214642abc
1 changed files with 13 additions and 0 deletions
  1. 13 0
      sugarcube/src/PassageFooter.tw

+ 13 - 0
sugarcube/src/PassageFooter.tw

@@ -92,4 +92,17 @@
 
 <<debug>>
 	Here: $location.passage ($location.region)
+	<div id="callStack"></div>
+	<<done>>
+		<<replace '#callStack'>>
+			<h2>Callstack</h2>
+			<table>
+				<<for _i, _call range $callStack>>
+					<tr>
+						<td>_i:</td><td><<='&nbsp;'.repeat(_call[1]*10)>><<=_call[0].replace('_','&#95;')>></td>
+					</tr>
+				<</for>>
+			</table>
+		<</replace>>
+	<</done>>
 <</debug>>