@@ -45,15 +45,15 @@ export abstract class GLESVisitor extends CodeGenVisitor {
45
45
46
46
vertexMain ( entry : string , data : ShaderData ) : string {
47
47
const { symbolTable } = data ;
48
- const fnSymbol = symbolTable . lookupBy ( entry , ESymbolType . FN ) ;
48
+ const fnSymbol = symbolTable . lookup ( entry , ESymbolType . FN ) ;
49
49
if ( ! fnSymbol ?. astNode ) throw `no entry function found: ${ entry } ` ;
50
50
51
51
const fnNode = fnSymbol . astNode ;
52
52
VisitorContext . context . stage = EShaderStage . VERTEX ;
53
53
54
54
const returnType = fnNode . protoType . returnType ;
55
55
if ( typeof returnType . type === "string" ) {
56
- const varyStruct = symbolTable . lookupBy ( returnType . type , ESymbolType . STRUCT ) ;
56
+ const varyStruct = symbolTable . lookup ( returnType . type , ESymbolType . STRUCT ) ;
57
57
if ( ! varyStruct ) {
58
58
this . _reportError ( returnType . location , `invalid varying struct: ${ returnType . type } ` ) ;
59
59
} else {
@@ -67,7 +67,7 @@ export abstract class GLESVisitor extends CodeGenVisitor {
67
67
if ( paramList ?. length ) {
68
68
for ( const paramInfo of paramList ) {
69
69
if ( typeof paramInfo . typeInfo . type === "string" ) {
70
- const structSymbol = symbolTable . lookupBy ( paramInfo . typeInfo . type , ESymbolType . STRUCT ) ;
70
+ const structSymbol = symbolTable . lookup ( paramInfo . typeInfo . type , ESymbolType . STRUCT ) ;
71
71
if ( ! structSymbol ) {
72
72
this . _reportError ( paramInfo . astNode . location , `Not found attribute struct "${ paramInfo . typeInfo . type } ".` ) ;
73
73
continue ;
@@ -103,7 +103,7 @@ export abstract class GLESVisitor extends CodeGenVisitor {
103
103
104
104
private _fragmentMain ( entry : string , data : ShaderData ) : string {
105
105
const { symbolTable } = data ;
106
- const fnSymbol = symbolTable . lookupBy ( entry , ESymbolType . FN ) ;
106
+ const fnSymbol = symbolTable . lookup ( entry , ESymbolType . FN ) ;
107
107
if ( ! fnSymbol ?. astNode ) throw `no entry function found: ${ entry } ` ;
108
108
const fnNode = fnSymbol . astNode ;
109
109
@@ -117,7 +117,7 @@ export abstract class GLESVisitor extends CodeGenVisitor {
117
117
118
118
const { type : returnDataType , location : returnLocation } = fnNode . protoType . returnType ;
119
119
if ( typeof returnDataType === "string" ) {
120
- const mrtStruct = symbolTable . lookupBy ( returnDataType , ESymbolType . STRUCT ) ;
120
+ const mrtStruct = symbolTable . lookup ( returnDataType , ESymbolType . STRUCT ) ;
121
121
if ( ! mrtStruct ) {
122
122
this . _reportError ( returnLocation , `invalid mrt struct: ${ returnDataType } ` ) ;
123
123
} else {
0 commit comments