Class SourceFile
java.lang.Object
dev.engine_room.flywheel.backend.glsl.SourceFile
- All Implemented Interfaces:
SourceComponent
Immutable class representing a shader file.
This class parses shader files and generates what is effectively a high level AST of the source.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringfinal com.google.common.collect.ImmutableList<Import>Includes ordered as defined in the source.final List<SourceFile>final net.minecraft.resources.ResourceLocationfinal SourceLines -
Method Summary
Modifier and TypeMethodDescriptionstatic LoadResultempty(net.minecraft.resources.ResourceLocation name) booleangetLineSpanMatching(int line, @Nullable String match) getLineSpanNoWhitespace(int line) inthashCode()Collection<? extends SourceComponent>included()name()static LoadResultparse(Function<net.minecraft.resources.ResourceLocation, LoadResult> sourceFinder, net.minecraft.resources.ResourceLocation name, String stringSource) source()toString()
-
Field Details
-
name
public final net.minecraft.resources.ResourceLocation name -
source
-
imports
Includes ordered as defined in the source. -
included
-
finalSource
-
-
Method Details
-
empty
-
parse
public static LoadResult parse(Function<net.minecraft.resources.ResourceLocation, LoadResult> sourceFinder, net.minecraft.resources.ResourceLocation name, String stringSource) -
included
- Specified by:
includedin interfaceSourceComponent
-
source
- Specified by:
sourcein interfaceSourceComponent
-
name
- Specified by:
namein interfaceSourceComponent
-
getLineSpanNoWhitespace
-
getLineSpanMatching
-
toString
-
equals
-
hashCode
public int hashCode()
-