Track whether function declarations are prototypes, and only allow at most one prototype for ES 100.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24342 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
e1f0f5b31f
commit
b88c60b03f
13 changed files with 101 additions and 25 deletions
|
|
@ -748,6 +748,7 @@ constant_expression
|
|||
|
||||
declaration
|
||||
: function_prototype SEMICOLON {
|
||||
parseContext.handleFunctionDeclarator($1.loc, *$1.function, true /* prototype */);
|
||||
$$ = 0;
|
||||
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
|
||||
}
|
||||
|
|
@ -820,7 +821,7 @@ identifier_list
|
|||
|
||||
function_prototype
|
||||
: function_declarator RIGHT_PAREN {
|
||||
$$.function = parseContext.handleFunctionDeclarator($2.loc, *$1);
|
||||
$$.function = $1;
|
||||
$$.loc = $2.loc;
|
||||
}
|
||||
;
|
||||
|
|
@ -2389,6 +2390,7 @@ external_declaration
|
|||
|
||||
function_definition
|
||||
: function_prototype {
|
||||
$1.function = parseContext.handleFunctionDeclarator($1.loc, *$1.function, false /* not prototype */);
|
||||
$1.intermAggregate = parseContext.handleFunctionDefinition($1.loc, *$1.function);
|
||||
}
|
||||
compound_statement_no_new_scope {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue