diff options
Diffstat (limited to 'tools/slang-cpp-extractor/identifier-lookup.cpp')
| -rw-r--r-- | tools/slang-cpp-extractor/identifier-lookup.cpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/tools/slang-cpp-extractor/identifier-lookup.cpp b/tools/slang-cpp-extractor/identifier-lookup.cpp index db8ea2846..c429a29a4 100644 --- a/tools/slang-cpp-extractor/identifier-lookup.cpp +++ b/tools/slang-cpp-extractor/identifier-lookup.cpp @@ -27,6 +27,15 @@ using namespace Slang; 0, /// Calling convention IdentifierFlag::Keyword, /// template IdentifierFlag::Keyword, /// static + + IdentifierFlag::Keyword, /// unsigned/signed + + IdentifierFlag::Keyword, /// extern + + 0, /// Callable misc + 0, /// IntegerType int, short, char, long + + IdentifierFlag::Keyword, /// default }; void IdentifierLookup::set(const UnownedStringSlice& name, IdentifierStyle style) @@ -68,7 +77,7 @@ void IdentifierLookup::initDefault(const UnownedStringSlice& markPrefix) // Some keywords { - const char* names[] = { "continue", "if", "case", "break", "catch", "default", "delete", "do", "else", "for", "new", "goto", "return", "switch", "throw", "using", "while", "operator", "explicit"}; + const char* names[] = { "continue", "if", "case", "break", "catch", "delete", "do", "else", "for", "new", "goto", "return", "switch", "throw", "using", "while", "operator", "explicit"}; set(names, SLANG_COUNT_OF(names), IdentifierStyle::Keyword); } @@ -95,9 +104,26 @@ void IdentifierLookup::initDefault(const UnownedStringSlice& markPrefix) { set("virtual", IdentifierStyle::Virtual); - set("SLANG_MCALL", IdentifierStyle::CallingConvention); + set("template", IdentifierStyle::Template); set("static", IdentifierStyle::Static); + set("extern", IdentifierStyle::Extern); + set("default", IdentifierStyle::Default); + } + + { + const char* names[] = { "char", "short", "int", "long"}; + set(names, SLANG_COUNT_OF(names), IdentifierStyle::IntegerType); + } + + { + const char* names[] = { "SLANG_MCALL" }; + set(names, SLANG_COUNT_OF(names), IdentifierStyle::CallingConvention); + } + + { + const char* names[] = { "SLANG_NO_THROW", "inline"}; + set(names, SLANG_COUNT_OF(names), IdentifierStyle::CallableMisc); } // Keywords which introduce types/scopes @@ -119,6 +145,11 @@ void IdentifierLookup::initDefault(const UnownedStringSlice& markPrefix) const char* names[] = { "private", "protected", "public" }; set(names, SLANG_COUNT_OF(names), IdentifierStyle::Access); } + { + const char* names[] = { "signed", "unsigned"}; + + set(names, SLANG_COUNT_OF(names), IdentifierStyle::IntegerModifier); + } } } // namespace CppExtract |
