WhileCmd Class Reference

Inheritance diagram for WhileCmd:

Inheritance graph
[legend]
Collaboration diagram for WhileCmd:

Collaboration graph
[legend]

List of all members.


Detailed Description

while statement as virtual machine command

Definition at line 193 of file cmd.cc.


Public Member Functions

 WhileCmd (const Token &t, PCmd whileExpr, PCmd whileStat)
virtual void toStream (std::ostream &str) const
 dump command to stream in human-readable format
virtual bool exec (FncDefinition *fnc)
 execute command in the context of calling function

Private Attributes

Token t_
PCmd whileExpr_
PCmd whileStat_

Constructor & Destructor Documentation

WhileCmd ( const Token t,
PCmd  whileExpr,
PCmd  whileStat 
) [inline]

Definition at line 195 of file cmd.cc.

References t_, and Token::text.


Member Function Documentation

virtual void toStream ( std::ostream &   )  const [inline, virtual]

dump command to stream in human-readable format

Implements ICmd.

Definition at line 200 of file cmd.cc.

References StreamDecorator::C_LIGHT_BLUE, StreamDecorator::C_LIGHT_RED, StreamDecorator::C_NO_COLOR, t_, ICmd::toStream(), whileExpr_, and whileStat_.

Here is the call graph for this function:

bool exec ( FncDefinition  )  [virtual]

execute command in the context of calling function

Implements ICmd.

Definition at line 750 of file cmd.cc.

References Value::boolVal, StreamDecorator::E_ERROR, StreamDecorator::E_NOTE, ICmd::exec(), Vm::fileName, ValueStack::pop(), t_, Value::type, Value::V_BOOL, FncDefinition::vm, Vm::vmStack, whileExpr_, and whileStat_.

Here is the call graph for this function:


Member Data Documentation

Token t_ [private]

Definition at line 213 of file cmd.cc.

Referenced by exec(), toStream(), and WhileCmd().

PCmd whileExpr_ [private]

Definition at line 214 of file cmd.cc.

Referenced by exec(), and toStream().

PCmd whileStat_ [private]

Definition at line 215 of file cmd.cc.

Referenced by exec(), and toStream().


The documentation for this class was generated from the following file:
Generated on Sat Jul 4 18:33:21 2009 for vyp08 (compiler and interpreter of VYP08 language) by  doxygen 1.5.4