Skip to main content

Module parser

Module parser 

Source
Expand description

The parser: preprocessed tokens to a syntax tree.

After an error the parser skips to the end of the statement or item and goes on, so one run reports all independent errors.

Constants§

MAX_DEPTH
The deepest nesting of expressions and statements the parser accepts.
MAX_TREE_DEPTH
The deepest expression tree the parser builds. Any recursive walk over a tree, Drop included, then stays within a small stack.

Functions§

is_builtin_type
word names a type that HLSL defines, for example float3x4 or sampler2D.
parse_tokens
Parses preprocessed tokens into a syntax tree. eof is where an error at the end of the input points: the end of the main file.