![]() |
Paradox Game Engine
v1.0.0 beta06
|
A Type reference analysis is building type references. More...
Public Member Functions | |
| SemanticAnalysis (ParsingResult result) | |
| Initializes a new instance of the SemanticAnalysis class. More... | |
| override void | Run () |
| Runs this instance. More... | |
Protected Member Functions | |
| virtual void | Visit (AssignmentExpression assignmentExpression) |
| Visits the specified assignement expression. More... | |
| virtual void | Visit (BinaryExpression binaryExpression) |
| Visits the specified binary expression. More... | |
| virtual void | Visit (ConditionalExpression conditionalExpression) |
| Visits the specified conditional expression. More... | |
| virtual void | Visit (IndexerExpression indexerExpression) |
| Visits the specified indexer expression. More... | |
| virtual void | ProcessIndexerExpression (IndexerExpression indexerExpression) |
| Find the type of the expression More... | |
| virtual void | Visit (LiteralExpression literalExpression) |
| Visits the specified literal expression. More... | |
| virtual void | Visit (ReturnStatement returnStatement) |
| virtual void | Visit (IfStatement ifStatement) |
| virtual void | ProcessMethodInvocation (MethodInvocationExpression expression, string methodName, List< IDeclaration > declarations) |
| Pres the process method invocation. More... | |
| virtual bool | TestMethodInvocationArgument (TypeBase argTypeBase, TypeBase expectedTypeBase, TypeBase argType, TypeBase expectedType, ref int score) |
| Tests the arguments of the method More... | |
| virtual void | Visit (MethodInvocationExpression expression) |
| Visits the specified method invocation expression. More... | |
| virtual IEnumerable< IDeclaration > | FindDeclarationsFromObject (TypeBase typeBase, string memberName) |
| virtual void | Visit (MemberReferenceExpression memberReference) |
| Visits the specified member reference. More... | |
| virtual MethodDefinition | Visit (MethodDefinition methodDefinition) |
| Visits the specified member reference. More... | |
| virtual void | CommonVisit (MemberReferenceExpression memberReference) |
| Visits the specified member reference. More... | |
| virtual void | Visit (ParenthesizedExpression parenthesizedExpression) |
| Visits the specified parenthesized expression. More... | |
| virtual void | Visit (ExpressionList expressionList) |
| Visits the specified expression list. More... | |
| virtual ArrayType | Visit (ArrayType arrayType) |
| Visits the specified array type. More... | |
| virtual TypeBase | Visit (TypeName typeName) |
| Visits the specified type name. More... | |
| virtual void | Visit (VariableReferenceExpression variableReferenceExpression) |
| Visits the specified variable reference expression. More... | |
| virtual void | Visit (UnaryExpression unaryExpression) |
| Visits the specified unary expression. More... | |
| virtual void | FindMemberTypeReference (StructType structType, MemberReferenceExpression memberReference) |
| Finds the member type reference. More... | |
| virtual void | FindMemberTypeReference (VectorType vectorType, MemberReferenceExpression memberReference) |
| Finds the member type reference. More... | |
| virtual void | FindMemberTypeReference (ScalarType scalarType, MemberReferenceExpression memberReference) |
| Finds the member type reference. More... | |
| TypeBase | ResolveTypeFromDeclaration (IDeclaration declaration) |
| Resolves the type from declaration. More... | |
Protected Member Functions inherited from SiliconStudio.Shaders.Analysis.AnalysisBase | |
| AnalysisBase (ParsingResult result) | |
| Initializes a new instance of the AnalysisBase class. More... | |
| void | Error (MessageCode message, SourceSpan span) |
| Logs an Error with the specified message. More... | |
| void | Error (MessageCode message, SourceSpan span, params object[] parameters) |
| Logs an Error with the specified message. More... | |
| void | Info (string message, SourceSpan span) |
| Logs an Info with the specified message. More... | |
| void | Info (string message, SourceSpan span, params object[] parameters) |
| Logs an Info with the specified message. More... | |
| void | Warning (MessageCode message, SourceSpan span) |
| Logs an Warning with the specified message. More... | |
| void | Warning (MessageCode message, SourceSpan span, params object[] parameters) |
| Logs an Warning with the specified message. More... | |
| virtual TypeBase | GetBinaryImplicitConversionType (SourceSpan span, TypeBase left, TypeBase right, bool isBinaryOperator) |
| Gets the type of the binary implicit conversion. More... | |
| virtual TypeBase | GetMultiplyImplicitConversionType (SourceSpan span, TypeBase left, TypeBase right) |
| Gets the type of the binary implicit conversion. More... | |
| virtual TypeBase | GetDivideImplicitConversionType (SourceSpan span, TypeBase left, TypeBase right) |
| Gets the type of the binary implicit conversion. More... | |
| ScalarType | GetBinaryImplicitScalarConversionType (SourceSpan span, TypeBase left, TypeBase right) |
| Gets the type of the binary implicit scalar conversion. More... | |
Protected Member Functions inherited from SiliconStudio.Shaders.Visitor.ShaderVisitor | |
| ShaderVisitor (bool buildScopeDeclaration, bool useNodeStack) | |
| Initializes a new instance of the ShaderVisitor class. More... | |
| virtual ScopeDeclaration | NewScope (IScopeContainer container=null) |
| virtual Node | Visit (Node node) |
| virtual IEnumerable< IDeclaration > | FindDeclarations (string name) |
| Finds a list of declaration by its name. More... | |
| IDeclaration | FindDeclaration (string name) |
| Finds a declaration by its name. More... | |
| override bool | PreVisitNode (Node node) |
| Called before visiting the node. More... | |
| override void | PostVisitNode (Node node, bool nodeVisited) |
| Called after visiting the node. More... | |
Protected Member Functions inherited from SiliconStudio.Shaders.Visitor.VisitorBase | |
| VisitorBase (bool useNodeStack=false) | |
| Initializes a new instance of the VisitorBase class. More... | |
| void | VisitDynamicList< T > (IList< T > list, Func< T, bool > filter=null) |
| Visits the list. More... | |
| virtual Node | VisitDynamic< T > (T node, bool visitRealType=true) |
| Visits the node. More... | |
Static Protected Attributes | |
| static string | TagBuiltinUserDefined = "TagBuiltinUserDefined" |
Properties | |
| bool | IsSkippingMode [get, set] |
| Gets or sets a value indicating whether the analysis is in skipping mode. More... | |
Properties inherited from SiliconStudio.Shaders.Analysis.AnalysisBase | |
| ParsingResult | ParsingResult [get, set] |
| Gets the parsing result. More... | |
Properties inherited from SiliconStudio.Shaders.Visitor.ShaderVisitor | |
| Node | ParentNode [get] |
| Gets the parent node or null if no parents More... | |
| Stack< ScopeDeclaration > | ScopeStack [get, set] |
| Gets the scope stack. More... | |
Properties inherited from SiliconStudio.Shaders.Visitor.VisitorBase | |
| List< Node > | NodeStack [get, set] |
| Gets or sets the node stack. More... | |
A Type reference analysis is building type references.
Definition at line 16 of file SemanticAnalysis.cs.
| SiliconStudio.Shaders.Analysis.SemanticAnalysis.SemanticAnalysis | ( | ParsingResult | result | ) |
Initializes a new instance of the SemanticAnalysis class.
| result | The result. |
Definition at line 28 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified member reference.
| memberReference | The member reference. |
Reimplemented in SiliconStudio.Shaders.Analysis.Hlsl.HlslSemanticAnalysis.
Definition at line 587 of file SemanticAnalysis.cs.
|
protectedvirtual |
Reimplemented in SiliconStudio.Shaders.Analysis.Hlsl.HlslSemanticAnalysis.
Definition at line 534 of file SemanticAnalysis.cs.
|
protectedvirtual |
Finds the member type reference.
| structType | Type of the struct. |
| memberReference | The member reference. |
Definition at line 735 of file SemanticAnalysis.cs.
|
protectedvirtual |
Finds the member type reference.
| vectorType | Type of the vector. |
| memberReference | The member reference. |
Definition at line 756 of file SemanticAnalysis.cs.
|
protectedvirtual |
Finds the member type reference.
| scalarType | Type of the scalar. |
| memberReference | The member reference. |
Definition at line 776 of file SemanticAnalysis.cs.
|
protectedvirtual |
Find the type of the expression
| indexerExpression | the indexer expression |
Definition at line 149 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Utility.MessageCode.ErrorIndexerType, and SiliconStudio.Shaders.Ast.Node.Span.
|
protectedvirtual |
Pres the process method invocation.
| expression | The expression. |
| methodName | Name of the method. |
| declarations | The declarations. |
Reimplemented in SiliconStudio.Shaders.Analysis.Hlsl.HlslSemanticAnalysis.
Definition at line 239 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Utility.MessageCode.ErrorNoOverloadedMethod.
|
protected |
Resolves the type from declaration.
| declaration | The declaration. |
Definition at line 796 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Ast.TypeInference.Declaration, and SiliconStudio.Shaders.Ast.TypeBase.TypeInference.
|
virtual |
Runs this instance.
Implements SiliconStudio.Shaders.Analysis.AnalysisBase.
Definition at line 45 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Parser.ParsingResult.Shader.
|
protectedvirtual |
Tests the arguments of the method
| argTypeBase | the argument typebase |
| expectedTypeBase | the expected typebase |
| argType | the argument type |
| expectedType | the expected type |
| score | the score of the overload |
Definition at line 403 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Ast.TypeBase.HasDimensions().
|
protectedvirtual |
Visits the specified assignement expression.
| assignmentExpression | The assignement expression. |
Definition at line 55 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified binary expression.
| binaryExpression | The binary expression. |
Definition at line 70 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Ast.Node.Span.
|
protectedvirtual |
Visits the specified conditional expression.
| conditionalExpression | The conditional expression. |
Definition at line 117 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified indexer expression.
| indexerExpression | The indexer expression. |
Definition at line 138 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified literal expression.
| literalExpression | The literal expression. |
Definition at line 187 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Utility.MessageCode.ErrorLiteralType, and SiliconStudio.Shaders.Ast.Node.Span.
|
protectedvirtual |
Definition at line 211 of file SemanticAnalysis.cs.
|
protectedvirtual |
Definition at line 224 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified method invocation expression.
| expression | The method invocation expression. |
Reimplemented in SiliconStudio.Shaders.Analysis.Hlsl.HlslSemanticAnalysis.
Definition at line 478 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Utility.MessageCode.ErrorNoReferencedMethod, SiliconStudio.Shaders.Ast.Node.Span, SiliconStudio.Shaders.Utility.MessageCode.WarningTypeAsConstructor, and SiliconStudio.Shaders.Utility.MessageCode.WarningTypeInferenceUnknownExpression.
|
protectedvirtual |
Visits the specified member reference.
| memberReference | The member reference. |
Definition at line 544 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Utility.MessageCode.ErrorNoTypeReferenceMember, and SiliconStudio.Shaders.Ast.Node.Span.
|
protectedvirtual |
Visits the specified member reference.
| memberReference | The member reference. |
Definition at line 560 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified parenthesized expression.
| parenthesizedExpression | The parenthesized expression. |
Definition at line 604 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified expression list.
| expressionList | The expression list. |
Definition at line 617 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified array type.
| arrayType | Array type. |
Definition at line 630 of file SemanticAnalysis.cs.
References DirectX.Convert().
|
protectedvirtual |
Visits the specified type name.
| typeName | Name of the type. |
Reimplemented in SiliconStudio.Shaders.Analysis.Hlsl.HlslSemanticAnalysis.
Definition at line 661 of file SemanticAnalysis.cs.
References SiliconStudio.Shaders.Utility.MessageCode.ErrorNoTypeReferenceTypename, and SiliconStudio.Shaders.Ast.Node.Span.
|
protectedvirtual |
Visits the specified variable reference expression.
| variableReferenceExpression | The variable reference expression. |
Definition at line 699 of file SemanticAnalysis.cs.
|
protectedvirtual |
Visits the specified unary expression.
| unaryExpression | The unary expression. |
Definition at line 713 of file SemanticAnalysis.cs.
|
staticprotected |
Definition at line 18 of file SemanticAnalysis.cs.
|
getsetprotected |
Gets or sets a value indicating whether the analysis is in skipping mode.
true if the analysis is in skipping mode; otherwise, false.
Definition at line 40 of file SemanticAnalysis.cs.