Changeset 2320


Ignore:
Timestamp:
Feb 2, 2007, 9:37:31 PM (14 years ago)
Author:
yura
Message:
  • Library functions: Error.Not-Available and Java.Null (generated versions for C++).
Location:
to-imperative/trunk/c++
Files:
5 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/c++/include/refal/Error.hh

    r2187 r2320  
    1 #ifndef __refal__Error_hh__
    2 #define __refal__Error_hh__
     1#ifndef __refal_s_Error_hh__
     2#define __refal_s_Error_hh__
    33
    44#include <rf_core.hh>
     
    1414RF_DECL (Lib_m_Error);
    1515
     16RF_DECL (Not_m_Available);
     17
    1618}
    1719
    1820}
    1921
    20 #endif // __refal__Error_hh__
     22#endif // __refal_s_Error_hh__
  • to-imperative/trunk/c++/lib/Error/Error.cc

    r2187 r2320  
    11#include <rf_core.hh>
    22#include <refal/Class.hh>
    3 #include "Error.hh"
     3#include <refal/List.hh>
     4#include <refal/Convert.hh>
    45
    56namespace refal
     
    1112{
    1213
     14RF_DECL (Lib_m_Error);
     15
     16RF_DECL (Not_m_Available);
     17
     18static Expr _c_0;
     19
     20static Expr _c_1;
     21
    1322RF_FUNC (Lib_m_Error, (RF_ARG _ve_fname, _ve_rror;;), RF_VOID)
    14   {
    15     RF_ERROR ((_ve_fname + _ve_rror));
    16     goto _block1;
    17   }
    18 _block1: {}
     23  RF_ERROR ((_ve_fname + _ve_rror));
     24RF_END
     25
     26RF_FUNC (Not_m_Available, (RF_ARG _ve_name;;), RF_VOID)
     27  Expr _ge_auxcall1;
     28  RF_CALL (List::Intersperse, (_c_0, _ve_name), _ge_auxcall1);
     29  Expr _gs_auxcall2;
     30  RF_CALL (Convert::To_m_Word, _ge_auxcall1, _gs_auxcall2);
     31  RF_ERROR ((_gs_auxcall2 + _c_1));
    1932RF_END
    2033
    2134}
    2235
     36namespace Error
     37{
     38
     39static void init_ ()
     40{
     41  _c_0 = Char::create_expr (L".");
     42  _c_1 = Expr::create<Word>("Not available");
    2343}
     44
     45static AtStart init_registrator_ (&init_);
     46
     47}
     48
     49}
  • to-imperative/trunk/c++/lib/Makefile

    r2187 r2320  
    1616  CppMangle \
    1717  JavaMangle \
     18  Java \
    1819  Debug \
    1920  Dir \
  • to-imperative/trunk/c++/lib/dir_list

    r2282 r2320  
    1515File
    1616JavaMangle
     17Java
    1718Lexer
    1819List
Note: See TracChangeset for help on using the changeset viewer.