aboutsummaryrefslogtreecommitdiff
path: root/bdep/new-parsers.hxx
blob: 1a6985f727d62d5698bebe4fa3ea016fffd7fa56 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// file      : bdep/new-parsers.hxx -*- C++ -*-
// license   : MIT; see accompanying LICENSE file

// CLI parsers, included into the generated source files.
//

#ifndef BDEP_NEW_PARSERS_HXX
#define BDEP_NEW_PARSERS_HXX

#include <bdep/new-types.hxx>

namespace bdep
{
  namespace cli
  {
    class scanner;

    // Note that these parsers merge parameter-specific options rather
    // than overwriting them (see new-types.hxx for details).
    //
    template <typename T>
    struct parser;

    template <>
    struct parser<cmd_new_type>
    {
      static void
      parse (cmd_new_type&, bool&, scanner&);

      static void
      merge (cmd_new_type&, const cmd_new_type&);
    };

    template <>
    struct parser<cmd_new_lang>
    {
      static void
      parse (cmd_new_lang&, bool&, scanner&);

      static void
      merge (cmd_new_lang&, const cmd_new_lang&);
    };

    template <>
    struct parser<cmd_new_vcs>
    {
      static void
      parse (cmd_new_vcs&, bool&, scanner&);

      static void
      merge (cmd_new_vcs&, const cmd_new_vcs&);
    };
  }
}

#endif // BDEP_NEW_PARSERS_HXX