HLSL: Add namespace grammar and some basic semantics.

Unknown how extensive the semantics need to be yet. Need real
feedback from workloads. This is just done as part of unifying it
with the class/struct namespaces and grammar productions.
This commit is contained in:
John Kessenich 2017-03-30 16:22:26 -06:00
parent e434ad923e
commit 8f9fdc986a
8 changed files with 307 additions and 48 deletions

View file

@ -65,6 +65,7 @@ namespace glslang {
void unimplemented(const char*);
bool acceptIdentifier(HlslToken&);
bool acceptCompilationUnit();
bool acceptDeclarationList(TIntermNode*&);
bool acceptDeclaration(TIntermNode*&);
bool acceptControlDeclaration(TIntermNode*& node);
bool acceptSamplerDeclarationDX9(TType&);
@ -103,8 +104,7 @@ namespace glslang {
bool acceptUnaryExpression(TIntermTyped*&);
bool acceptPostfixExpression(TIntermTyped*&);
bool acceptConstructor(TIntermTyped*&);
bool acceptFunctionCall(HlslToken, TIntermTyped*&, TIntermTyped* objectBase = nullptr,
const TSymbol* scope = nullptr);
bool acceptFunctionCall(const TSourceLoc&, TString& name, TIntermTyped*&, TIntermTyped* objectBase);
bool acceptArguments(TFunction*, TIntermTyped*&);
bool acceptLiteral(TIntermTyped*&);
bool acceptCompoundStatement(TIntermNode*&);