Create linkage symbol nodes in the AST so a linker has access to all global objects that were declared, for error checking, etc. Use it now for all ins/outs/uniforms as well as gl_VertexID and gl_InstanceID.
Also fixed a confusing name and added more 'const'. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22142 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
b29ba33089
commit
06f8464fb5
10 changed files with 101 additions and 34 deletions
|
|
@ -270,7 +270,7 @@ postfix_expression
|
|||
parseContext.variableCheck($1);
|
||||
if (!$1->isArray() && !$1->isMatrix() && !$1->isVector()) {
|
||||
if ($1->getAsSymbolNode())
|
||||
parseContext.error($2.line, " left of '[' is not of type array, matrix, or vector ", $1->getAsSymbolNode()->getSymbol().c_str(), "");
|
||||
parseContext.error($2.line, " left of '[' is not of type array, matrix, or vector ", $1->getAsSymbolNode()->getName().c_str(), "");
|
||||
else
|
||||
parseContext.error($2.line, " left of '[' is not of type array, matrix, or vector ", "expression", "");
|
||||
}
|
||||
|
|
@ -746,8 +746,8 @@ function_identifier
|
|||
} else {
|
||||
TIntermSymbol* symbol = $1->getAsSymbolNode();
|
||||
if (symbol) {
|
||||
parseContext.reservedErrorCheck(symbol->getLine(), symbol->getSymbol());
|
||||
TFunction *function = new TFunction(&symbol->getSymbol(), TType(EbtVoid));
|
||||
parseContext.reservedErrorCheck(symbol->getLine(), symbol->getName());
|
||||
TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid));
|
||||
$$.function = function;
|
||||
} else
|
||||
parseContext.error($1->getLine(), "function call, method or subroutine call expected", "", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue