Skip to content

Commit 86e4f4e

Browse files
committed
Adding comments about TCO
1 parent 723e0a8 commit 86e4f4e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/BabelPlugin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,9 @@ function Plugin(babel) {
406406
));
407407
}
408408
}
409+
// Add Tail Call Optimization marker boolean to the HzToken
409410
if (isTailCall) {
411+
// Check for TCO validity if the call is within a TryStatement
410412
if (tryStack.length > 0) {
411413
const tryData = tryStack[tryStack.length - 1];
412414
if (path.getFunctionParent().node === tryData.functionParent) {

0 commit comments

Comments
 (0)