4 using SiliconStudio.Shaders.Ast;
5 using SiliconStudio.Shaders.Parser;
6 using SiliconStudio.Shaders.Utility;
7 using SiliconStudio.Shaders.Visitor;
9 namespace SiliconStudio.Shaders.Analysis
33 public abstract void Run();
42 ParsingResult.Error(message, span);
53 ParsingResult.Error(message, span, parameters);
63 ParsingResult.Info(message, span);
72 protected void Info(
string message,
SourceSpan span, params
object[] parameters)
74 ParsingResult.Info(message, span, parameters);
84 ParsingResult.Warning(message, span);
95 ParsingResult.Warning(message, span, parameters);
110 var result = CastHelper.GetBinaryImplicitConversionType(left, right, isBinaryOperator);
127 var result = CastHelper.GetMultiplyImplicitConversionType(left.ResolveType(), right.
ResolveType());
144 var result = CastHelper.GetDivideImplicitConversionType(left.ResolveType(), right.
ResolveType());
163 var result = CastHelper.GetBinaryImplicitScalarConversionType(left, right);
static readonly MessageCode ErrorScalarTypeConversion
virtual TypeBase ResolveType()
Resolves the type.
virtual TypeBase GetDivideImplicitConversionType(SourceSpan span, TypeBase left, TypeBase right)
Gets the type of the binary implicit conversion.
virtual TypeBase GetBinaryImplicitConversionType(SourceSpan span, TypeBase left, TypeBase right, bool isBinaryOperator)
Gets the type of the binary implicit conversion.
void Error(MessageCode message, SourceSpan span, params object[] parameters)
Logs an Error with the specified message.
void Warning(MessageCode message, SourceSpan span, params object[] parameters)
Logs an Warning with the specified message.
static readonly MessageCode ErrorBinaryTypeDeduction
virtual TypeBase GetMultiplyImplicitConversionType(SourceSpan span, TypeBase left, TypeBase right)
Gets the type of the binary implicit conversion.
void Info(string message, SourceSpan span)
Logs an Info with the specified message.
AnalysisBase(ParsingResult result)
Initializes a new instance of the AnalysisBase class.
void Error(MessageCode message, SourceSpan span)
Logs an Error with the specified message.
void Info(string message, SourceSpan span, params object[] parameters)
Logs an Info with the specified message.
void Warning(MessageCode message, SourceSpan span)
Logs an Warning with the specified message.
ScalarType GetBinaryImplicitScalarConversionType(SourceSpan span, TypeBase left, TypeBase right)
Gets the type of the binary implicit scalar conversion.