04.06.2012 13:46, Dmitry Olshansky написал:
enum keywords = [ "abstract", "alias", "align", //... all of them, except @ ones "__traits" ];
A nitpick: constant arrays should be defined as `immutable` instead of `enum`. `enum` means every time `keywords` used a new mutable array is dynamically allocated:
--- auto x = keywords; auto y = keywords; assert(x !is y); // passes x[0] = ""; // legal, its mutable --- -- Денис В. Шеломовский Denis V. Shelomovskij