|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
クラス テンプレート toppers::c_pp_line< Container >line指令を処理させるためのファンクタクラス [詳細]
説明template<class Container>
line指令を処理させるためのファンクタクラス
|
|
コンストラクタ
c_pp_line.hpp の 129 行で定義されています。
|
|
括弧演算子
c_pp_line.hpp の 138 行で定義されています。 参照先 toppers::basic_line_buf< CharT, Traits, Allocator >::buf_・toppers::text_line::file_・toppers::text_line::line_・toppers::basic_line_buf< CharT, Traits, Allocator >::line_. 00139 { 00140 using namespace boost::spirit; 00141 long line; 00142 std::string file; 00143 detail::c_pp_line_parser c_pp_line_p( line, file, codeset_ ); 00144 00145 if ( parse( buf.buf_.begin(), buf.buf_.end(), c_pp_line_p, space_p ).full ) // #line指令の処理 00146 { 00147 using namespace boost::filesystem; 00148 buf.line_.line_ = line; 00149 assert( file.size() >= 2 ); 00150 try 00151 { 00152 std::string file_name( file.substr( 1, file.size()-2 ) ); 00153 buf.line_.file_ = path( file_name, native ); 00154 } 00155 catch ( ... ) 00156 { 00157 // GNUのプリプロセッサはファイル名に相当する部分が<built-n>や<command line> 00158 // となる場合があるため、例外が発生する可能性あり 00159 buf.line_.file_ = path( "unknown", native ); 00160 } 00161 } 00162 else 00163 { 00164 std::string param; 00165 detail::c_pp_pragma_parser c_pp_pragma_p( param ); 00166 00167 if ( parse( buf.buf_.begin(), buf.buf_.end(), c_pp_pragma_p, space_p ).full ) // #pragma指令の処理 00168 { 00169 line_buf t( buf ); 00170 t.buf_ = param; 00171 pragmas_->push_back( t ); 00172 } 00173 else 00174 { 00175 std::string::size_type pos = buf.buf_.find_first_not_of( " \t" ); 00176 if ( pos == std::string::npos || buf.buf_[pos] != '#' ) 00177 { 00178 cont.push_back( buf ); 00179 } 00180 ++buf.line_.line_; 00181 } 00182 } 00183 buf.buf_.clear(); 00184 }
|
|
pragma指令リストの取得
c_pp_line.hpp の 189 行で定義されています。
|