forked from o3de/o3de-azslc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ATOM-4800] Unclear Error Message for Function Inside Struct (o3de#6)
In order to catch the error of function inside struct it was necessary to modify the grammar to allow function definitions and declarations inside "struct" definitions (just like classes, interfaces and ShaderResourceGroups), this way the ANTLR parser would let it pass, giving the chance for AZSLc to provide a meaningful error message. ANTLR Syntax Error message: "no viable alternative at input structParallaxMapping{Texture2Dm_depthMap;floatm_depthFactor;boolm_isHeightmap;floatm_parallaxShadowFactor;float2GetParallaxUV(" New AZSLc produced Error message: "function_declared_in_struct.azsl(14,4) : Syntax error #516: structs cannot have member functions; consider using a class." Signed-off-by: garrieta <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,482 additions
and
1,370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.