Package icyllis.arc3d.compiler
Class Context
java.lang.Object
icyllis.arc3d.compiler.Context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Expression
convertIdentifier
(int position, String name) Create expressions with the given identifier name and current symbol table.void
end()
Ends the DSL.void
Enters a scope level.void
void
Returns the ErrorHandler which will be notified of any errors that occur during DSL calls.getKind()
@NonNull CompileOptions
Returns the current SymbolTable.getTypes()
Returns the BuiltinTypes used by DSL operations in the current thread.boolean
isActive()
Returns true if the DSL has been started.boolean
boolean
isModule()
void
Leaves a scope level.void
setErrorHandler
(ErrorHandler errorHandler) Installs an ErrorHandler which will be notified of any errors that occur during DSL calls.void
start
(ShaderKind kind, CompileOptions options, ModuleUnit parent, boolean isBuiltin, boolean isModule) Starts the DSL for compiling modules.void
void
-
Constructor Details
-
Context
-
-
Method Details
-
start
public void start(ShaderKind kind, CompileOptions options, ModuleUnit parent, boolean isBuiltin, boolean isModule) Starts the DSL for compiling modules. -
end
public void end()Ends the DSL. -
isActive
public boolean isActive()Returns true if the DSL has been started. -
getKind
-
getOptions
-
isBuiltin
public boolean isBuiltin()- Returns:
- true if we are at built-in level
-
isModule
public boolean isModule()- Returns:
- true if we are processing include files
-
getTypes
Returns the BuiltinTypes used by DSL operations in the current thread. -
getSymbolTable
Returns the current SymbolTable. -
enterScope
public void enterScope()Enters a scope level. -
leaveScope
public void leaveScope()Leaves a scope level. -
error
-
error
-
warning
-
warning
-
getErrorHandler
Returns the ErrorHandler which will be notified of any errors that occur during DSL calls. The default error handler throws RuntimeException on any error. -
setErrorHandler
Installs an ErrorHandler which will be notified of any errors that occur during DSL calls. -
convertIdentifier
Create expressions with the given identifier name and current symbol table. Report errors viaErrorHandler
; return null on error.
-