summaryrefslogtreecommitdiffstats
path: root/source/slang/lexer.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-07-31 11:03:53 -0400
committerGitHub <noreply@github.com>2018-07-31 11:03:53 -0400
commit9914ca800c92e9b3fe768dec4e913a302f3d678d (patch)
tree49544fb2c0387f39876fd99e112cfc32ed05302d /source/slang/lexer.cpp
parent171f524d7ca2922084a33f50c77a1e8797e80949 (diff)
Feature/attributed binding (#621)
* Typo fix, and added dxc to command line documentation. * Fix small typos. Added support for Scope to lexer. Fix bug in Token ctor. * Add support for attribute names that are scoped. * Added GLSLBindingAttribute. Make binding work through core.met.slang. * Allow [[gl::binding(binding, set)]] [[vk::binding(binding,set)]]
Diffstat (limited to 'source/slang/lexer.cpp')
-rw-r--r--source/slang/lexer.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/slang/lexer.cpp b/source/slang/lexer.cpp
index 87ad6bd5c..5e6d15384 100644
--- a/source/slang/lexer.cpp
+++ b/source/slang/lexer.cpp
@@ -1192,7 +1192,16 @@ namespace Slang
case '~': advance(lexer); return TokenType::OpBitNot;
- case ':': advance(lexer); return TokenType::Colon;
+ case ':':
+ {
+ advance(lexer);
+ if (peek(lexer) == ':')
+ {
+ advance(lexer);
+ return TokenType::Scope;
+ }
+ return TokenType::Colon;
+ }
case ';': advance(lexer); return TokenType::Semicolon;
case ',': advance(lexer); return TokenType::Comma;