GCC Middle and Back End API Reference
s_expr_writer Class Reference
Inheritance diagram for s_expr_writer:

Public Member Functions

 s_expr_writer ()
void write_new_line ()
void write_any_indent (int leading_spaces)
void begin_s_expr (const char *tag)
void end_s_expr ()

Private Attributes

int indent_amount_
int had_recent_newline_

Detailed Description

A class for writing out s-expressions, keeping track of newlines and
   nested indentation.   

Constructor & Destructor Documentation

s_expr_writer::s_expr_writer ( )
class s_expr_writer's trivial constructor.   

Member Function Documentation

void s_expr_writer::write_any_indent ( int  leading_spaces)
If we've just had a newline, write the indentation amount, potentially
   omitting some spaces.

   LEADING_SPACES exists to support code that writes strings with leading
   spaces (e.g " foo") which might occur within a line, or could be the first
   thing on a line.  By passing leading_spaces == 1, when such a string is the
   first thing on a line, write_any_indent () swallows the successive
   leading spaces into the indentation so that the "foo" begins at the expected
   column.   

References had_recent_newline_, indent_amount_, and state_file.

Referenced by begin_s_expr(), end_s_expr(), state_writer::write_state_a_string(), state_writer::write_state_array_type(), state_writer::write_state_common_type_content(), state_writer::write_state_gc_used(), state_writer::write_state_lang_bitmap(), state_writer::write_state_nested_option(), state_writer::write_state_option(), state_writer::write_state_options(), state_writer::write_state_pair(), state_writer::write_state_param_struct_type(), state_writer::write_state_pointer_type(), state_writer::write_state_scalar_type(), state_writer::write_state_string_option(), state_writer::write_state_string_type(), state_writer::write_state_struct_union_type(), state_writer::write_state_type(), state_writer::write_state_type_option(), state_writer::write_state_undefined_type(), and state_writer::write_state_user_struct_type().

void s_expr_writer::write_new_line ( void  )
Write a newline to the output file, merging adjacent newlines.   

References had_recent_newline_, and state_file.

Referenced by begin_s_expr(), end_s_expr(), and state_writer::write_state_structures().


Field Documentation

int s_expr_writer::had_recent_newline_
private

Referenced by write_any_indent(), and write_new_line().

int s_expr_writer::indent_amount_
private

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