From c8c3f588677d69225bda4660d32b5b5b5fc0d019 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Mon, 13 Jan 2014 23:00:35 +0000 Subject: [PATCH] Added isProtection --- stdx/d/lexer.d | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/stdx/d/lexer.d b/stdx/d/lexer.d index 2b02ad1..3a6d9d7 100644 --- a/stdx/d/lexer.d +++ b/stdx/d/lexer.d @@ -366,6 +366,21 @@ public bool isStringLiteral(IdType type) pure nothrow @safe } } +public bool isProtection(IdType type) pure nothrow @safe +{ + switch (type) + { + case tok!"export": + case tok!"package": + case tok!"private": + case tok!"public": + case tok!"protected": + return true; + default: + return false; + } +} + public struct DLexer(R) { import std.conv;