+ # Return the block associed to a label
+ # Output an error end return null if the label is not known
+ fun get_by_label(nl: ALabel): nullable EscapableBlock
+ do
+ var i = _stack.length - 1
+ var block: nullable EscapableBlock = null
+ var lab = nl.n_id.to_symbol
+ while i >= 0 do
+ var b = _stack[i]
+ if b.lab == lab then return b
+ i -= 1
+ end
+ visitor.error(nl, "Syntax error: invalid label {lab}.")
+ return null
+ end
+