CxExpression
Description
- Derived from
-
CxNode abstract
ICxUsageContainer<CxExpressionUsage>
ICxReference - Extended by
-
CxExpressionBinary sealed
CxExpressionCall sealed
CxExpressionCast sealed
CxExpressionDefault sealed
CxExpressionIf sealed
CxExpressionIndex sealed
CxExpressionLiteral sealed
CxExpressionMember sealed
CxExpressionName sealed
CxExpressionNew sealed
CxExpressionUnary sealed
Abstract base for classes that represent a Code-X expression.
The ICxReference.Resolved property may return the following values:
CxExpression... |Binary
| |Call
| | |Cast
| | | |Default
| | | | |If |Index
| | | | | | |Literal
| | | | | | | |Member
| | | | | | | | |Name
Cx... | | | | | | | | | |New|Unary
--------------------+---+---+---+---+---+---+---+---+---+---+---
Declaration | A | | A | A | A | A | A | C | C | A | A
DeclarationDelegate | | B | | | | | | | | |
Item | | | | | | | | D | D | |
MemberConstructor | | | | | | | | | | B |
MemberMethod | | B | | | | | | | | |
MemberProperty | | | | | | | | E | E | |
MethodGroup | | | | | | | | F | F | |
NamespaceGroup | | | | | | | | G | G | |
Parameter | | | | | | | | | H | |
TypeParameter | | | | | | | | | I | |
Variable | | | | | | | | J | J | |
The cases A .. O are defined as follows:
-
Case
A:
The type declaration that results from resolving the expression type. -
Case
B:
The method or delegate that is invoked by a call expression or the constructor that is called by an object creation expression. -
Case
C:
The type declaration that is referred to by the name / member expression. -
Case
D:
The enumeration item that is referred to by the name / member expression. -
Case
E:
The property that is referred to by the name / member expression or, when inside of the property setter, by the special name expressionvalue. -
Case
F:
The method group that has the same name as indicated by the name / member expression. -
Case
G:
The group of those namespaces that match the name / member expression in the context of the enclosing code unit. -
Case
H:
The parameter of a constructor, delegate or method that is referred to by the name expression. -
Case
I:
The type parameter of a class, delegate, interface, struct or method that is referred to by the name expression. -
Case
J:
The variable of a constant or field member that is referred to by the name / member expression or the variable in a for loop, a catch block or a statement block that is referred to by the name expression.
There is no expression for explicitly wrapping another expression in braces, i.e. (expr). The necessity for braces may be queried with NeedsBraces.
Public / Constants
Public / Constructors
FromSource
Parses the given expression.
- ValidatingException
-
If the syntax of source in is invalid.
- See also
Public / Methods
WriteSourceCodeWithBraces
Produces source code by feeding the given source code writer.
- IOException
-
If an I/O error occurs while emitting source code to writer in.
Public / Attributes
Precedence
The expression precedence value.
- See also
-
CxExpression.PrecedenceAdditive
CxExpression.PrecedenceAssignment
CxExpression.PrecedenceConditional
CxExpression.PrecedenceConditionalAnd
CxExpression.PrecedenceConditionalOr
CxExpression.PrecedenceEquality
CxExpression.PrecedenceLogicalAnd
CxExpression.PrecedenceLogicalOr
CxExpression.PrecedenceLogicalXOr
CxExpression.PrecedenceMultiplicative
CxExpression.PrecedencePrimary
CxExpression.PrecedenceRelational
CxExpression.PrecedenceShift
CxExpression.PrecedenceUnary
Protected / Methods
ComputeExpressionType
Computes the expression type from the given resolved node.
Computes the expression type.
This method is called from PsiNode.OnResolved.
- See also