summaryrefslogtreecommitdiff
path: root/libfrontend-elements/examples/diagnostic/driver.cxx
blob: edb8a18ff1d1225ff64dca185bf57bef06f86617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// file      : examples/diagnostic/driver.cxx
// author    : Boris Kolpackov <boris@kolpackov.net>
// copyright : Copyright (c) 2005-2010 Boris Kolpackov
// license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

#include <cult/types.hxx>

#include <frontend-elements/diagnostic.hxx>

using namespace Cult::Types;
using namespace FrontendElements::Diagnostic;

// Some ideas: The first letter (`e') in `epsyntx' is for error.
// The second letter identifies part of the system (p - parser).
//
//
Error epsyntx ("EPSYNTX");

Warning wscoer ("WS001");

Stream dout;

Int
main ()
{
  dout << epsyntx << "foo.cxx" << 1UL << 12UL << "syntax error";

  dout << wscoer << "foo.cxx" << 2UL << "type coercion";
}