未验证 提交 db4bf11c 编写于 作者: D Don Syme 提交者: GitHub

Format src/Compiler/SyntaxTree (#13237)

* adjust settings

* adjust file

* adjust settings

* adjust code

* apply formatting
上级 1632f460
......@@ -22,10 +22,13 @@ src/Compiler/Legacy/**/*.fs
src/Compiler/Optimize/**/*.fs
src/Compiler/Service/**/*.fs
src/Compiler/Symbols/**/*.fs
src/Compiler/SyntaxTree/**/*.fs
src/Compiler/TypedTree/**/*.fs
src/Microsoft.FSharp.Compiler/**/*.fs
# Explicitly unformatted file that needs more care to get it to format well
src/Compiler/SyntaxTree/LexFilter.fs
# Fantomas limitations on implementation files in FSharp.Core (to investigate)
src/FSharp.Core/array2.fs
......
......@@ -25,30 +25,28 @@ open Internal.Utilities.Text.Parsing
/// 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.
[<NoEquality; NoComparison>]
exception SyntaxError of obj (* ParseErrorContext<_> *) * range: range
exception SyntaxError of obj (* ParseErrorContext<_> *) * range: range
exception IndentationProblem of string * range
let warningStringOfCoords line column =
sprintf "(%d:%d)" line (column + 1)
let warningStringOfCoords line column = sprintf "(%d:%d)" line (column + 1)
let warningStringOfPos (p: pos) =
warningStringOfCoords p.Line p.Column
let warningStringOfPos (p: pos) = warningStringOfCoords p.Line p.Column
//------------------------------------------------------------------------
// Parsing: getting positions from the lexer
//------------------------------------------------------------------------
/// Get an F# compiler position from a lexer position
let posOfLexPosition (p: Position) =
mkPos p.Line p.Column
let posOfLexPosition (p: Position) = mkPos p.Line p.Column
/// Get an F# compiler range from a lexer range
let mkSynRange (p1: Position) (p2: Position) =
mkFileIndexRange p1.FileIndex (posOfLexPosition p1) (posOfLexPosition p2)
type LexBuffer<'Char> with
member lexbuf.LexemeRange = mkSynRange lexbuf.StartPos lexbuf.EndPos
member lexbuf.LexemeRange = mkSynRange lexbuf.StartPos lexbuf.EndPos
/// Get the range corresponding to the result of a grammar rule while it is being reduced
let lhs (parseState: IParseState) =
......@@ -71,6 +69,7 @@ type IParseState with
member x.SynArgNameGenerator =
let key = "SynArgNameGenerator"
let bls = x.LexBuffer.BufferLocalStore
let gen =
match bls.TryGetValue key with
| true, gen -> gen
......@@ -78,6 +77,7 @@ type IParseState with
let gen = box (SynArgNameGenerator())
bls[key] <- gen
gen
gen :?> SynArgNameGenerator
/// Reset the generator used for compiler-generated argument names.
......@@ -97,13 +97,13 @@ module LexbufLocalXmlDocStore =
| true, collector -> collector
| _ ->
let collector = box (XmlDocCollector())
lexbuf.BufferLocalStore[xmlDocKey] <- collector
lexbuf.BufferLocalStore[ xmlDocKey ] <- collector
collector
|> unbox<XmlDocCollector>
let ClearXmlDoc (lexbuf: Lexbuf) =
lexbuf.BufferLocalStore[xmlDocKey] <- box (XmlDocCollector())
lexbuf.BufferLocalStore[ xmlDocKey ] <- box (XmlDocCollector())
/// Called from the lexer to save a single line of XML doc comment.
let SaveXmlDocLine (lexbuf: Lexbuf, lineText, range: range) =
......@@ -132,13 +132,12 @@ module LexbufLocalXmlDocStore =
/// Called from the parser each time we parse a construct that marks the end of an XML doc comment range,
/// e.g. a 'type' declaration. The markerRange is the range of the keyword that delimits the construct.
let GrabXmlDocBeforeMarker (lexbuf: Lexbuf, markerRange: range) =
let GrabXmlDocBeforeMarker (lexbuf: Lexbuf, markerRange: range) =
match lexbuf.BufferLocalStore.TryGetValue xmlDocKey with
| true, collector ->
let collector = unbox<XmlDocCollector>(collector)
let collector = unbox<XmlDocCollector> (collector)
PreXmlDoc.CreateFromGrabPoint(collector, markerRange.Start)
| _ ->
PreXmlDoc.Empty
| _ -> PreXmlDoc.Empty
let ReportInvalidXmlDocPositions (lexbuf: Lexbuf) =
let collector = getCollector lexbuf
......@@ -162,20 +161,21 @@ type LexerIfdefStack = LexerIfdefStackEntries
/// it reaches end of line or eof. The options are to continue with 'token' function
/// or to continue with 'skip' function.
type LexerEndlineContinuation =
| Token
| Token
| Skip of int * range: range
type LexerIfdefExpression =
| IfdefAnd of LexerIfdefExpression*LexerIfdefExpression
| IfdefOr of LexerIfdefExpression*LexerIfdefExpression
| IfdefAnd of LexerIfdefExpression * LexerIfdefExpression
| IfdefOr of LexerIfdefExpression * LexerIfdefExpression
| IfdefNot of LexerIfdefExpression
| IfdefId of string
let rec LexerIfdefEval (lookup: string -> bool) = function
| IfdefAnd (l, r) -> (LexerIfdefEval lookup l) && (LexerIfdefEval lookup r)
| IfdefOr (l, r) -> (LexerIfdefEval lookup l) || (LexerIfdefEval lookup r)
| IfdefNot e -> not (LexerIfdefEval lookup e)
| IfdefId id -> lookup id
let rec LexerIfdefEval (lookup: string -> bool) =
function
| IfdefAnd (l, r) -> (LexerIfdefEval lookup l) && (LexerIfdefEval lookup r)
| IfdefOr (l, r) -> (LexerIfdefEval lookup l) || (LexerIfdefEval lookup r)
| IfdefNot e -> not (LexerIfdefEval lookup e)
| IfdefId id -> lookup id
/// Ifdef F# lexer/parser state, held in the BufferLocalStore for the lexer.
/// Used to capture #if, #else and #endif as syntax trivia.
......@@ -183,47 +183,47 @@ module LexbufIfdefStore =
// The key into the BufferLocalStore used to hold the compiler directives
let private ifDefKey = "Ifdef"
let private getStore (lexbuf: Lexbuf): ResizeArray<ConditionalDirectiveTrivia> =
let private getStore (lexbuf: Lexbuf) : ResizeArray<ConditionalDirectiveTrivia> =
match lexbuf.BufferLocalStore.TryGetValue ifDefKey with
| true, store -> store
| _ ->
let store = box (ResizeArray<ConditionalDirectiveTrivia>())
lexbuf.BufferLocalStore[ifDefKey] <- store
lexbuf.BufferLocalStore[ ifDefKey ] <- store
store
|> unbox<ResizeArray<ConditionalDirectiveTrivia>>
let private mkRangeWithoutLeadingWhitespace (lexed:string) (m:range): range =
let startColumn = lexed.Length - lexed.TrimStart().Length
mkFileIndexRange m.FileIndex (mkPos m.StartLine startColumn) m.End
let SaveIfHash (lexbuf: Lexbuf, lexed:string, expr: LexerIfdefExpression, range: range) =
let private mkRangeWithoutLeadingWhitespace (lexed: string) (m: range) : range =
let startColumn = lexed.Length - lexed.TrimStart().Length
mkFileIndexRange m.FileIndex (mkPos m.StartLine startColumn) m.End
let SaveIfHash (lexbuf: Lexbuf, lexed: string, expr: LexerIfdefExpression, range: range) =
let store = getStore lexbuf
let expr =
let rec visit (expr: LexerIfdefExpression) : IfDirectiveExpression =
match expr with
| LexerIfdefExpression.IfdefAnd(l,r) -> IfDirectiveExpression.And(visit l, visit r)
| LexerIfdefExpression.IfdefOr(l, r) -> IfDirectiveExpression.Or(visit l, visit r)
| LexerIfdefExpression.IfdefAnd (l, r) -> IfDirectiveExpression.And(visit l, visit r)
| LexerIfdefExpression.IfdefOr (l, r) -> IfDirectiveExpression.Or(visit l, visit r)
| LexerIfdefExpression.IfdefNot e -> IfDirectiveExpression.Not(visit e)
| LexerIfdefExpression.IfdefId id -> IfDirectiveExpression.Ident id
visit expr
let m = mkRangeWithoutLeadingWhitespace lexed range
store.Add(ConditionalDirectiveTrivia.If(expr, m))
let SaveElseHash (lexbuf: Lexbuf, lexed:string, range: range) =
let SaveElseHash (lexbuf: Lexbuf, lexed: string, range: range) =
let store = getStore lexbuf
let m = mkRangeWithoutLeadingWhitespace lexed range
store.Add(ConditionalDirectiveTrivia.Else(m))
let SaveEndIfHash (lexbuf: Lexbuf, lexed:string, range: range) =
let SaveEndIfHash (lexbuf: Lexbuf, lexed: string, range: range) =
let store = getStore lexbuf
let m = mkRangeWithoutLeadingWhitespace lexed range
store.Add(ConditionalDirectiveTrivia.EndIf(m))
let GetTrivia (lexbuf: Lexbuf): ConditionalDirectiveTrivia list =
let GetTrivia (lexbuf: Lexbuf) : ConditionalDirectiveTrivia list =
let store = getStore lexbuf
Seq.toList store
......@@ -232,12 +232,12 @@ module LexbufCommentStore =
// The key into the BufferLocalStore used to hold the compiler directives
let private commentKey = "Comments"
let private getStore (lexbuf: Lexbuf): ResizeArray<CommentTrivia> =
let private getStore (lexbuf: Lexbuf) : ResizeArray<CommentTrivia> =
match lexbuf.BufferLocalStore.TryGetValue commentKey with
| true, store -> store
| _ ->
let store = box (ResizeArray<CommentTrivia>())
lexbuf.BufferLocalStore[commentKey] <- store
lexbuf.BufferLocalStore[ commentKey ] <- store
store
|> unbox<ResizeArray<CommentTrivia>>
......@@ -251,11 +251,11 @@ module LexbufCommentStore =
let m = unionRanges startRange endRange
store.Add(CommentTrivia.BlockComment(m))
let GetComments (lexbuf: Lexbuf): CommentTrivia list =
let GetComments (lexbuf: Lexbuf) : CommentTrivia list =
let store = getStore lexbuf
Seq.toList store
let ClearComments (lexbuf: Lexbuf): unit =
let ClearComments (lexbuf: Lexbuf) : unit =
lexbuf.BufferLocalStore.Remove(commentKey) |> ignore
//------------------------------------------------------------------------
......@@ -270,13 +270,39 @@ type LexerStringStyle =
[<RequireQualifiedAccess; Struct>]
type LexerStringKind =
{ IsByteString: bool
IsInterpolated: bool
IsInterpolatedFirst: bool }
static member String = { IsByteString = false; IsInterpolated = false; IsInterpolatedFirst=false }
static member ByteString = { IsByteString = true; IsInterpolated = false; IsInterpolatedFirst=false }
static member InterpolatedStringFirst = { IsByteString = false; IsInterpolated = true; IsInterpolatedFirst=true }
static member InterpolatedStringPart = { IsByteString = false; IsInterpolated = true; IsInterpolatedFirst=false }
{
IsByteString: bool
IsInterpolated: bool
IsInterpolatedFirst: bool
}
static member String =
{
IsByteString = false
IsInterpolated = false
IsInterpolatedFirst = false
}
static member ByteString =
{
IsByteString = true
IsInterpolated = false
IsInterpolatedFirst = false
}
static member InterpolatedStringFirst =
{
IsByteString = false
IsInterpolated = true
IsInterpolatedFirst = true
}
static member InterpolatedStringPart =
{
IsByteString = false
IsInterpolated = true
IsInterpolatedFirst = false
}
/// Represents the degree of nesting of '{..}' and the style of the string to continue afterwards, in an interpolation fill.
/// Nesting counters and styles of outer interpolating strings are pushed on this stack.
......@@ -291,36 +317,46 @@ type LexerInterpolatedStringNesting = (int * LexerStringStyle * range) list
type LexerContinuation =
| Token of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting
| IfDefSkip of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * int * range: range
| String of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * style: LexerStringStyle * kind: LexerStringKind * range: range
| String of
ifdef: LexerIfdefStackEntries *
nesting: LexerInterpolatedStringNesting *
style: LexerStringStyle *
kind: LexerStringKind *
range: range
| Comment of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * int * range: range
| SingleLineComment of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * int * range: range
| StringInComment of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * style: LexerStringStyle * int * range: range
| StringInComment of
ifdef: LexerIfdefStackEntries *
nesting: LexerInterpolatedStringNesting *
style: LexerStringStyle *
int *
range: range
| MLOnly of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * range: range
| EndLine of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * LexerEndlineContinuation
static member Default = LexCont.Token([],[])
static member Default = LexCont.Token([], [])
member x.LexerIfdefStack =
match x with
| LexCont.Token (ifdef=ifd)
| LexCont.IfDefSkip (ifdef=ifd)
| LexCont.String (ifdef=ifd)
| LexCont.Comment (ifdef=ifd)
| LexCont.SingleLineComment (ifdef=ifd)
| LexCont.StringInComment (ifdef=ifd)
| LexCont.EndLine (ifdef=ifd)
| LexCont.MLOnly (ifdef=ifd) -> ifd
| LexCont.Token (ifdef = ifd)
| LexCont.IfDefSkip (ifdef = ifd)
| LexCont.String (ifdef = ifd)
| LexCont.Comment (ifdef = ifd)
| LexCont.SingleLineComment (ifdef = ifd)
| LexCont.StringInComment (ifdef = ifd)
| LexCont.EndLine (ifdef = ifd)
| LexCont.MLOnly (ifdef = ifd) -> ifd
member x.LexerInterpStringNesting =
match x with
| LexCont.Token (nesting=nesting)
| LexCont.IfDefSkip (nesting=nesting)
| LexCont.String (nesting=nesting)
| LexCont.Comment (nesting=nesting)
| LexCont.SingleLineComment (nesting=nesting)
| LexCont.StringInComment (nesting=nesting)
| LexCont.EndLine (nesting=nesting)
| LexCont.MLOnly (nesting=nesting) -> nesting
| LexCont.Token (nesting = nesting)
| LexCont.IfDefSkip (nesting = nesting)
| LexCont.String (nesting = nesting)
| LexCont.Comment (nesting = nesting)
| LexCont.SingleLineComment (nesting = nesting)
| LexCont.StringInComment (nesting = nesting)
| LexCont.EndLine (nesting = nesting)
| LexCont.MLOnly (nesting = nesting) -> nesting
and LexCont = LexerContinuation
......@@ -328,44 +364,42 @@ and LexCont = LexerContinuation
// Parse IL assembly code
//------------------------------------------------------------------------
let ParseAssemblyCodeInstructions s reportLibraryOnlyFeatures langVersion m : IL.ILInstr[] =
let ParseAssemblyCodeInstructions s reportLibraryOnlyFeatures langVersion m : IL.ILInstr[] =
#if NO_INLINE_IL_PARSER
ignore s
ignore isFeatureSupported
errorR(Error((193, "Inline IL not valid in a hosted environment"), m))
[| |]
errorR (Error((193, "Inline IL not valid in a hosted environment"), m))
[||]
#else
try
AsciiParser.ilInstrs
AsciiLexer.token
(StringAsLexbuf(reportLibraryOnlyFeatures, langVersion, s))
AsciiParser.ilInstrs AsciiLexer.token (StringAsLexbuf(reportLibraryOnlyFeatures, langVersion, s))
with _ ->
errorR(Error(FSComp.SR.astParseEmbeddedILError(), m)); [||]
errorR (Error(FSComp.SR.astParseEmbeddedILError (), m))
[||]
#endif
let ParseAssemblyCodeType s reportLibraryOnlyFeatures langVersion m =
ignore s
#if NO_INLINE_IL_PARSER
errorR(Error((193, "Inline IL not valid in a hosted environment"), m))
errorR (Error((193, "Inline IL not valid in a hosted environment"), m))
IL.PrimaryAssemblyILGlobals.typ_Object
#else
try
AsciiParser.ilType
AsciiLexer.token
(StringAsLexbuf(reportLibraryOnlyFeatures, langVersion, s))
AsciiParser.ilType AsciiLexer.token (StringAsLexbuf(reportLibraryOnlyFeatures, langVersion, s))
with RecoverableParseError ->
errorR(Error(FSComp.SR.astParseEmbeddedILTypeError(), m));
IL.PrimaryAssemblyILGlobals.typ_Object
errorR (Error(FSComp.SR.astParseEmbeddedILTypeError (), m))
IL.PrimaryAssemblyILGlobals.typ_Object
#endif
let grabXmlDocAtRangeStart(parseState: IParseState, optAttributes: SynAttributeList list, range: range) =
let grabXmlDocAtRangeStart (parseState: IParseState, optAttributes: SynAttributeList list, range: range) =
let grabPoint =
match optAttributes with
| [] -> range
| h :: _ -> h.Range
LexbufLocalXmlDocStore.GrabXmlDocBeforeMarker(parseState.LexBuffer, grabPoint)
let grabXmlDoc(parseState: IParseState, optAttributes: SynAttributeList list, elemIdx) =
grabXmlDocAtRangeStart(parseState, optAttributes, rhs parseState elemIdx)
let grabXmlDoc (parseState: IParseState, optAttributes: SynAttributeList list, elemIdx) =
grabXmlDocAtRangeStart (parseState, optAttributes, rhs parseState elemIdx)
......@@ -7,21 +7,21 @@ open FSharp.Compiler.Text
[<RequireQualifiedAccess; NoEquality; NoComparison>]
type IdentTrivia =
| OriginalNotation of text: string
| OriginalNotationWithParen of leftParenRange: range * text:string * rightParenRange: range
| OriginalNotationWithParen of leftParenRange: range * text: string * rightParenRange: range
| HasParenthesis of leftParenRange: range * rightParenRange: range
[<RequireQualifiedAccess; NoEquality; NoComparison>]
type ConditionalDirectiveTrivia =
| If of expr:IfDirectiveExpression * range:range
| Else of range:range
| EndIf of range:range
| If of expr: IfDirectiveExpression * range: range
| Else of range: range
| EndIf of range: range
and [<RequireQualifiedAccess; NoEquality; NoComparison>] IfDirectiveExpression =
| And of IfDirectiveExpression * IfDirectiveExpression
| Or of IfDirectiveExpression * IfDirectiveExpression
| Not of IfDirectiveExpression
| Ident of string
[<RequireQualifiedAccess; NoEquality; NoComparison>]
type CommentTrivia =
| LineComment of range: range
......@@ -29,69 +29,92 @@ type CommentTrivia =
[<NoEquality; NoComparison>]
type ParsedImplFileInputTrivia =
{ ConditionalDirectives: ConditionalDirectiveTrivia list
CodeComments: CommentTrivia list }
{
ConditionalDirectives: ConditionalDirectiveTrivia list
CodeComments: CommentTrivia list
}
[<NoEquality; NoComparison>]
type ParsedSigFileInputTrivia =
{ ConditionalDirectives: ConditionalDirectiveTrivia list
CodeComments: CommentTrivia list }
{
ConditionalDirectives: ConditionalDirectiveTrivia list
CodeComments: CommentTrivia list
}
[<NoEquality; NoComparison>]
type SynExprTryWithTrivia =
{ TryKeyword: range
TryToWithRange: range
WithKeyword: range
WithToEndRange: range }
{
TryKeyword: range
TryToWithRange: range
WithKeyword: range
WithToEndRange: range
}
[<NoEquality; NoComparison>]
type SynExprTryFinallyTrivia =
{ TryKeyword: range
FinallyKeyword: range }
{
TryKeyword: range
FinallyKeyword: range
}
[<NoEquality; NoComparison>]
type SynExprIfThenElseTrivia =
{ IfKeyword: range
IsElif: bool
ThenKeyword: range
ElseKeyword: range option
IfToThenRange: range }
{
IfKeyword: range
IsElif: bool
ThenKeyword: range
ElseKeyword: range option
IfToThenRange: range
}
[<NoEquality; NoComparison>]
type SynExprLambdaTrivia =
{ ArrowRange: range option }
{
ArrowRange: range option
}
static member Zero: SynExprLambdaTrivia = { ArrowRange = None }
[<NoEquality; NoComparison>]
type SynExprLetOrUseTrivia =
{ InKeyword: range option }
type SynExprLetOrUseTrivia = { InKeyword: range option }
[<NoEquality; NoComparison>]
type SynExprLetOrUseBangTrivia =
{ EqualsRange: range option }
static member Zero: SynExprLetOrUseBangTrivia =
{ EqualsRange = None }
{
EqualsRange: range option
}
static member Zero: SynExprLetOrUseBangTrivia = { EqualsRange = None }
[<NoEquality; NoComparison>]
type SynExprMatchTrivia =
{ MatchKeyword: range
WithKeyword: range }
{
MatchKeyword: range
WithKeyword: range
}
[<NoEquality; NoComparison>]
type SynExprMatchBangTrivia =
{ MatchBangKeyword: range
WithKeyword: range }
{
MatchBangKeyword: range
WithKeyword: range
}
[<NoEquality; NoComparison>]
type SynMatchClauseTrivia =
{ ArrowRange: range option
BarRange: range option }
{
ArrowRange: range option
BarRange: range option
}
static member Zero: SynMatchClauseTrivia = { ArrowRange = None; BarRange = None }
[<NoEquality; NoComparison>]
type SynEnumCaseTrivia =
{ BarRange: range option
EqualsRange: range }
{
BarRange: range option
EqualsRange: range
}
[<NoEquality; NoComparison>]
type SynUnionCaseTrivia = { BarRange: range option }
......@@ -101,66 +124,109 @@ type SynPatOrTrivia = { BarRange: range }
[<NoEquality; NoComparison>]
type SynTypeDefnTrivia =
{ TypeKeyword: range option
EqualsRange: range option
WithKeyword: range option }
{
TypeKeyword: range option
EqualsRange: range option
WithKeyword: range option
}
static member Zero: SynTypeDefnTrivia =
{ TypeKeyword = None
EqualsRange = None
WithKeyword = None }
{
TypeKeyword = None
EqualsRange = None
WithKeyword = None
}
[<NoEquality; NoComparison>]
type SynBindingTrivia =
{ LetKeyword: range option
EqualsRange: range option }
{
LetKeyword: range option
EqualsRange: range option
}
static member Zero: SynBindingTrivia =
{ LetKeyword = None
EqualsRange = None }
{
LetKeyword = None
EqualsRange = None
}
[<NoEquality; NoComparison>]
type SynMemberFlagsTrivia =
{ MemberRange: range option
OverrideRange: range option
AbstractRange: range option
StaticRange: range option
DefaultRange: range option }
{
MemberRange: range option
OverrideRange: range option
AbstractRange: range option
StaticRange: range option
DefaultRange: range option
}
static member Zero: SynMemberFlagsTrivia =
{ MemberRange = None
OverrideRange = None
AbstractRange = None
StaticRange = None
DefaultRange = None }
{
MemberRange = None
OverrideRange = None
AbstractRange = None
StaticRange = None
DefaultRange = None
}
[<NoEquality; NoComparison>]
type SynExprAndBangTrivia =
{ EqualsRange: range
InKeyword: range option }
{
EqualsRange: range
InKeyword: range option
}
[<NoEquality; NoComparison>]
type SynModuleDeclNestedModuleTrivia =
{ ModuleKeyword: range option
EqualsRange: range option }
static member Zero: SynModuleDeclNestedModuleTrivia = { ModuleKeyword = None; EqualsRange = None }
{
ModuleKeyword: range option
EqualsRange: range option
}
static member Zero: SynModuleDeclNestedModuleTrivia =
{
ModuleKeyword = None
EqualsRange = None
}
[<NoEquality; NoComparison>]
type SynModuleSigDeclNestedModuleTrivia =
{ ModuleKeyword: range option
EqualsRange: range option }
static member Zero: SynModuleSigDeclNestedModuleTrivia = { ModuleKeyword = None; EqualsRange = None }
{
ModuleKeyword: range option
EqualsRange: range option
}
static member Zero: SynModuleSigDeclNestedModuleTrivia =
{
ModuleKeyword = None
EqualsRange = None
}
[<NoEquality; NoComparison>]
type SynModuleOrNamespaceTrivia =
{ ModuleKeyword: range option
NamespaceKeyword: range option }
{
ModuleKeyword: range option
NamespaceKeyword: range option
}
[<NoEquality; NoComparison>]
type SynModuleOrNamespaceSigTrivia =
{ ModuleKeyword: range option
NamespaceKeyword: range option }
{
ModuleKeyword: range option
NamespaceKeyword: range option
}
[<NoEquality; NoComparison>]
type SynValSigTrivia =
{ ValKeyword: range option
WithKeyword: range option
EqualsRange: range option }
static member Zero: SynValSigTrivia = { ValKeyword = None; WithKeyword = None; EqualsRange = None }
{
ValKeyword: range option
WithKeyword: range option
EqualsRange: range option
}
static member Zero: SynValSigTrivia =
{
ValKeyword = None
WithKeyword = None
EqualsRange = None
}
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册