SynExpr Type
Represents a syntax tree for F# expressions
Union cases
Union case |
Description
|
|
|
Full Usage:
AnonRecd(isStruct, copyInfo, recordFields, range, trivia)
Parameters:
bool
copyInfo : (SynExpr * BlockSeparator) option
recordFields : (SynLongIdent * range option * SynExpr) list
range : range
trivia : SynExprAnonRecdTrivia
|
F# syntax: {| id1=e1; ...; idN=eN |} F# syntax: struct {| id1=e1; ...; idN=eN |}
|
Full Usage:
App(flag, isInfix, funcExpr, argExpr, range)
Parameters:
ExprAtomicFlag
isInfix : bool
funcExpr : SynExpr
argExpr : SynExpr
range : range
|
F# syntax: f x flag: indicates if the application is syntactically atomic, e.g. f.[1] is atomic, but 'f x' is not isInfix is true for the first app of an infix operator, e.g. 1+2 becomes App(App(+, 1), 2), where the inner node is marked isInfix
|
|
Inserted for error recovery
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
DebugPoint(debugPoint, isControlFlow, innerExpr)
Parameters:
DebugPointAtLeafExpr
isControlFlow : bool
innerExpr : SynExpr
|
Debug points arising from computation expressions
|
|
|
Full Usage:
DoBang(expr, range, trivia)
Parameters:
SynExpr
range : range
trivia : SynExprDoBangTrivia
|
F# syntax: do! expr Computation expressions only
|
Full Usage:
DotGet(expr, rangeOfDot, longDotId, range)
Parameters:
SynExpr
rangeOfDot : range
longDotId : SynLongIdent
range : range
|
F# syntax: expr.ident.ident
|
|
|
Full Usage:
DotLambda(expr, range, trivia)
Parameters:
SynExpr
range : range
trivia : SynExprDotLambdaTrivia
|
F# syntax: _.ident.ident
|
Full Usage:
DotNamedIndexedPropertySet(targetExpr, longDotId, argExpr, rhsExpr, range)
Parameters:
SynExpr
longDotId : SynLongIdent
argExpr : SynExpr
rhsExpr : SynExpr
range : range
|
F# syntax: expr.Items (e1) <- e2, rarely used named-property-setter notation, e.g. (stringExpr).Chars(3) <- 'a'
|
Full Usage:
DotSet(targetExpr, longDotId, rhsExpr, range)
Parameters:
SynExpr
longDotId : SynLongIdent
rhsExpr : SynExpr
range : range
|
F# syntax: expr.ident...ident <- expr
|
|
|
|
|
|
|
Full Usage:
For(forDebugPoint, toDebugPoint, ident, equalsRange, identBody, direction, toBody, doBody, range)
Parameters:
DebugPointAtFor
toDebugPoint : DebugPointAtInOrTo
ident : Ident
equalsRange : range option
identBody : SynExpr
direction : bool
toBody : SynExpr
doBody : SynExpr
range : range
|
F# syntax: 'for i = ... to ... do ...'
|
Full Usage:
ForEach(forDebugPoint, inDebugPoint, seqExprOnly, isFromSource, pat, enumExpr, bodyExpr, range)
Parameters:
DebugPointAtFor
inDebugPoint : DebugPointAtInOrTo
seqExprOnly : SeqExprOnly
isFromSource : bool
pat : SynPat
enumExpr : SynExpr
bodyExpr : SynExpr
range : range
|
F# syntax: 'for ... in ... do ...'
|
|
|
|
F# syntax: ident Optimized representation for SynExpr.LongIdent (false, [id], id.idRange)
|
Full Usage:
IfThenElse(ifExpr, thenExpr, elseExpr, spIfToThen, isFromErrorRecovery, range, trivia)
Parameters:
SynExpr
thenExpr : SynExpr
elseExpr : SynExpr option
spIfToThen : DebugPointAtBinding
isFromErrorRecovery : bool
range : range
trivia : SynExprIfThenElseTrivia
|
F# syntax: if expr then expr F# syntax: if expr then expr else expr
|
|
Used in parser error recovery and internally during type checking for translating computation expressions.
|
|
|
|
|
|
|
Full Usage:
InterpolatedString(contents, synStringKind, range)
Parameters:
SynInterpolatedStringPart list
synStringKind : SynStringKind
range : range
|
F# syntax: interpolated string, e.g. "abc{x}" or "abc{x,3}" or "abc{x:N4}" Note the string ranges include the quotes, verbatim markers, dollar sign and braces
|
|
|
Full Usage:
Lambda(fromMethod, inLambdaSeq, args, body, parsedData, range, trivia)
Parameters:
bool
inLambdaSeq : bool
args : SynSimplePats
body : SynExpr
parsedData : (SynPat list * SynExpr) option
range : range
trivia : SynExprLambdaTrivia
|
First bool indicates if lambda originates from a method. Patterns here are always "simple" Second bool indicates if this is a "later" part of an iterated sequence of lambdas parsedData keeps original parsed patterns and expression, prior to transforming to "simple" patterns and iterated lambdas F# syntax: fun pat -> expr
|
|
|
Full Usage:
LetOrUse(isRecursive, isUse, bindings, body, range, trivia)
Parameters:
bool
isUse : bool
bindings : SynBinding list
body : SynExpr
range : range
trivia : SynExprLetOrUseTrivia
|
F# syntax: let pat = expr in expr F# syntax: let f pat1 .. patN = expr in expr F# syntax: let rec f pat1 .. patN = expr in expr F# syntax: use pat = expr in expr
|
Full Usage:
LetOrUseBang(bindDebugPoint, isUse, isFromSource, pat, rhs, andBangs, body, range, trivia)
Parameters:
DebugPointAtBinding
isUse : bool
isFromSource : bool
pat : SynPat
rhs : SynExpr
andBangs : SynExprAndBang list
body : SynExpr
range : range
trivia : SynExprLetOrUseBangTrivia
|
F# syntax: let! pat = expr in expr F# syntax: use! pat = expr in expr F# syntax: let! pat = expr and! ... and! ... and! pat = expr in expr Computation expressions only
|
|
|
Full Usage:
LibraryOnlyStaticOptimization(constraints, expr, optimizedExpr, range)
Parameters:
SynStaticOptimizationConstraint list
expr : SynExpr
optimizedExpr : SynExpr
range : range
|
Only used in FSharp.Core
|
|
|
Full Usage:
LongIdent(isOptional, longDotId, altNameRefCell, range)
Parameters:
bool
longDotId : SynLongIdent
altNameRefCell : SynSimplePatAlternativeIdInfo ref option
range : range
|
F# syntax: ident.ident...ident isOptional: true if preceded by a '?' for an optional named parameter altNameRefCell: Normally 'None' except for some compiler-generated variables in desugaring pattern matching. See SynSimplePat.Id
|
Full Usage:
LongIdentSet(longDotId, expr, range)
Parameters:
SynLongIdent
expr : SynExpr
range : range
|
F# syntax: ident.ident...ident <- expr
|
Full Usage:
Match(matchDebugPoint, expr, clauses, range, trivia)
Parameters:
DebugPointAtBinding
expr : SynExpr
clauses : SynMatchClause list
range : range
trivia : SynExprMatchTrivia
|
F# syntax: match expr with pat1 -> expr | ... | patN -> exprN
|
Full Usage:
MatchBang(matchDebugPoint, expr, clauses, range, trivia)
Parameters:
DebugPointAtBinding
expr : SynExpr
clauses : SynMatchClause list
range : range
trivia : SynExprMatchBangTrivia
|
F# syntax: match! expr with pat1 -> expr | ... | patN -> exprN
|
Full Usage:
MatchLambda(isExnMatch, keywordRange, matchClauses, matchDebugPoint, range)
Parameters:
bool
keywordRange : range
matchClauses : SynMatchClause list
matchDebugPoint : DebugPointAtBinding
range : range
|
F# syntax: function pat1 -> expr | ... | patN -> exprN
|
Full Usage:
NamedIndexedPropertySet(longDotId, expr1, expr2, range)
Parameters:
SynLongIdent
expr1 : SynExpr
expr2 : SynExpr
range : range
|
F# syntax: Type.Items(e1) <- e2, rarely used named-property-setter notation, e.g. Foo.Bar.Chars(3) <- 'a'
|
|
|
|
F# syntax: null
|
Full Usage:
ObjExpr(objType, argOptions, withKeyword, bindings, members, extraImpls, newExprRange, range)
Parameters:
SynType
argOptions : (SynExpr * Ident option) option
withKeyword : range option
bindings : SynBinding list
members : SynMemberDefns
extraImpls : SynInterfaceImpl list
newExprRange : range
range : range
|
F# syntax: { new ... with ... }
|
|
|
Full Usage:
Record(baseInfo, copyInfo, recordFields, range)
Parameters:
(SynType * SynExpr * range * BlockSeparator option * range) option
copyInfo : (SynExpr * BlockSeparator) option
recordFields : SynExprRecordField list
range : range
|
F# syntax: { f1=e1; ...; fn=en } inherit includes location of separator (for tooling) copyOpt contains range of the following WITH part (for tooling) every field includes range of separator after the field (for tooling)
|
Full Usage:
Sequential(debugPoint, isTrueSeq, expr1, expr2, range, trivia)
Parameters:
DebugPointAtSequential
isTrueSeq : bool
expr1 : SynExpr
expr2 : SynExpr
range : range
trivia : SynExprSequentialTrivia
|
F# syntax: expr; expr isTrueSeq: false indicates "let v = a in b; v"
|
Full Usage:
SequentialOrImplicitYield(debugPoint, expr1, expr2, ifNotStmt, range)
Parameters:
DebugPointAtSequential
expr1 : SynExpr
expr2 : SynExpr
ifNotStmt : SynExpr
range : range
|
Used internally during type checking for translating computation expressions.
|
|
|
Full Usage:
TraitCall(supportTys, traitSig, argExpr, range)
Parameters:
SynType
traitSig : SynMemberSig
argExpr : SynExpr
range : range
|
F# syntax: ((type1 or ... or typeN): (member-dig) expr)
|
Full Usage:
TryFinally(tryExpr, finallyExpr, range, tryDebugPoint, finallyDebugPoint, trivia)
Parameters:
SynExpr
finallyExpr : SynExpr
range : range
tryDebugPoint : DebugPointAtTry
finallyDebugPoint : DebugPointAtFinally
trivia : SynExprTryFinallyTrivia
|
F# syntax: try expr finally expr
|
Full Usage:
TryWith(tryExpr, withCases, range, tryDebugPoint, withDebugPoint, trivia)
Parameters:
SynExpr
withCases : SynMatchClause list
range : range
tryDebugPoint : DebugPointAtTry
withDebugPoint : DebugPointAtWith
trivia : SynExprTryWithTrivia
|
F# syntax: try expr with pat -> expr
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
While(whileDebugPoint, whileExpr, doExpr, range)
Parameters:
DebugPointAtWhile
whileExpr : SynExpr
doExpr : SynExpr
range : range
|
F# syntax: 'while ... do ...'
|
Full Usage:
WhileBang(whileDebugPoint, whileExpr, doExpr, range)
Parameters:
DebugPointAtWhile
whileExpr : SynExpr
doExpr : SynExpr
range : range
|
F# syntax: 'while! ... do ...'
|
|
|
|
Instance members
Instance member |
Description
|
Full Usage:
this.IsAddressOf
Returns: bool
|
|
Full Usage:
this.IsAnonRecd
Returns: bool
|
|
Full Usage:
this.IsApp
Returns: bool
|
|
Full Usage:
this.IsArbExprAndThusAlreadyReportedError
Returns: bool
|
Indicates if this expression arises from error recovery
|
Full Usage:
this.IsArbitraryAfterError
Returns: bool
|
|
Full Usage:
this.IsArrayOrList
Returns: bool
|
|
Full Usage:
this.IsArrayOrListComputed
Returns: bool
|
|
Full Usage:
this.IsAssert
Returns: bool
|
|
Full Usage:
this.IsComputationExpr
Returns: bool
|
|
Full Usage:
this.IsConst
Returns: bool
|
|
Full Usage:
this.IsDebugPoint
Returns: bool
|
|
Full Usage:
this.IsDiscardAfterMissingQualificationAfterDot
Returns: bool
|
|
Full Usage:
this.IsDo
Returns: bool
|
|
Full Usage:
this.IsDoBang
Returns: bool
|
|
Full Usage:
this.IsDotGet
Returns: bool
|
|
Full Usage:
this.IsDotIndexedGet
Returns: bool
|
|
Full Usage:
this.IsDotIndexedSet
Returns: bool
|
|
Full Usage:
this.IsDotLambda
Returns: bool
|
|
Full Usage:
this.IsDotNamedIndexedPropertySet
Returns: bool
|
|
Full Usage:
this.IsDotSet
Returns: bool
|
|
Full Usage:
this.IsDowncast
Returns: bool
|
|
Full Usage:
this.IsDynamic
Returns: bool
|
|
Full Usage:
this.IsFixed
Returns: bool
|
|
Full Usage:
this.IsFor
Returns: bool
|
|
Full Usage:
this.IsForEach
Returns: bool
|
|
Full Usage:
this.IsFromParseError
Returns: bool
|
|
Full Usage:
this.IsIdent
Returns: bool
|
|
Full Usage:
this.IsIfThenElse
Returns: bool
|
|
Full Usage:
this.IsImplicitZero
Returns: bool
|
|
Full Usage:
this.IsIndexFromEnd
Returns: bool
|
|
Full Usage:
this.IsIndexRange
Returns: bool
|
|
Full Usage:
this.IsInferredDowncast
Returns: bool
|
|
Full Usage:
this.IsInferredUpcast
Returns: bool
|
|
Full Usage:
this.IsInterpolatedString
Returns: bool
|
|
Full Usage:
this.IsJoinIn
Returns: bool
|
|
Full Usage:
this.IsLambda
Returns: bool
|
|
Full Usage:
this.IsLazy
Returns: bool
|
|
Full Usage:
this.IsLetOrUse
Returns: bool
|
|
Full Usage:
this.IsLetOrUseBang
Returns: bool
|
|
Full Usage:
this.IsLibraryOnlyILAssembly
Returns: bool
|
|
Full Usage:
this.IsLibraryOnlyStaticOptimization
Returns: bool
|
|
Full Usage:
this.IsLibraryOnlyUnionCaseFieldGet
Returns: bool
|
|
Full Usage:
this.IsLibraryOnlyUnionCaseFieldSet
Returns: bool
|
|
Full Usage:
this.IsLongIdent
Returns: bool
|
|
Full Usage:
this.IsLongIdentSet
Returns: bool
|
|
Full Usage:
this.IsMatch
Returns: bool
|
|
Full Usage:
this.IsMatchBang
Returns: bool
|
|
Full Usage:
this.IsMatchLambda
Returns: bool
|
|
Full Usage:
this.IsNamedIndexedPropertySet
Returns: bool
|
|
Full Usage:
this.IsNew
Returns: bool
|
|
Full Usage:
this.IsNull
Returns: bool
|
|
Full Usage:
this.IsObjExpr
Returns: bool
|
|
Full Usage:
this.IsParen
Returns: bool
|
|
Full Usage:
this.IsQuote
Returns: bool
|
|
Full Usage:
this.IsRecord
Returns: bool
|
|
Full Usage:
this.IsSequential
Returns: bool
|
|
Full Usage:
this.IsSequentialOrImplicitYield
Returns: bool
|
|
Full Usage:
this.IsSet
Returns: bool
|
|
Full Usage:
this.IsTraitCall
Returns: bool
|
|
Full Usage:
this.IsTryFinally
Returns: bool
|
|
Full Usage:
this.IsTryWith
Returns: bool
|
|
Full Usage:
this.IsTuple
Returns: bool
|
|
Full Usage:
this.IsTypar
Returns: bool
|
|
Full Usage:
this.IsTypeApp
Returns: bool
|
|
Full Usage:
this.IsTypeTest
Returns: bool
|
|
Full Usage:
this.IsTyped
Returns: bool
|
|
Full Usage:
this.IsUpcast
Returns: bool
|
|
Full Usage:
this.IsWhile
Returns: bool
|
|
Full Usage:
this.IsWhileBang
Returns: bool
|
|
Full Usage:
this.IsYieldOrReturn
Returns: bool
|
|
Full Usage:
this.IsYieldOrReturnFrom
Returns: bool
|
|
|
Gets the syntax range of this construct
|
|
Attempt to get the range of the first token or initial portion only - this is ad-hoc, just a cheap way to improve a certain 'query custom operation' error range
|
|
|