-void wxExpr::WriteLispExpr(FILE* stream)
-{
- switch (type)
- {
- case wxExprInteger:
- {
- fprintf( stream, "%ld", value.integer );
- break;
- }
- case wxExprReal:
- {
- fprintf( stream, "%.6g", value.real );
- break;
- }
- case wxExprString:
- {
- fprintf( stream, "\"" );
- const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.string);
- fprintf( stream, (const char*) val );
- fprintf( stream, "\"" );
- break;
- }
- case wxExprWord:
- {
- const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.word);
- fprintf( stream, (const char*) val );
- break;
- }
- case wxExprList:
- {
- wxExpr *expr = value.first;
-
- fprintf( stream, "(" );
- while (expr)
- {
- expr->WriteLispExpr(stream);
- expr = expr->next;
- if (expr)
- fprintf( stream, " " );
- }
-
- fprintf( stream, ")" );
- break;
- }
- case wxExprNull: break;
- }
-}
-