3 using System.Collections.Generic;
6 using SiliconStudio.Paradox.Shaders.Parser.Ast;
7 using SiliconStudio.Paradox.Shaders.Parser.Mixins;
8 using SiliconStudio.Paradox.Shaders.Parser.Utility;
9 using SiliconStudio.Shaders.Ast;
10 using SiliconStudio.Shaders.Ast.Hlsl;
11 using SiliconStudio.Shaders.Parser;
12 using SiliconStudio.Shaders.Visitor;
16 namespace SiliconStudio.Paradox.Shaders.Parser.Analysis
18 internal class ParadoxSemanticAnalysis : ParadoxTypeAnalysis
20 #region Static members
25 private static readonly
string[] ParadoxKeywords = {
"base",
"streams",
"this" };
30 private static readonly
string[] StreamTypes = {
"Streams",
"Input",
"Input2",
"Output",
"Constants" };
39 #region Private members
44 private ParadoxParsingInfo parsingInfo;
49 private readonly HashSet<ModuleMixin> moduleMixins =
new HashSet<ModuleMixin>();
54 private readonly ModuleMixin analyzedModuleMixin = null;
64 private bool inSampler =
false;
69 private AssignmentOperatorStatus currentAssignmentOperatorStatus = AssignmentOperatorStatus.Read;
74 private bool expandForEachStatements;
78 #region Constructor and helpers
86 public ParadoxSemanticAnalysis(
ParsingResult result, ModuleMixin analyzedMixin, List<ModuleMixin> moduleMixinsInCompilationGroup)
91 analyzedModuleMixin = analyzedMixin;
93 ScopeStack.First().AddDeclaration(StreamsVariable);
96 ScopeStack.Push(currentScope);
98 currentScope.AddDeclarations(analyzedMixin.VirtualTable.Typedefs);
99 currentScope.AddDeclarations(analyzedMixin.VirtualTable.StructureTypes);
100 currentScope.AddDeclarations(analyzedMixin.VirtualTable.Variables.Select(x => x.Variable));
101 currentScope.AddDeclarations(analyzedMixin.VirtualTable.Methods.Select(x => x.Method));
102 currentScope.AddDeclarations(analyzedMixin.InheritanceList.Select(x => x.Shader));
107 foreach (var mixin
in moduleMixinsInCompilationGroup)
109 moduleMixins.Add(mixin);
110 sd.AddDeclaration(mixin.Shader);
116 #region Public static methods
124 public static ParadoxParsingInfo RunAnalysis(ModuleMixin mixinToAnalyze, List<ModuleMixin> compilationContext,
bool transformForEach =
false)
126 var shader =
new Shader();
127 shader.Declarations.Add(mixinToAnalyze.Shader);
129 var analysis =
new ParadoxSemanticAnalysis(toParse, mixinToAnalyze, compilationContext) { parsingInfo =
new ParadoxParsingInfo() };
130 analysis.expandForEachStatements = transformForEach;
134 analysis.parsingInfo.StaticClasses.UnionWith(analysis.parsingInfo.StaticReferences.VariablesReferences.Select(x => x.Key.GetTag(ParadoxTags.ShaderScope) as ModuleMixin));
135 analysis.parsingInfo.StaticClasses.UnionWith(analysis.parsingInfo.StaticReferences.MethodsReferences.Select(x => x.Key.GetTag(ParadoxTags.ShaderScope) as ModuleMixin));
136 analysis.parsingInfo.StaticClasses.Remove(mixinToAnalyze);
137 analysis.parsingInfo.ErrorsWarnings = analysis.ParsingResult;
139 return analysis.parsingInfo;
144 #region Private and protected methods
155 Visit((
Node)shaderTypeName);
156 return shaderTypeName;
165 if (!parsingInfo.ClassReferences.MethodsReferences.ContainsKey(methodDeclaration))
166 parsingInfo.ClassReferences.MethodsReferences.Add(methodDeclaration,
new HashSet<MethodInvocationExpression>());
175 foreach (var parameter
in methodDeclaration.
Parameters)
192 currentVisitedMethod = methodDeclaration;
199 Visit((
Node)methodDeclaration);
200 PostMethodDeclarationVisit(methodDeclaration);
211 currentVisitedMethod = methodDefinition;
216 var ret = base.Visit(methodDefinition);
218 PostMethodDeclarationVisit(methodDefinition);
229 currentVisitedMethod = null;
230 StoreMethod(methodDeclaration);
231 CheckParamatersAndReturnType(methodDeclaration);
239 protected void Visit(
Variable variable)
250 var forEachStatement = ParentNode as ForEachStatement;
251 if (variable == forEachStatement.
Variable)
253 var finalType = forEachStatement.Collection.TypeInference.TargetType;
255 finalType = (finalType as ArrayType).Type;
256 variable.Type = finalType;
257 if ((forEachStatement.Collection.TypeInference.Declaration as
Variable).Qualifiers.Contains(ParadoxStorageQualifier.Extern))
258 variable.Qualifiers |= ParadoxStorageQualifier.Extern;
262 Visit((
Node)variable);
266 if (currentVisitedMethod == null)
270 var vre = variable.InitialValue as VariableReferenceExpression;
271 if (vre.Name.Text ==
"stage")
274 parsingInfo.StageInitializedVariables.Add(variable);
282 var varType = variable.Type;
284 varType = (varType as ArrayType).Type;
286 if (!(varType.TypeInference.Declaration is
ClassType))
298 if (variable.InitialValue == null)
300 else if (variable.InitialValue.TypeInference.TargetType == null)
303 variable.Type = variable.InitialValue.TypeInference.TargetType.ResolveType();
308 if (!parsingInfo.ClassReferences.VariablesReferences.ContainsKey(variable))
309 parsingInfo.ClassReferences.VariablesReferences.Add(variable,
new HashSet<ExpressionNodeCouple>());
312 if (currentVisitedMethod != null && !(ParentNode is ForEachStatement))
327 return FindFinalType((typeBase as ArrayType).Type);
328 return typeBase.ResolveType();
336 private void Visit(
Typedef typedef)
338 Visit((
Node)
typedef);
340 if (currentVisitedMethod != null)
343 parsingInfo.Typedefs.Add(
typedef);
351 public override void Visit(
Technique technique)
362 var targetDecl = memberReference.Target.TypeInference.Declaration;
363 var variableTargetDecl = targetDecl as
Variable;
366 variableTargetDecl = (memberReference.Target as IndexerExpression).Target.TypeInference.Declaration as Variable;
370 var varType = variableTargetDecl.Type;
372 varType = (varType as ArrayType).Type;
374 var matchingDecls = FindDeclarationsFromObject(varType, memberReference.
Member.
Text).ToList();
375 var varDecl = matchingDecls.OfType<Variable>().FirstOrDefault();
377 var shaderDecl = matchingDecls.OfType<
ShaderClassType>().FirstOrDefault();
381 memberReference.TypeInference.Declaration = varDecl;
382 memberReference.TypeInference.TargetType = varDecl.Type.ResolveType();
386 if (IsStageInitMember(memberReference))
389 memberReference.SetTag(ParadoxTags.ExternRef, null);
392 else if (shaderDecl != null)
394 memberReference.TypeInference.Declaration = shaderDecl;
395 memberReference.TypeInference.TargetType = shaderDecl.ResolveType();
397 else if (methodDecl == null)
403 FindMemberTypeReference(targetDecl as ShaderClassType, memberReference);
405 base.CommonVisit(memberReference);
407 if (IsStreamMember(memberReference))
411 CheckStreamMemberReference(memberReference);
415 var refAsVariable = memberReference.TypeInference.Declaration as Variable;
416 if (!refAsVariable.Qualifiers.Contains(
ParadoxStorageQualifier.
Stream) && !refAsVariable.Qualifiers.Contains(ParadoxStorageQualifier.PatchStream))
420 else if (IsInputOutputMember(memberReference))
422 CheckStreamMemberReference(memberReference);
427 if (variableDecl.Qualifiers.Contains(
ParadoxStorageQualifier.
Stream) || variableDecl.Qualifiers.Contains(ParadoxStorageQualifier.PatchStream))
433 var isExtern = HasExternQualifier(memberReference);
435 if (shouldStoreExpression && isExtern)
436 memberReference.SetTag(ParadoxTags.ExternRef, null);
439 memberReference.SetTag(ParadoxTags.StaticRef, null);
442 if (currentVisitedMethod != null && currentVisitedMethod.Qualifiers.Contains(
StorageQualifier.
Static) && varDecl != null && varDecl.GetTag(ParadoxTags.BaseDeclarationMixin) != null)
447 AddToVariablesReference(memberReference);
457 var decl = memberReference.TypeInference.Declaration ?? FindDeclarations(memberReference.
Member.
Text).FirstOrDefault();
458 var variableDecl = decl as
Variable;
461 if (variableDecl != null)
463 memberReference.TypeInference.Declaration = variableDecl;
464 memberReference.TypeInference.TargetType = variableDecl.Type.ResolveType();
466 else if (mixinDecl != null)
468 memberReference.TypeInference.Declaration = mixinDecl;
469 memberReference.TypeInference.TargetType = mixinDecl.ResolveType();
484 var mixin = moduleMixins.FirstOrDefault(x => x.Shader == shaderDecl);
487 var shader = mixin.InheritanceList.FirstOrDefault(x => x.MixinName == memberReference.Member.Text);
490 memberReference.TypeInference.Declaration = shader.Shader;
491 memberReference.TypeInference.TargetType = shader.Shader;
495 var variableDecl = mixin.VirtualTable.Variables.FirstOrDefault(x => x.Variable.Name.Text == memberReference.Member.Text);
496 if (variableDecl != null)
498 var isStream = IsStreamMember(memberReference);
501 memberReference.TypeInference.Declaration = variableDecl.Variable;
502 memberReference.TypeInference.TargetType = variableDecl.Variable.Type.ResolveType();
509 var invocationExpression = ParentNode as MethodInvocationExpression;
510 if (ReferenceEquals(invocationExpression.Target, memberReference))
512 var methodDecl = mixin.VirtualTable.Methods.Select(x => x.Method).FirstOrDefault(x => x.IsSameSignature(invocationExpression));
513 if (methodDecl != null)
515 memberReference.TypeInference.Declaration = methodDecl;
516 invocationExpression.TypeInference.TargetType = methodDecl.ReturnType.ResolveType();
536 var mixin = moduleMixins.FirstOrDefault(x => x.MixinName == typeBase.Name.Text);
540 foreach (var member
in mixin.VirtualTable.Variables.Where(x => x.Variable.Name.Text == memberName))
541 yield
return member.Variable;
543 foreach (var member in mixin.VirtualTable.Methods.Where(x => x.Method.Name.Text == memberName))
544 yield
return member.Method;
546 if (mixin.MixinName == memberName)
547 yield
return mixin.Shader;
549 foreach (var dep
in mixin.InheritanceList.Where(x => x.MixinName == memberName).Select(x => x.Shader))
554 foreach (var item
in base.FindDeclarationsFromObject(typeBase.
ResolveType(), memberName))
567 var res = base.FindDeclarations(name);
569 if (res.OfType<
Variable>().Any(x => analyzedModuleMixin.PotentialConflictingVariables.Contains(x)))
571 if (res.OfType<
MethodDeclaration>().Any(x => analyzedModuleMixin.PotentialConflictingMethods.Contains(x)))
584 expression.SetTag(ParadoxTags.CurrentShader, analyzedModuleMixin);
586 base.Visit(expression);
591 expression.TypeInference.Declaration = expression.Target.TypeInference.Declaration;
593 var methodDecl = expression.Target.TypeInference.Declaration as
MethodDeclaration;
595 if (methodDecl != null)
597 expression.Target.TypeInference.TargetType = (expression.Target.TypeInference.Declaration as MethodDeclaration).ReturnType.ResolveType();
598 expression.TypeInference.TargetType = expression.Target.TypeInference.TargetType.ResolveType();
601 && !methodDecl.Qualifiers.Contains(StorageQualifier.Static)
609 AddToMethodsReferences(expression);
611 if (methodDecl != null)
612 expression.Target.SetTag(ParadoxTags.VirtualTableReference, methodDecl.GetTag(ParadoxTags.VirtualTableReference));
621 protected override void ProcessMethodInvocation(
MethodInvocationExpression expression,
string methodName, List<IDeclaration> declarations)
623 bool callBaseProcessMethodInvocation =
true;
624 bool isNotBaseCall =
true;
628 if (memberReferenceExpression != null)
631 if (variableReferenceExpression != null)
633 switch (variableReferenceExpression.Name.Text)
637 parsingInfo.BaseMethodCalls.Add(expression);
638 isNotBaseCall =
false;
639 callBaseProcessMethodInvocation =
false;
643 foreach (var mixin
in analyzedModuleMixin.InheritanceList)
645 baseMethod = mixin.LocalVirtualTable.Methods.Select(x => x.Method).FirstOrDefault(x => x.IsSameSignature(expression));
646 if (baseMethod != null)
649 if (baseMethod == null)
650 baseMethod = analyzedModuleMixin.LocalVirtualTable.Methods.Select(x => x.Method).FirstOrDefault(x => x.IsSameSignature(expression));
652 if (baseMethod != null)
654 expression.TypeInference.TargetType = baseMethod.ReturnType.ResolveType();
655 expression.Target.TypeInference.Declaration = baseMethod;
664 var vre =
new VariableReferenceExpression(memberReferenceExpression.Member);
665 expression.Target = vre;
667 callBaseProcessMethodInvocation =
false;
670 var topMethod = analyzedModuleMixin.VirtualTable.Methods.Select(x => x.Method).FirstOrDefault(x => x.IsSameSignature(expression));
671 if (topMethod != null)
673 expression.TypeInference.TargetType = topMethod.ReturnType.ResolveType();
674 expression.Target.TypeInference.Declaration = topMethod;
682 memberReferenceExpression = null;
690 if (expression.
Target is MemberReferenceExpression)
692 var typeCall = (expression.Target as MemberReferenceExpression).Target.TypeInference.TargetType;
694 declarations.AddRange(FindDeclarationsFromObject(typeCall, memberReferenceExpression.Member));
699 if (callBaseProcessMethodInvocation)
700 base.ProcessMethodInvocation(expression, methodName, declarations);
702 var methodDecl = expression.Target.TypeInference.Declaration as
MethodDeclaration;
703 var isBuiltIn =
true;
705 if (methodDecl != null)
708 if (ReferenceEquals(currentVisitedMethod, expression.Target.TypeInference.Declaration))
712 isBuiltIn = !methodDecl.ContainsTag(ParadoxTags.ShaderScope);
714 if (memberReferenceExpression != null)
716 var varDecl = memberReferenceExpression.Target.TypeInference.Declaration as
Variable;
718 varDecl = (memberReferenceExpression.Target as IndexerExpression).Target.TypeInference.Declaration as Variable;
722 if (IsStageInitMember(memberReferenceExpression))
725 expression.SetTag(ParadoxTags.ExternRef, null);
728 var shaderDecl = memberReferenceExpression.Target.TypeInference.Declaration as
ShaderClassType;
729 if (shaderDecl != null && shaderDecl != analyzedModuleMixin.Shader && analyzedModuleMixin.InheritanceList.All(x => x.Shader != shaderDecl))
737 parsingInfo.ThisMethodCalls.Add(expression);
740 parsingInfo.StageMethodCalls.Add(expression);
757 protected override bool TestMethodInvocationArgument(
TypeBase argTypeBase,
TypeBase expectedTypeBase,
TypeBase argType,
TypeBase expectedType, ref
int score)
762 return argTypeBase == expectedType;
764 return base.TestMethodInvocationArgument(argTypeBase, expectedTypeBase, argType, expectedType, ref score);
774 if (currentAssignmentOperatorStatus != AssignmentOperatorStatus.Read)
777 assignmentExpression.Value = (
Expression)VisitDynamic(assignmentExpression.
Value);
778 currentAssignmentOperatorStatus = (assignmentExpression.Operator != AssignmentOperator.Default) ? AssignmentOperatorStatus.ReadWrite : AssignmentOperatorStatus.Write;
782 currentAssignmentOperatorStatus = AssignmentOperatorStatus.Read;
791 var name = variableReferenceExpression.Name.Text;
794 var varCount = analyzedModuleMixin.VirtualTable.Variables.Count(x => x.Variable.Name.Text == name);
808 var name = variableReferenceExpression.Name.Text;
811 variableReferenceExpression.TypeInference.Declaration = analyzedModuleMixin.Shader;
812 variableReferenceExpression.TypeInference.TargetType = analyzedModuleMixin.Shader;
817 variableReferenceExpression.TypeInference.Declaration = analyzedModuleMixin.Shader;
818 variableReferenceExpression.TypeInference.TargetType = analyzedModuleMixin.Shader;
823 if (!(ParentNode is
Variable && (ParentNode as
Variable).InitialValue == variableReferenceExpression))
828 if (name ==
"streams")
830 variableReferenceExpression.TypeInference.Declaration = StreamsVariable;
831 variableReferenceExpression.TypeInference.TargetType = StreamsVariable.Type;
835 if (!ParadoxKeywords.Contains(variableReferenceExpression.
Name.
Text))
836 CheckNameConflict(variableReferenceExpression);
838 base.Visit(variableReferenceExpression);
840 var varDecl = variableReferenceExpression.TypeInference.Declaration as
Variable;
846 variableReferenceExpression.TypeInference.TargetType = (variableReferenceExpression.TypeInference.Declaration as Variable).Type.ResolveType();
856 var isMethodName = defaultDeclarations.Any(x => x.Name.Text == variableReferenceExpression.Name.Text);
858 if (!ParadoxKeywords.Contains(variableReferenceExpression.
Name.
Text) && variableReferenceExpression.TypeInference.Declaration == null && !inSampler && !isMethodName)
865 if (currentVisitedMethod != null && currentVisitedMethod.Qualifiers.Contains(
StorageQualifier.
Static) && varDecl != null && varDecl.GetTag(ParadoxTags.BaseDeclarationMixin) != null)
869 AddToVariablesReference(variableReferenceExpression);
876 protected override void ProcessIndexerExpression(
IndexerExpression indexerExpression)
878 var targetType = indexerExpression.Target.TypeInference.TargetType;
880 if (targetType is
ClassType && (targetType.Name.Text ==
"InputPatch" || targetType.Name.Text ==
"OutputPatch" || targetType.Name.Text ==
"PointStream" || targetType.Name.Text ==
"StructuredBuffer" || targetType.Name.Text ==
"RWStructuredBuffer"))
881 indexerExpression.TypeInference.TargetType = (targetType as
ClassType).GenericArguments[0].ResolveType();
883 base.ProcessIndexerExpression(indexerExpression);
887 var varDecl = indexerExpression.Target.TypeInference.Declaration as
Variable;
911 Visit((
Node)structType);
914 parsingInfo.StructureDefinitions.Add(structType);
922 protected override void Visit(
GenericType genericType)
924 base.Visit(genericType);
937 private void AddToVariablesReference(
Expression expression)
939 var variable = expression.TypeInference.Declaration as
Variable;
943 parsingInfo.StaticReferences.InsertVariable(variable,
new ExpressionNodeCouple(expression, ParentNode));
945 parsingInfo.ExternReferences.InsertVariable(variable,
new ExpressionNodeCouple(expression, ParentNode));
947 parsingInfo.StageInitReferences.InsertVariable(variable,
new ExpressionNodeCouple(expression, ParentNode));
949 parsingInfo.ClassReferences.InsertVariable(variable,
new ExpressionNodeCouple(expression, ParentNode));
959 var methodDecl = expression.Target.TypeInference.Declaration as
MethodDeclaration;
963 parsingInfo.StaticReferences.InsertMethod(methodDecl, expression);
965 parsingInfo.ExternReferences.InsertMethod(methodDecl, expression);
967 parsingInfo.StageInitReferences.InsertMethod(methodDecl, expression);
969 parsingInfo.ClassReferences.InsertMethod(methodDecl, expression);
980 if (expandForEachStatements)
985 var inference = forEachStatement.Collection.TypeInference.Declaration as
Variable;
986 if (!(inference != null && inference.Type is
ArrayType))
987 return forEachStatement;
989 if ((inference.Type as ArrayType).Dimensions.Count > 1)
992 return forEachStatement;
995 var dim = (int)((inference.Type as ArrayType).Dimensions.FirstOrDefault() as
LiteralExpression).Value;
998 for (
int i = 0; i < dim; ++i)
1000 var cloned = forEachStatement.DeepClone();
1001 var replace =
new ParadoxReplaceExtern(cloned.Variable,
new IndexerExpression(cloned.Collection,
new LiteralExpression(i)));
1002 replace.Run(cloned.Body);
1003 result.Add(cloned.Body);
1006 Visit((
Node)result);
1011 Visit((
Node)forEachStatement);
1012 parsingInfo.ForEachStatements.Add(
new StatementNodeCouple(forEachStatement, ParentNode));
1013 return forEachStatement;
1030 return ParadoxType.Streams;
1032 return base.GetBinaryImplicitConversionType(span, left, right, isBinaryOperator);
1045 return ParadoxType.Streams;
1047 return base.GetMultiplyImplicitConversionType(span, left, right);
1060 return ParadoxType.Streams;
1062 return base.GetDivideImplicitConversionType(span, left, right);
1070 private bool IsStageInitMember(
Expression expression)
1072 if (expression != null)
1080 #region Private static helper functions
1088 private static bool HasExternQualifier(
Expression expression)
1090 var varDecl = expression.TypeInference.Declaration as
Variable;
1092 return !(varDecl.InitialValue is
VariableReferenceExpression) || (varDecl.InitialValue as VariableReferenceExpression).Name.Text !=
"stage";
1095 return HasExternQualifier((expression as MemberReferenceExpression).Target);
1107 if (expression != null)
1113 var target = expression.Target;
1115 target = (target as MemberReferenceExpression).Target;
1118 return variableReferenceExpression != null && (variableReferenceExpression.Name.Text ==
"streams" || variableReferenceExpression.TypeInference.TargetType is
ParadoxType);
1130 var targetType = expression.Target.TypeInference.TargetType;
1131 if (targetType != null)
1133 var targetTypeName = targetType.Name.Text;
1134 return (targetTypeName ==
"Input" || targetTypeName ==
"Input2" || targetTypeName ==
"Output");
Base class for all vector types
static readonly Ast.StorageQualifier Static
Static modifier.
TypeBase TargetType
Gets or sets the type.
static readonly MessageCode WarningDeclarationCall
static readonly MessageCode ErrorNonStaticCallInStaticMethod
TypeBase Type
Gets or sets the type.
static readonly MessageCode ErrorNoTypeInference
static readonly SiliconStudio.Shaders.Ast.StorageQualifier Abstract
Override keyword (override).
static readonly MessageCode ErrorMissingVariable
static readonly MessageCode ErrorShaderClassReturnType
static readonly MessageCode ErrorVarNoInitialValue
static readonly MessageCode ErrorUnnecessaryAbstract
static readonly MessageCode ErrorMissingStreamsStruct
static readonly MessageCode ErrorMethodNameAmbiguity
static readonly MessageCode ErrorShaderClassTypeParameter
TypeInference TypeInference
Gets or sets the resolved reference.
static readonly SiliconStudio.Shaders.Ast.StorageQualifier Stream
Stream keyword (stream).
Variable()
Initializes a new instance of the Variable class.
static readonly MessageCode ErrorMissingExtern
SourceSpan Span
Gets or sets the source span.
string Text
Gets or sets the name.
static readonly MessageCode ErrorExtraStreamsPrefix
Identifier Member
Gets or sets the member.
Expression Collection
Gets or sets the condition.
static readonly MessageCode ErrorShaderVariable
bool ContainsTag(object tagKey)
Determines whether the specified instance contains this tag.
Expression Index
Gets or sets the index.
A Scope declaration provides a way to retrieve all scope declaration (variable, methods...etc.) and attached nodes.
virtual TypeBase ResolveType()
Resolves the type.
Expression Target
Gets or sets the target receving the assigment.
static readonly SiliconStudio.Shaders.Ast.StorageQualifier Override
Override keyword (override).
A method definition with a body of statements.
IDeclaration Declaration
Gets or sets the declaration.
TypeInference TypeInference
Gets or sets the type reference.
static readonly MessageCode ErrorStreamNotFound
Expression Value
Gets or sets the value of the assigment..
Identifier Name
Gets or sets the name.
static readonly MessageCode ErrorExternMemberNotFound
void SetTag(object tagKey, object tagValue)
Sets a tag value associated to this node.
static readonly ParadoxType Streams
static readonly MessageCode ErrorImpossibleVirtualCall
static readonly MessageCode ErrorExternNotClassType
TypeBase ReturnType
Gets or sets the type of the return.
Expression Target
Gets or sets the target.
static readonly MessageCode ErrorMissingAbstract
static readonly MessageCode ErrorMultiDimArray
static readonly MessageCode ErrorStageInitNotClassType
static readonly MessageCode ErrorMixinAsGeneric
static readonly MessageCode ErrorNestedAssignment
static readonly MessageCode ErrorStageOutsideVariable
A member reference in the form {this}.{Name}
static readonly MessageCode ErrorMissingMethod
List< Node > Parameters
Gets or sets the parameters.
static readonly MessageCode ErrorUnnecessaryOverride
static readonly SiliconStudio.Shaders.Ast.StorageQualifier Stage
Stage keyword (stage).
static readonly ParadoxType Output
Base class for all generic types.
Toplevel container of a shader parsing result.
bool Contains(CompositeEnum enumValue)
Determines whether [contains] [the specified enum value].
List< Parameter > Parameters
Gets or sets the parameters.
A reference to a variable.
SiliconStudio.Shaders.Ast.Hlsl.StorageQualifier StorageQualifier
static readonly MessageCode ErrorIndexerNotLiteral
static readonly MessageCode ErrorInterfaceFound
static readonly MessageCode ErrorTechniqueFound
static readonly MessageCode ErrorVariableNameAmbiguity
Qualifier Qualifiers
Gets or sets the storage class.
Identifier Name
Gets or sets the type name.
static readonly Ast.StorageQualifier Extern
Extern modifier.
static readonly MessageCode ErrorImpossibleBaseCall
Expression Target
Gets or sets the this.
static readonly MessageCode ErrorNonStaticReferenceInStaticMethod
static readonly MessageCode ErrorCyclicMethod
static readonly MessageCode ErrorTypedefInMethod
static readonly MessageCode ErrorVarNoTypeFound