The script above is nonsense, but shows a couple of the triggers for displaying the icon. Line 2 has the most common one I’ve come across – having code followed by a single line comment containing the » character.
You’ll see that the lines that don’t execute don’t get that flag.
The ones that do execute do, and the more often they execute the bigger they get. They also change color.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
set y to 1
set z to 0
repeat with x from 1 to 10
if x > 11 then
set y to 10
else
if x = 5 then
repeat with y from 1 to 50
set z to z + 1
end repeat
end if
end if
end repeat