diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-03-24 11:12:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-24 11:12:19 -0400 |
| commit | e1a331a2e2945f2b90c00d0af4d1ba5f67dbd256 (patch) | |
| tree | ba59b7055464a387ae52e67088a56ee1d5b5fc7d /source | |
| parent | 91292b8ca80ede633d1c4effaf8b3f5cf2ac3f2b (diff) | |
C++ extractor parsing slang.h (#2162)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Split doc extractor such that can be used in C++ extractor.
* Compiles. Update the stdlib docs.
* Fix issue on release builds.
* Add support for extracting documentation to C++ extractor.
* Dump out markup.
Make enum value backing type take tokens.
* Node::Type -> Node::Kind
* More improvements around Node::Type -> Node::Kind
* Support for parsing callable types.
* Fix issue params for callable, and default value for variable.
* Add support for static.
* Improve handling parsing of contained types.
* Small improvements around template consumption.
* Improve dumping with markup/static.
* Small improvements around reflection.
* Add more flexible handling of markers.
Allow reflection without markers.
* Handling external "C"
unsigned/signed
Diffstat (limited to 'source')
| -rw-r--r-- | source/compiler-core/slang-lexer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/compiler-core/slang-lexer.h b/source/compiler-core/slang-lexer.h index 23458d396..3a2506d85 100644 --- a/source/compiler-core/slang-lexer.h +++ b/source/compiler-core/slang-lexer.h @@ -62,6 +62,11 @@ namespace Slang } struct ParsingCursor { + bool operator==(const ParsingCursor& rhs) const { return tokenReaderCursor == rhs.tokenReaderCursor; } + bool operator!=(const ParsingCursor& rhs) const { return !(*this == rhs); } + + bool isValid() const { return tokenReaderCursor != nullptr; } + Token nextToken; const Token* tokenReaderCursor = nullptr; }; |
