Language Options
(future) Suzu allows the host application to configure the availability of language features.
Features such as loops and recursion can consume excess resources or cause the host application to stall.
Language configuration may be modified between loading of sources, allowing host code to access features not available to external sources.
Properties
Loop Iteration Limit
Specifies the maximum number of iterations in a loop before an error is reported.
Iteration count is validated at compile time, where possible, with a fallback check at runtime.
Call Depth Limit
Specifies the maximum depth of function calls before an error is reported.
Feature Restrictions
Constant
Disables AST creation and reports an error if the program includes non-const expressions.
Loops
Disables all looping expressions.
Recursion
Reports an error if a function is called twice in the same stack.
Functions
Reports an error if a function is constructed.
Profiles
Profile | Options |
---|---|
Default | No restrictions |
Constant | No execution |