A loop statement

Introduced properties

private var _break_mark: nullable EscapeMark

nitc :: ALoopExpr :: _break_mark

The break escape mark associated with the 'loop'
private var _continue_mark: nullable EscapeMark

nitc :: ALoopExpr :: _continue_mark

The continue escape mark associated with the 'loop'
private var _n_block: nullable AExpr

nitc :: ALoopExpr :: _n_block

The body of the loop
private var _n_kwloop: TKwloop

nitc :: ALoopExpr :: _n_kwloop

The loop keyword
fun break_mark: nullable EscapeMark

nitc :: ALoopExpr :: break_mark

The break escape mark associated with the 'loop'
protected fun break_mark=(break_mark: nullable EscapeMark)

nitc :: ALoopExpr :: break_mark=

The break escape mark associated with the 'loop'
fun continue_mark: nullable EscapeMark

nitc :: ALoopExpr :: continue_mark

The continue escape mark associated with the 'loop'
protected fun continue_mark=(continue_mark: nullable EscapeMark)

nitc :: ALoopExpr :: continue_mark=

The continue escape mark associated with the 'loop'
init init_aloopexpr(n_kwloop: nullable TKwloop, n_block: nullable AExpr, n_label: nullable ALabel)

nitc :: ALoopExpr :: init_aloopexpr

private init make

nitc :: ALoopExpr :: make

fun n_block: nullable AExpr

nitc :: ALoopExpr :: n_block

The body of the loop
fun n_block=(n_block: nullable AExpr)

nitc :: ALoopExpr :: n_block=

The body of the loop
fun n_kwloop: TKwloop

nitc :: ALoopExpr :: n_kwloop

The loop keyword
fun n_kwloop=(n_kwloop: TKwloop)

nitc :: ALoopExpr :: n_kwloop=

The loop keyword

Redefined properties

redef type SELF: ALoopExpr

nitc $ ALoopExpr :: SELF

Type of this instance, automatically specialized in every class
redef fun accept_forward_analysis(v: ForwardAnalysis)

nitc :: saf_base $ ALoopExpr :: accept_forward_analysis

Apply the forward analysis v to self.
redef fun accept_pretty_printer(v: PrettyPrinterVisitor)

nitc :: pretty $ ALoopExpr :: accept_pretty_printer

Start visit of self using a PrettyPrinterVisitor
redef fun add(expr: AExpr)

nitc :: astbuilder $ ALoopExpr :: add

Add expr at the end of the block
redef fun generate_basic_blocks(ssa: SSA, old_block: BasicBlock): BasicBlock

nitc :: ssa $ ALoopExpr :: generate_basic_blocks

Generate recursively basic block for this expression
redef fun loop_block: nullable ANode

nitc :: saf_base $ ALoopExpr :: loop_block

The block contained by this loop.
redef fun loop_block: nullable ANode

nitc :: pretty $ ALoopExpr :: loop_block

redef fun loop_label: nullable ANode

nitc :: pretty $ ALoopExpr :: loop_label

redef fun n_block=(node: nullable AExpr)

nitc :: parser_prod $ ALoopExpr :: n_block=

The body of the loop
redef fun n_kwloop=(node: TKwloop)

nitc :: parser_prod $ ALoopExpr :: n_kwloop=

The loop keyword
redef fun n_label=(node: nullable ALabel)

nitc :: parser_prod $ ALoopExpr :: n_label=

The associated label declatation
redef fun numbering(v: VirtualMachine, position: Int): Int

nitc :: variables_numbering $ ALoopExpr :: numbering

Give a position to each variable declared in the node.
redef fun replace_child(old_child: ANode, new_child: nullable ANode)

nitc :: parser_prod $ ALoopExpr :: replace_child

Replace a child with an other node in the AST
redef fun stmt(v: NaiveInterpreter)

nitc :: naive_interpreter $ ALoopExpr :: stmt

Evaluate the node as a statement.
redef fun stmt(v: AbstractCompilerVisitor)

nitc :: abstract_compiler $ ALoopExpr :: stmt

Try to compile self as a statement
redef fun stmt(v: JavaCompilerVisitor)

nitc :: java_compiler $ ALoopExpr :: stmt

Try to compile self as a statement
redef fun visit_all(v: Visitor)

nitc :: parser_prod $ ALoopExpr :: visit_all

Visit all nodes in order.

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _after_flow_context: nullable FlowContext

nitc :: AExpr :: _after_flow_context

The flow after the full evaluation of the expression/statement
private var _break_mark: nullable EscapeMark

nitc :: ALoopExpr :: _break_mark

The break escape mark associated with the 'loop'
private var _comprehension: nullable AArrayExpr

nitc :: AExpr :: _comprehension

Is non-null if self is a leaf of a comprehension array construction.
private var _continue_mark: nullable EscapeMark

nitc :: ALoopExpr :: _continue_mark

The continue escape mark associated with the 'loop'
private var _first_location: nullable Location

nitc :: Prod :: _first_location

Location on the first token after the start of a production
private var _first_token: nullable Token

nitc :: Prod :: _first_token

The first token of the production in the AST
private var _force_block: Bool

nitc :: ANode :: _force_block

Force self to be rendered as a block.
private var _force_inline: Bool

nitc :: ANode :: _force_inline

Force self to be rendered as a line.
private var _implicit_cast_to: nullable MType

nitc :: AExpr :: _implicit_cast_to

If required, the following implicit cast .as(XXX)
private var _is_broken: Bool

nitc :: ANode :: _is_broken

The indication that the node did not pass some semantic verifications.
private var _is_typed: Bool

nitc :: AExpr :: _is_typed

Is the statement correctly typed?
private var _last_token: nullable Token

nitc :: Prod :: _last_token

The last token of the production in the AST
private var _location: Location

nitc :: ANode :: _location

Location is set during AST building. Once built, location can not be null.
private var _mtype: nullable MType

nitc :: AExpr :: _mtype

The static type of the expression.
private var _n_annotations: nullable AAnnotations

nitc :: Prod :: _n_annotations

All the annotations attached directly to the node
private var _n_block: nullable AExpr

nitc :: ALoopExpr :: _n_block

The body of the loop
private var _n_kwloop: TKwloop

nitc :: ALoopExpr :: _n_kwloop

The loop keyword
private var _n_label: nullable ALabel

nitc :: ALabelable :: _n_label

The associated label declatation
private var _parent: nullable ANode

nitc :: ANode :: _parent

Parent of the node in the AST
private var _vararg_decl: Int

nitc :: AExpr :: _vararg_decl

It indicates the number of arguments collected as a vararg.
private var _variable_cache: nullable Variable

nitc :: AExpr :: _variable_cache

private fun accept_explain_assert(v: ExplainAssertVisitor)

nitc :: AExpr :: accept_explain_assert

Fill v to explain this node if the parent assert fails
fun accept_forward_analysis(v: ForwardAnalysis)

nitc :: ANode :: accept_forward_analysis

Apply the forward analysis v to self.
private abstract fun accept_pretty_printer(v: PrettyPrinterVisitor)

nitc :: ANode :: accept_pretty_printer

Start visit of self using a PrettyPrinterVisitor
fun accept_reaching_defs(v: ReachingDefsAnalysis)

nitc :: ANode :: accept_reaching_defs

Apply a ReachingDefsAnalysis to self.
fun add(expr: AExpr)

nitc :: AExpr :: add

Add expr at the end of the block
fun after_flow_context: nullable FlowContext

nitc :: AExpr :: after_flow_context

The flow after the full evaluation of the expression/statement
protected fun after_flow_context=(after_flow_context: nullable FlowContext)

nitc :: AExpr :: after_flow_context=

The flow after the full evaluation of the expression/statement
fun allocate_mtype(v: RapidTypeVisitor)

nitc :: AExpr :: allocate_mtype

Make the mtype of the expression live
fun as_id: nullable String

nitc :: AExpr :: as_id

Get self as a single identifier.
fun as_int: nullable Int

nitc :: AExpr :: as_int

Get self as an Int.
fun as_string: nullable String

nitc :: AExpr :: as_string

Get self as a String.
private fun bad_expr_message(child: AExpr): nullable String

nitc :: ANode :: bad_expr_message

An additional information message to explain the role of a child expression.
fun break_mark: nullable EscapeMark

nitc :: ALoopExpr :: break_mark

The break escape mark associated with the 'loop'
protected fun break_mark=(break_mark: nullable EscapeMark)

nitc :: ALoopExpr :: break_mark=

The break escape mark associated with the 'loop'
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
abstract fun clone: SELF

core :: Cloneable :: clone

Duplicate self
fun collect_annotations_by_name(name: String): Array[AAnnotation]

nitc :: ANode :: collect_annotations_by_name

Do a deep search and return an array of node that are annotated
private fun collect_comments: Array[TComment]

nitc :: Prod :: collect_comments

Collect all TComment contained in the production
private abstract fun collect_length: Int

nitc :: ANode :: collect_length

Collect the length (in Char) of the node.
fun collect_text: String

nitc :: Prod :: collect_text

Join the text of all visited tokens
fun collect_tokens_by_text(text: String): Array[Token]

nitc :: ANode :: collect_tokens_by_text

Do a deep search and return an array of tokens that match a given text
fun common_parent(other: ANode): nullable ANode

nitc :: ANode :: common_parent

The most specific common parent between self and other
fun comprehension: nullable AArrayExpr

nitc :: AExpr :: comprehension

Is non-null if self is a leaf of a comprehension array construction.
protected fun comprehension=(comprehension: nullable AArrayExpr)

nitc :: AExpr :: comprehension=

Is non-null if self is a leaf of a comprehension array construction.
fun continue_mark: nullable EscapeMark

nitc :: ALoopExpr :: continue_mark

The continue escape mark associated with the 'loop'
protected fun continue_mark=(continue_mark: nullable EscapeMark)

nitc :: ALoopExpr :: continue_mark=

The continue escape mark associated with the 'loop'
fun debug(message: String)

nitc :: ANode :: debug

Display a message for the colored location of the node
protected fun decorate_tag(v: HtmlightVisitor, res: HTMLTag, token: Token): nullable HInfoBox

nitc :: ANode :: decorate_tag

Add aditionnal information on a child-token and return an additionnal HInfoBox on it
fun depth: Int

nitc :: ANode :: depth

Number of nodes between self and the root of the AST
fun detach

nitc :: ANode :: detach

Detach a node from its parent
fun detach_with_placeholder: AExpr

nitc :: AExpr :: detach_with_placeholder

The detach method completely remove the node in the parent.
private fun do_cloneable(v: CloneVisitor)

nitc :: ANode :: do_cloneable

fun do_typing(modelbuilder: ModelBuilder, visited_mpropdef: MPropDef)

nitc :: AExpr :: do_typing

Type the expression as if located in visited_mpropdef
fun dump_info(v: ASTDump): String

nitc :: ANode :: dump_info

Information to display on a node
fun dump_tree(display_structural: nullable Bool, display_line: nullable Bool)

nitc :: ANode :: dump_tree

Write the subtree on stdout.
private fun expr(v: JavaCompilerVisitor): nullable RuntimeVariable

nitc :: AExpr :: expr

Try to compile self as an expression
private fun expr(v: AbstractCompilerVisitor): nullable RuntimeVariable

nitc :: AExpr :: expr

Try to compile self as an expression
protected fun expr(v: NaiveInterpreter): nullable Instance

nitc :: AExpr :: expr

Evaluate the node as a possible expression.
fun fatal(v: NaiveInterpreter, message: String)

nitc :: ANode :: fatal

Aborts the program with a message
fun first_location: nullable Location

nitc :: Prod :: first_location

Location on the first token after the start of a production
protected fun first_location=(first_location: nullable Location)

nitc :: Prod :: first_location=

Location on the first token after the start of a production
fun first_token: nullable Token

nitc :: Prod :: first_token

The first token of the production in the AST
protected fun first_token=(first_token: nullable Token)

nitc :: Prod :: first_token=

The first token of the production in the AST
private fun force_block: Bool

nitc :: ANode :: force_block

Force self to be rendered as a block.
private fun force_block=(force_block: Bool)

nitc :: ANode :: force_block=

Force self to be rendered as a block.
private fun force_inline: Bool

nitc :: ANode :: force_inline

Force self to be rendered as a line.
private fun force_inline=(force_inline: Bool)

nitc :: ANode :: force_inline=

Force self to be rendered as a line.
fun generate_basic_blocks(ssa: SSA, old_block: BasicBlock): BasicBlock

nitc :: AExpr :: generate_basic_blocks

Generate recursively basic block for this expression
fun get_annotations(name: String): Array[AAnnotation]

nitc :: Prod :: get_annotations

Return all its annotations of a given name in the order of their declaration
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun get_single_annotation(name: String, modelbuilder: ModelBuilder): nullable AAnnotation

nitc :: Prod :: get_single_annotation

Try to get its single annotation with a given name
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun hot_location: Location

nitc :: ANode :: hot_location

The location of the important part of the node (identifier or whatever)
fun implicit_cast_to: nullable MType

nitc :: AExpr :: implicit_cast_to

If required, the following implicit cast .as(XXX)
protected fun implicit_cast_to=(implicit_cast_to: nullable MType)

nitc :: AExpr :: implicit_cast_to=

If required, the following implicit cast .as(XXX)
fun infobox(v: HtmlightVisitor): nullable HInfoBox

nitc :: ANode :: infobox

Return a optional infobox
init init

core :: Object :: init

init init_aloopexpr(n_kwloop: nullable TKwloop, n_block: nullable AExpr, n_label: nullable ALabel)

nitc :: ALoopExpr :: init_aloopexpr

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
fun is_block: Bool

nitc :: Prod :: is_block

Is the production contained in full block of line?
fun is_broken: Bool

nitc :: ANode :: is_broken

The indication that the node did not pass some semantic verifications.
fun is_broken=(is_broken: Bool)

nitc :: ANode :: is_broken=

The indication that the node did not pass some semantic verifications.
private fun is_inlinable: Bool

nitc :: ANode :: is_inlinable

Is self printable in one line?
private fun is_noserialize: Bool

nitc :: ANode :: is_noserialize

Is this node annotated to not be made serializable?
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
private fun is_serialize: Bool

nitc :: ANode :: is_serialize

Is this node annotated to be made serializable?
fun is_span: Bool

nitc :: Prod :: is_span

Is the production a part of a single line (without being a block)
fun is_structural: Bool

nitc :: ANode :: is_structural

Is self a token or a pure-structural production like AQId?
fun is_typed: Bool

nitc :: AExpr :: is_typed

Is the statement correctly typed?
protected fun is_typed=(is_typed: Bool)

nitc :: AExpr :: is_typed=

Is the statement correctly typed?
fun its_variable: nullable Variable

nitc :: AExpr :: its_variable

Return the variable read (if any)
fun last_token: nullable Token

nitc :: Prod :: last_token

The last token of the production in the AST
protected fun last_token=(last_token: nullable Token)

nitc :: Prod :: last_token=

The last token of the production in the AST
fun location: Location

nitc :: ANode :: location

Location is set during AST building. Once built, location can not be null.
fun location=(location: Location)

nitc :: ANode :: location=

Location is set during AST building. Once built, location can not be null.
private abstract fun loop_block: nullable ANode

nitc :: ALoopHelper :: loop_block

abstract fun loop_block: nullable ANode

nitc :: ADoBlockHelper :: loop_block

The block contained by this loop.
fun loop_fix_point(v: StaticAnalysis, node: ANode)

nitc :: ADoBlockHelper :: loop_fix_point

Lookup fix point for this loop.
private abstract fun loop_label: nullable ANode

nitc :: ALoopHelper :: loop_label

private init make

nitc :: ALoopExpr :: make

protected fun make_tag(v: HtmlightVisitor): nullable HTMLTag

nitc :: ANode :: make_tag

Optionally creates a tag that encapsulate the AST element on HTML rendering
fun make_var_read: AVarExpr

nitc :: AExpr :: make_var_read

Return a new variable read that contains the value of the expression
fun mtype: nullable MType

nitc :: AExpr :: mtype

The static type of the expression.
protected fun mtype=(mtype: nullable MType)

nitc :: AExpr :: mtype=

The static type of the expression.
private fun must_be_block: Bool

nitc :: ANode :: must_be_block

Does self have to be rendered as a block?
private fun must_be_inline: Bool

nitc :: ANode :: must_be_inline

Does self have be rendered as a line?
fun n_annotations: nullable AAnnotations

nitc :: Prod :: n_annotations

All the annotations attached directly to the node
fun n_annotations=(n_annotations: nullable AAnnotations)

nitc :: Prod :: n_annotations=

All the annotations attached directly to the node
fun n_block: nullable AExpr

nitc :: ALoopExpr :: n_block

The body of the loop
fun n_block=(n_block: nullable AExpr)

nitc :: ALoopExpr :: n_block=

The body of the loop
fun n_kwloop: TKwloop

nitc :: ALoopExpr :: n_kwloop

The loop keyword
fun n_kwloop=(n_kwloop: TKwloop)

nitc :: ALoopExpr :: n_kwloop=

The loop keyword
fun n_label: nullable ALabel

nitc :: ALabelable :: n_label

The associated label declatation
fun n_label=(n_label: nullable ALabel)

nitc :: ALabelable :: n_label=

The associated label declatation
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
fun numbering(v: VirtualMachine, position: Int): Int

nitc :: AExpr :: numbering

Give a position to each variable declared in the node.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun parent: nullable ANode

nitc :: ANode :: parent

Parent of the node in the AST
protected fun parent=(parent: nullable ANode)

nitc :: ANode :: parent=

Parent of the node in the AST
fun parentize_tokens

nitc :: ANode :: parentize_tokens

Visit the AST and computes advanced AST attributes on Tokens and Prod
private abstract fun replace_child(old_child: ANode, new_child: nullable ANode)

nitc :: ANode :: replace_child

Replace a child with an other node in the AST
fun replace_clone

nitc :: ANode :: replace_clone

Create a new clone of self
fun replace_with(node: ANode)

nitc :: ANode :: replace_with

Replace itself with an other node in the AST
fun root: ANode

nitc :: ANode :: root

The topmost ancestor of the element
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
private fun start_token: nullable Token

nitc :: Prod :: start_token

The token where the production really start (skipping ADoc).
private fun stmt(v: AbstractCompilerVisitor)

nitc :: AExpr :: stmt

Try to compile self as a statement
private fun stmt(v: JavaCompilerVisitor)

nitc :: AExpr :: stmt

Try to compile self as a statement
protected fun stmt(v: NaiveInterpreter)

nitc :: AExpr :: stmt

Evaluate the node as a statement.
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun to_xml: HTMLTag

nitc :: Prod :: to_xml

A XML representation of the AST
fun validate

nitc :: ANode :: validate

Recursively validate a AST node.
fun vararg_decl: Int

nitc :: AExpr :: vararg_decl

It indicates the number of arguments collected as a vararg.
protected fun vararg_decl=(vararg_decl: Int)

nitc :: AExpr :: vararg_decl=

It indicates the number of arguments collected as a vararg.
private fun variable_cache: nullable Variable

nitc :: AExpr :: variable_cache

private fun variable_cache=(variable_cache: nullable Variable)

nitc :: AExpr :: variable_cache=

abstract fun visit_all(v: Visitor)

nitc :: ANode :: visit_all

Visit all nodes in order.
private fun warn_parentheses(v: SimpleMiscVisitor)

nitc :: AExpr :: warn_parentheses

Warn in case of superfluous parentheses
private abstract fun was_inline: Bool

nitc :: ANode :: was_inline

Does self was written in one line before transformation?
package_diagram nitc::ALoopExpr ALoopExpr nitc::ALabelable ALabelable nitc::ALoopExpr->nitc::ALabelable nitc::pretty::ALoopHelper ALoopHelper nitc::ALoopExpr->nitc::pretty::ALoopHelper nitc::ADoBlockHelper ADoBlockHelper nitc::ALoopExpr->nitc::ADoBlockHelper nitc::Prod Prod nitc::ALabelable->nitc::Prod nitc::AExpr AExpr nitc::pretty::ALoopHelper->nitc::AExpr core::Object Object nitc::ADoBlockHelper->core::Object ...nitc::Prod ... ...nitc::Prod->nitc::Prod ...nitc::AExpr ... ...nitc::AExpr->nitc::AExpr ...core::Object ... ...core::Object->core::Object

Ancestors

abstract class AExpr

nitc :: AExpr

Expression and statements
abstract class ANode

nitc :: ANode

Root of the AST class-hierarchy
interface Cloneable

core :: Cloneable

Something that can be cloned
interface Object

core :: Object

The root of the class hierarchy.
abstract class Prod

nitc :: Prod

Ancestor of all productions

Parents

interface ADoBlockHelper

nitc :: ADoBlockHelper

Represent all kind of do .. end blocks.
abstract class ALabelable

nitc :: ALabelable

Something that has a label.
private class ALoopHelper

nitc :: ALoopHelper

Used to factorize work on loops.

Class definitions

nitc $ ALoopExpr
# A `loop` statement
class ALoopExpr
	super AExpr
	super ALabelable

	# The `loop` keyword
	var n_kwloop: TKwloop is writable, noinit

	# The body of the loop
	var n_block: nullable AExpr = null is writable
end
src/parser/parser_nodes.nit:2021,1--2031,3

nitc :: parser_prod $ ALoopExpr
redef class ALoopExpr
	init init_aloopexpr (
		n_kwloop: nullable TKwloop,
		n_block: nullable AExpr,
		n_label: nullable ALabel
	)
	do
		_n_kwloop = n_kwloop.as(not null)
		n_kwloop.parent = self
		_n_block = n_block
		if n_block != null then n_block.parent = self
		_n_label = n_label
		if n_label != null then n_label.parent = self
	end

	redef fun replace_child(old_child: ANode, new_child: nullable ANode)
	do
		if _n_kwloop == old_child then
			n_kwloop = new_child.as(TKwloop)
			return
		end
		if _n_block == old_child then
			n_block = new_child.as(nullable AExpr)
			return
		end
		if _n_label == old_child then
			n_label = new_child.as(nullable ALabel)
			return
		end
	end

	redef fun n_kwloop=(node)
	do
		_n_kwloop = node
		node.parent = self
	end
	redef fun n_block=(node)
	do
		_n_block = node
		if node != null then node.parent = self
	end
	redef fun n_label=(node)
	do
		_n_label = node
		if node != null then node.parent = self
	end


	redef fun visit_all(v: Visitor)
	do
		v.enter_visit(_n_kwloop)
		v.enter_visit(_n_block)
		v.enter_visit(_n_label)
	end
end
src/parser/parser_prod.nit:3287,1--3341,3

nitc :: simple_misc_analysis $ ALoopExpr
redef class ALoopExpr
	redef fun after_simple_misc(v)
	do
		v.check_do_expr(n_block)
	end
end
src/frontend/simple_misc_analysis.nit:165,1--170,3

nitc :: scope $ ALoopExpr
redef class ALoopExpr
	# The break escape mark associated with the 'loop'
	var break_mark: nullable EscapeMark

	# The continue escape mark associated with the 'loop'
	var continue_mark: nullable EscapeMark

	redef fun accept_scope_visitor(v)
	do
		var escapemark = v.make_escape_mark(n_label, true)
		self.break_mark = escapemark
		self.continue_mark = escapemark.continue_mark
		v.enter_visit_block(n_block, escapemark)
	end
end
src/semantize/scope.nit:394,1--408,3

nitc :: saf_base $ ALoopExpr
redef class ALoopExpr
	super ADoBlockHelper

	redef fun loop_block do return self.n_block
	redef fun accept_forward_analysis(v) do accept_loop_forward_analysis(v)
end
src/saf/saf_base.nit:207,1--212,3

nitc :: flow $ ALoopExpr
redef class ALoopExpr
	redef fun accept_flow_visitor(v)
	do
		var before_loop = v.make_sub_flow

		v.enter_visit(self.n_block)

		var after_block = v.current_flow_context

		before_loop.add_loop(after_block)
		v.merge_continues_to(before_loop, self.continue_mark)

		v.make_unreachable_flow
		v.merge_breaks(self.break_mark)
	end
end
src/semantize/flow.nit:420,1--435,3

nitc :: pretty $ ALoopExpr
redef class ALoopExpr
	super ALoopHelper

	redef fun loop_block do return n_block
	redef fun loop_label do return n_label

	redef fun accept_pretty_printer(v) do
		var can_inline = v.can_inline(self)
		v.visit n_kwloop
		if can_inline then visit_loop_inline v else visit_loop_block v
	end
end
src/pretty.nit:1468,1--1479,3

nitc :: typing $ ALoopExpr
redef class ALoopExpr
	redef fun accept_typing(v)
	do
		v.has_loop = true
		v.visit_stmt(n_block)
		self.is_typed = true
	end
end
src/semantize/typing.nit:1317,1--1324,3

nitc :: astbuilder $ ALoopExpr
redef class ALoopExpr
	private init make
	do
		_n_kwloop = new TKwloop
		self.is_typed = true
		n_block = new ABlockExpr
		n_block.is_typed = true
	end

	redef fun add(expr)
	do
		n_block.add expr
	end
end
src/astbuilder.nit:433,1--446,3

nitc :: naive_interpreter $ ALoopExpr
redef class ALoopExpr
	redef fun stmt(v)
	do
		loop
			v.stmt(self.n_block)
			if v.is_escape(self.break_mark) then return
			v.is_escape(self.continue_mark) # Clear the break
			if v.is_escaping then return
		end
	end
end
src/interpreter/naive_interpreter.nit:1869,1--1879,3

nitc :: abstract_compiler $ ALoopExpr
redef class ALoopExpr
	redef fun stmt(v)
	do
		v.add("for(;;) \{")
		v.stmt(self.n_block)
		v.add_escape_label(continue_mark)
		v.add("\}")
		v.add_escape_label(break_mark)
	end
end
src/compiler/abstract_compiler.nit:3917,1--3926,3

nitc :: variables_numbering $ ALoopExpr
redef class ALoopExpr
	redef fun numbering(v, position)
	do
		return v.numbering(self.n_block, position)
	end
end
src/vm/variables_numbering.nit:247,1--252,3

nitc :: ssa $ ALoopExpr
redef class ALoopExpr
	redef fun generate_basic_blocks(ssa, old_block)
	do
		old_block.last = self

		# The beginning of the block is the first instruction
		var block = new BasicBlock
		block.first = self.n_block.as(not null)
		block.last = self.n_block.as(not null)

		old_block.link(block)
		self.n_block.generate_basic_blocks(ssa, block)

		return block
	end
end
src/ssa.nit:1096,1--1111,3

nitc :: java_compiler $ ALoopExpr
redef class ALoopExpr
	redef fun stmt(v)
	do
		v.add_escape_label(break_mark)
		v.add_escape_label(continue_mark)
		v.add("for(;;) \{")
		v.stmt(self.n_block)
		v.add("\}")
	end
end
src/compiler/java_compiler.nit:2110,1--2119,3