ParseHelpers Module
Types
| Type | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The error raised by the parse_error_rich function, which is called by the parser engine when a syntax error occurs. The first object is the ParseErrorContext which contains a dump of information about the grammar at the point where the error occurred, e.g. what tokens are valid to shift next at that point in the grammar. This information is processed in CompileOps.fs. |
Functions and values
| Function or value |
Description
|
Full Usage:
ParseAssemblyCodeInstructions s reportLibraryOnlyFeatures langVersion m
Parameters:
string
reportLibraryOnlyFeatures : bool
langVersion : LanguageVersion
m : range
Returns: ILInstr[]
|
|
Full Usage:
ParseAssemblyCodeType s reportLibraryOnlyFeatures langVersion m
Parameters:
string
reportLibraryOnlyFeatures : bool
langVersion : LanguageVersion
m : range
Returns: ILType
|
|
|
|
|
|
Full Usage:
appendValToLeadingKeyword mVal leadingKeyword
Parameters:
range
leadingKeyword : SynLeadingKeyword
Returns: SynLeadingKeyword
|
|
|
|
Full Usage:
checkForMultipleAugmentations m a1 a2
Parameters:
range
a1 : 'a list
a2 : 'a list
Returns: 'a list
Type parameters: 'a |
|
Full Usage:
debugPrint s
Parameters:
'a
Type parameters: 'a |
|
|
|
Full Usage:
grabXmlDoc (parseState, optAttributes, elemIdx)
Parameters:
IParseState
optAttributes : SynAttributeList list
elemIdx : int
Returns: PreXmlDoc
|
|
Full Usage:
grabXmlDocAtRangeStart (parseState, optAttributes, range)
Parameters:
IParseState
optAttributes : SynAttributeList list
range : range
Returns: PreXmlDoc
|
|
|
|
|
|
|
|
Full Usage:
mkAbstractMember parseState attrs accessBeforeKeyword (abstractMemberFlags, arg4) accessBeforeId mInline id typeParams (typeWithConstraints, arg9) (accessors, arg10)
Parameters:
IParseState
attrs : SynAttributeList list
accessBeforeKeyword : SynAccess option
abstractMemberFlags : SynMemberKind -> SynMemberFlags
arg4 : SynLeadingKeyword
accessBeforeId : SynAccess option
mInline : range option
id : SynIdent
typeParams : SynValTyparDecls
typeWithConstraints : SynType
arg10 : SynValInfo
accessors : range option
arg12 : SynMemberKind * GetSetKeywords option * SynAccess option * SynAccess option
Returns: SynMemberDefn list
|
|
Full Usage:
mkAndBang (mKeyword, pat, returnInfo, rhs, mWhole, mEquals)
Parameters:
range
pat : SynPat
returnInfo : SynBindingReturnInfo option
rhs : SynExpr
mWhole : range
mEquals : range
Returns: SynBinding
|
|
Full Usage:
mkAutoPropDefn mVal access ident typ mEquals expr (accessors, arg7) xmlDoc attribs (flags, arg10) rangeStart
Parameters:
range
access : SynAccess option
ident : Ident
typ : SynType option
mEquals : range option
expr : SynExpr
accessors : range option
arg7 : SynMemberKind * GetSetKeywords option * SynAccess option * SynAccess option
xmlDoc : PreXmlDoc
attribs : SynAttributes
flags : SynMemberKind -> SynMemberFlags
arg11 : SynLeadingKeyword
rangeStart : range
Returns: SynMemberDefn
|
|
Full Usage:
mkClassMemberLocalBindings (isStatic, initialRangeOpt, attrs, vis, bindingSet, mIn)
Parameters:
bool
initialRangeOpt : range option
attrs : SynAttributes
vis : SynAccess option
bindingSet : BindingSet
mIn : range option
Returns: SynMemberDefn
|
|
Full Usage:
mkDefnBindings (mWhole, arg1, attrs, vis, attrsm, mIn)
Parameters:
range
arg1 : BindingSet
attrs : SynAttributes
vis : SynAccess option
attrsm : range
mIn : range option
Returns: SynModuleDecl list
|
|
Full Usage:
mkInterpolatedStringFillParts (litText, litRange, fill)
Parameters: Returns: SynInterpolatedStringPart list
|
Build the [String literal; FillExpr hole] pair for one interpolation hole, splitting the '{x,n}' alignment out of its tuple encoding and peeling a trailing printf specifier off the literal onto the hole.
|
Full Usage:
mkLetBangExpression (mIn, mWhole, body, bangInfo)
Parameters:
range option
mWhole : range
body : SynExpr
bangInfo : SynPat * SynBindingReturnInfo option * SynExpr * SynBinding list * SynLeadingKeyword * range option * bool
Returns: SynExpr
|
Helper for creating let!/use! expressions Handles 'let!' and 'use!'
|
Full Usage:
mkLetExpression (mIn, mWhole, body, bindingInfo)
Parameters:
range option
mWhole : range
body : SynExpr
bindingInfo : BindingSet
Returns: SynExpr
|
Creates SynExpr.LetOrUse based on isBang parameter Handles 'let' and 'use'
|
Full Usage:
mkMatchClauses (patternAndGuard, arg1) (patternResult, arg2) mNextBar nextClauses mLastOuter
Parameters:
SynPat
arg1 : SynExpr option
patternResult : range option
arg3 : SynExpr
mNextBar : range option
nextClauses : (range option -> SynMatchClause list * range) option
mLastOuter : range option
Returns: range option -> SynMatchClause list * range
|
|
Full Usage:
mkMatchClausesRecoverMissingResult (patternAndGuard, arg1) exprDebugString mExpr mNextBar nextClauses mLastOuter
Parameters:
SynPat
arg1 : SynExpr option
exprDebugString : string
mExpr : range option
mNextBar : range option
nextClauses : (range option -> SynMatchClause list * range) option
mLastOuter : range option
Returns: range option -> SynMatchClause list * range
|
|
|
|
|
|
|
|
Full Usage:
mkSynField parseState idOpt t isMutable vis attributes mStatic rangeStart leadingKeyword
Parameters:
IParseState
idOpt : Ident option
t : SynType option
isMutable : range option
vis : SynAccess option
attributes : SynAttributeList list
mStatic : range option
rangeStart : range
leadingKeyword : SynLeadingKeyword option
Returns: SynField
|
|
Full Usage:
mkSynMemberDefnGetSet parseState opt_inline mWith classDefnMemberGetSetElements mAnd mWhole propertyNameBindingPat optPropertyType visNoLongerUsed (flagsBuilderAndLeadingKeyword, arg10) attrs rangeStart
Parameters:
IParseState
opt_inline : range option
mWith : range
classDefnMemberGetSetElements : (range option * SynAttributeList list * (SynPat * range) * (range option * SynReturnInfo) option * range option * SynExpr * range) list
mAnd : range option
mWhole : range
propertyNameBindingPat : SynPat
optPropertyType : (range option * SynReturnInfo) option
visNoLongerUsed : SynAccess option
flagsBuilderAndLeadingKeyword : SynMemberKind -> SynMemberFlags
arg10 : SynLeadingKeyword
attrs : SynAttributeList list
rangeStart : range
Returns: SynMemberDefn list
|
|
|
|
Full Usage:
mkSynTypeTuple elementTypes
Parameters:
SynTupleTypeSegment list
Returns: SynType
|
|
Full Usage:
mkSynUnionCase attributes access id kind mDecl arg6
Parameters:
SynAttributes
access : SynAccess option
id : SynIdent
kind : SynUnionCaseKind
mDecl : range
arg5 : PreXmlDoc * range
Returns: SynUnionCase
|
|
|
|
Full Usage:
mkValField parseState mVal isMutable access idOpt typ rangeStart arg8 arg9
Parameters:
IParseState
mVal : range
isMutable : range option
access : SynAccess option
idOpt : Ident option
typ : SynType option
rangeStart : range
arg7 : SynAttributes
arg8 : range option
Returns: SynMemberDefn
|
|
|
|
Full Usage:
peelTrailingPrintfSpecifier litText
Parameters:
string
Returns: string * string option
|
Peel a trailing printf specifier (e.g. "%d") off an interpolated-string literal that precedes a hole, returning the literal without it and the specifier text. '%%' is a literal escape.
|
|
|
|
|
|
|
Full Usage:
rebindRanges first fields lastSep
Parameters:
RecordBinding
fields : (RecordBinding * BlockSeparator option) list
lastSep : BlockSeparator option
Returns: SynExprRecordFieldOrSpread list
|
|
|
|
|
|
|
|
|
|
Full Usage:
warningStringOfCoords line column
Parameters:
int
column : int
Returns: string
|
|
|
|
Type extensions
| Type extension |
Description
|
|
fantomas