diff options
Diffstat (limited to 'tools/slang-cpp-extractor/slang-cpp-extractor-main.cpp')
| -rw-r--r-- | tools/slang-cpp-extractor/slang-cpp-extractor-main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/slang-cpp-extractor/slang-cpp-extractor-main.cpp b/tools/slang-cpp-extractor/slang-cpp-extractor-main.cpp index f71ae2fd6..1fc68ebe6 100644 --- a/tools/slang-cpp-extractor/slang-cpp-extractor-main.cpp +++ b/tools/slang-cpp-extractor/slang-cpp-extractor-main.cpp @@ -1647,6 +1647,17 @@ SlangResult CPPExtractor::_maybeParseField() switch (m_reader.peekTokenType()) { case TokenType::OpAssign: + { + // Special case to handle + // Type operator=(... + + m_reader.advanceToken(); + if (m_reader.peekTokenType() == TokenType::LParent) + { + // Not a field + break; + } + } case TokenType::Semicolon: { Node::Field field; @@ -2534,7 +2545,7 @@ SlangResult CPPExtractorApp::writeOutput(CPPExtractor& extractor) // Some keywords { - const char* names[] = { "virtual", "typedef", "continue", "if", "case", "break", "catch", "default", "delete", "do", "else", "for", "new", "goto", "return", "switch", "throw", "using", "while" }; + const char* names[] = { "virtual", "typedef", "continue", "if", "case", "break", "catch", "default", "delete", "do", "else", "for", "new", "goto", "return", "switch", "throw", "using", "while", "operator" }; outLookup.set(names, SLANG_COUNT_OF(names), IdentifierStyle::Keyword); } |
