/// CODE STRUCT someStruct { float3 a; float b; }; // <-- optional BUFFER 0; // set current constant buffer MACRO light N, L = dot(N,L) * someVal * someColor; FUNC light IN float3 N, float3 L, // the comma should be optional OUT float factor { factor = dot( N, L ); // return factor = dot( N, L ); // -- also accepted } /// OUTPUT [USL] Universal Shading Language compiler v0.1 STRUCT ident(someStruct) { ident(float3) ident(a) ; ident(float) ident(b) ; } ; BUFFER number(0) ; MACRO ident(light) ident(N) , ident(L) = ident(dot) ( ident(N) , ident(L) ) * ident(someVal) * ident(so meColor) ; FUNC ident(light) IN ident(float3) ident(N) , ident(float3) ident(L) , OUT ident(float) ident(factor) { ident(factor) = ident(dot) ( ident(N) , ident(L) ) ; } (3:1): error USL1006: unexpected token (4:2): error USL1006: unexpected token (4:9): error USL1006: unexpected token (4:10): error USL1006: unexpected token (5:2): error USL1006: unexpected token (5:8): error USL1006: unexpected token (5:9): error USL1006: unexpected token (6:1): error USL1006: unexpected token (6:2): error USL1006: unexpected token (8:9): error USL1006: unexpected token (10:13): error USL1006: unexpected token (10:14): error USL1006: unexpected token (10:16): error USL1006: unexpected token (10:18): error USL1006: unexpected token (10:20): error USL1006: unexpected token (10:23): error USL1006: unexpected token (10:24): error USL1006: unexpected token (10:25): error USL1006: unexpected token (10:26): error USL1006: unexpected token (10:27): error USL1006: unexpected token (10:29): error USL1006: unexpected token (10:31): error USL1006: unexpected token (10:39): error USL1006: unexpected token (10:41): error USL1006: unexpected token (10:50): error USL1006: unexpected token (13:2): error USL1006: unexpected token (13:5): error USL1006: unexpected token (13:12): error USL1006: unexpected token (13:13): error USL1006: unexpected token (13:15): error USL1006: unexpected token (13:22): error USL1006: unexpected token (13:23): error USL1006: unexpected token (14:2): error USL1006: unexpected token (14:6): error USL1006: unexpected token (14:12): error USL1006: unexpected token (15:1): error USL1006: unexpected token (16:2): error USL1006: unexpected token (16:9): error USL1006: unexpected token (16:11): error USL1006: unexpected token (16:14): error USL1006: unexpected token (16:16): error USL1006: unexpected token (16:17): error USL1006: unexpected token (16:19): error USL1006: unexpected token (16:21): error USL1006: unexpected token (16:22): error USL1006: unexpected token (18:1): error USL1006: unexpected token - structs - <<< someStruct >>> - macros - - functions - <<< light >>> > IN > OUT