MysoreScript
Protected Member Functions | List of all members
AST::WhileLoop Class Reference

A while loop. More...

#include <ast.hh>

Inheritance diagram for AST::WhileLoop:
Inheritance graph
[legend]
Collaboration diagram for AST::WhileLoop:
Collaboration graph
[legend]

Protected Member Functions

void interpret (Interpreter::Context &c) override
 Interpret the body as long as the condition remains true. More...
 
void collectVarUses (std::unordered_set< std::string > &decls, std::unordered_set< std::string > &uses) override
 Collect the variables used and declared in the loop. More...
 
void compile (Compiler::Context &c) override
 Compile the loop. More...
 

Additional Inherited Members

Detailed Description

A while loop.

Definition at line 780 of file ast.hh.

Member Function Documentation

§ collectVarUses()

void AST::WhileLoop::collectVarUses ( std::unordered_set< std::string > &  decls,
std::unordered_set< std::string > &  uses 
)
inlineoverrideprotectedvirtual

Collect the variables used and declared in the loop.

Implements AST::Statement.

Definition at line 799 of file ast.hh.

§ compile()

void WhileLoop::compile ( Compiler::Context c)
overrideprotectedvirtual

Compile the loop.

Reimplemented from AST::Statement.

Definition at line 554 of file compiler.cc.

Here is the call graph for this function:

§ interpret()

void WhileLoop::interpret ( Interpreter::Context c)
overrideprotectedvirtual

Interpret the body as long as the condition remains true.

Implements AST::Statement.

Definition at line 641 of file interpreter.cc.


The documentation for this class was generated from the following files: