il::case_label Class Reference

A case label. More...

#include <case_label.h>

Inheritance diagram for il::case_label:
il::control_statement il::statement il::node

List of all members.

Public Member Functions

 case_label (long low, long high, location loc)
 case_label (long num, location loc)
 case_label (location loc)
virtual string to_string () const
virtual void print ()
bool has_range () const
bool is_default_label () const
long get_low ()
long get_high ()


class boost::serialization::access

Detailed Description

A case label.

In case labels, it's legal to specify a range of values using the syntax "case 3 ... 7". Hence, in our representation, a case label has a lower and a higher value to represent this range. For a constant such as "case 'a'", the low and high values will be the same.

Member Function Documentation

long il::case_label::get_high (  ) 
High value in the range case x ... y
long il::case_label::get_low (  ) 
Low value in the range case x ... y
bool il::case_label::has_range (  )  const

Is this a range such as case 3 ... 7 or just a constant like case 3?

bool il::case_label::is_default_label (  )  const

Is this the "default" label in a switch statement?

The documentation for this class was generated from the following files:
Generated on Sun Oct 17 14:01:22 2010 by  doxygen 1.6.3