Function chooseLexer

Instantiates a specialized lexer for the given input type, allocator and error handler.

The default error handler just asserts 0. If the type of the allocator is specified as template parameter, but no instance of it is passed as runtime parameter, then the static method instance of the allocator type is used. If no allocator type is specified, defaults to shared(GCAllocator).

Prototypes

auto chooseLexer(Input, std.typecons.Flag!("reuseBuffer").Flag reuseBuffer, Alloc, Handler)(
  ref Alloc alloc,
  Handler handler
);

auto chooseLexer(Input, Alloc, std.typecons.Flag!("reuseBuffer").Flag reuseBuffer, Handler)(
  Handler handler
)
if (is(typeof(Alloc.instance)) && isSomeFunction!handler);

auto chooseLexer(Input, std.typecons.Flag!("reuseBuffer").Flag reuseBuffer, Alloc)(
  ref Alloc alloc
)
if (!isSomeFunction!alloc);

auto chooseLexer(Input, Alloc, std.typecons.Flag!("reuseBuffer").Flag reuseBuffer)()
if (is(typeof(Alloc.instance)));

Authors

Lodovico Giaretta

Copyright

Copyright Lodovico Giaretta 2016 --

License

Boost License 1.0.