Header menu logo fantomas

SynPat Type

Represents a syntax tree for an F# pattern

Union cases

Union case Description

Ands(pats, range)

Full Usage: Ands(pats, range)

Parameters:

A conjunctive pattern 'pat1 & pat2'

pats : SynPat list
range : range

ArrayOrList(isArray, elementPats, range)

Full Usage: ArrayOrList(isArray, elementPats, range)

Parameters:
    isArray : bool
    elementPats : SynPat list
    range : range

An array or a list as a pattern

isArray : bool
elementPats : SynPat list
range : range

As(lhsPat, rhsPat, range)

Full Usage: As(lhsPat, rhsPat, range)

Parameters:

A conjunctive pattern 'pat1 as pat2'

lhsPat : SynPat
rhsPat : SynPat
range : range

Attrib(pat, attributes, range)

Full Usage: Attrib(pat, attributes, range)

Parameters:

An attributed pattern, used in argument or declaration position

pat : SynPat
attributes : SynAttributes
range : range

Const(constant, range)

Full Usage: Const(constant, range)

Parameters:

A constant in a pattern

constant : SynConst
range : range

FromParseError(pat, range)

Full Usage: FromParseError(pat, range)

Parameters:

A pattern arising from a parse error

pat : SynPat
range : range

InstanceMember(thisId, memberId, toolingId, accessibility, range)

Full Usage: InstanceMember(thisId, memberId, toolingId, accessibility, range)

Parameters:

Used internally in the type checker

thisId : Ident
memberId : Ident
toolingId : Ident option
accessibility : SynAccess option
range : range

IsInst(pat, range)

Full Usage: IsInst(pat, range)

Parameters:

A type test pattern ':? type '

pat : SynType
range : range

ListCons(lhsPat, rhsPat, range, trivia)

Full Usage: ListCons(lhsPat, rhsPat, range, trivia)

Parameters:

A conjunctive pattern 'pat1 :: pat2'

lhsPat : SynPat
rhsPat : SynPat
range : range
trivia : SynPatListConsTrivia

LongIdent(longDotId, extraId, typarDecls, argPats, accessibility, range)

Full Usage: LongIdent(longDotId, extraId, typarDecls, argPats, accessibility, range)

Parameters:

A long identifier pattern possibly with argument patterns

longDotId : SynLongIdent
extraId : Ident option
typarDecls : SynValTyparDecls option
argPats : SynArgPats
accessibility : SynAccess option
range : range

Named(ident, isThisVal, accessibility, range)

Full Usage: Named(ident, isThisVal, accessibility, range)

Parameters:

A name pattern 'ident'

ident : SynIdent
isThisVal : bool
accessibility : SynAccess option
range : range

Null range

Full Usage: Null range

Parameters:

The 'null' pattern

range : range

OptionalVal(ident, range)

Full Usage: OptionalVal(ident, range)

Parameters:

'?id' -- for optional argument names

ident : Ident
range : range

Or(lhsPat, rhsPat, range, trivia)

Full Usage: Or(lhsPat, rhsPat, range, trivia)

Parameters:

A disjunctive pattern 'pat1 | pat2'

lhsPat : SynPat
rhsPat : SynPat
range : range
trivia : SynPatOrTrivia

Paren(pat, range)

Full Usage: Paren(pat, range)

Parameters:

A parenthesized pattern

pat : SynPat
range : range

QuoteExpr(expr, range)

Full Usage: QuoteExpr(expr, range)

Parameters:

<@ expr @>, used for active pattern arguments

expr : SynExpr
range : range

Record(fieldPats, range)

Full Usage: Record(fieldPats, range)

Parameters:

A record pattern

fieldPats : ((LongIdent * Ident) * range option * SynPat) list
range : range

Tuple(isStruct, elementPats, commaRanges, range)

Full Usage: Tuple(isStruct, elementPats, commaRanges, range)

Parameters:
    isStruct : bool
    elementPats : SynPat list
    commaRanges : range list
    range : range

A tuple pattern

isStruct : bool
elementPats : SynPat list
commaRanges : range list
range : range

Typed(pat, targetType, range)

Full Usage: Typed(pat, targetType, range)

Parameters:

A typed pattern 'pat : type'

pat : SynPat
targetType : SynType
range : range

Wild range

Full Usage: Wild range

Parameters:

A wildcard '_' in a pattern

range : range

Instance members

Instance member Description

this.Range

Full Usage: this.Range

Returns: range

Gets the syntax range of this construct

Returns: range

Type something to start searching.