From 9914ca800c92e9b3fe768dec4e913a302f3d678d Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 31 Jul 2018 11:03:53 -0400 Subject: 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)]] --- source/slang/lexer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source/slang/lexer.cpp') 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; -- cgit v1.2.3