mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Explain the purpose of PushScope() in loops when breakcont is active.
This commit is contained in:
parent
a041faa7a8
commit
9d0eb307e1
1 changed files with 8 additions and 0 deletions
|
@ -1652,6 +1652,14 @@ list lazy_list_set(list L, integer i, list v)
|
||||||
# we always do and open a new scope for it. At worst it will be
|
# we always do and open a new scope for it. At worst it will be
|
||||||
# empty. At least it is not reflected as braces in the code if
|
# empty. At least it is not reflected as braces in the code if
|
||||||
# braces are not used.
|
# braces are not used.
|
||||||
|
#
|
||||||
|
# This is designed to deal with cases like:
|
||||||
|
# if (a) while (b) { ... break; }
|
||||||
|
#
|
||||||
|
# This works by adding braces around the while and the newly
|
||||||
|
# added label, like this:
|
||||||
|
# if (a) { while (b) { ... jump label; } @label; }
|
||||||
|
#
|
||||||
# FIXME: This causes issues with this code that should work:
|
# FIXME: This causes issues with this code that should work:
|
||||||
# default{timer(){ jump x; while(1) @x; }}
|
# default{timer(){ jump x; while(1) @x; }}
|
||||||
self.PushScope()
|
self.PushScope()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue