@@ -565,7 +565,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
565
565
let tokenLexbufState = getLexbufState()
566
566
savedLexbufState <- tokenLexbufState
567
567
haveLexbufState <- true
568
- TokenTup( token, tokenLexbufState, PositionTuple( lastTokenStart, lastTokenEnd))
568
+ TokenTup( token, tokenLexbufState, PositionTuple( lastTokenStart, lastTokenEnd))
569
569
570
570
//----------------------------------------------------------------------------
571
571
// Fetch a raw token, either from the old lexer or from our delayedStack
@@ -635,7 +635,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
635
635
let pushCtxt tokenTup ( newCtxt : Context ) =
636
636
let rec unindentationLimit strict stack =
637
637
match newCtxt, stack with
638
- | _, [] -> PositionWithColumn ( newCtxt.StartPos, - 1 )
638
+ | _, [] -> PositionWithColumn( newCtxt.StartPos, - 1 )
639
639
640
640
// ignore Vanilla because a SeqBlock is always coming
641
641
| _, ( CtxtVanilla _ :: rest) -> unindentationLimit strict rest
@@ -647,8 +647,8 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
647
647
// '(match' limited by minimum of two
648
648
| _,((( CtxtMatch _) as ctxt1) :: CtxtSeqBlock _ :: ( CtxtParen (( BEGIN | LPAREN),_) as ctxt2) :: _ rest)
649
649
-> if ctxt1.StartCol <= ctxt2.StartCol
650
- then PositionWithColumn ( ctxt1.StartPos, ctxt1.StartCol)
651
- else PositionWithColumn ( ctxt2.StartPos, ctxt2.StartCol)
650
+ then PositionWithColumn( ctxt1.StartPos, ctxt1.StartCol)
651
+ else PositionWithColumn( ctxt2.StartPos, ctxt2.StartCol)
652
652
653
653
// 'let ... = function' limited by 'let', precisely
654
654
// This covers the common form
@@ -657,15 +657,15 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
657
657
// | Case1 -> ...
658
658
// | Case2 -> ...
659
659
| ( CtxtMatchClauses _), ( CtxtFunction _ :: CtxtSeqBlock _ :: ( CtxtLetDecl _ as limitCtxt) :: _ rest)
660
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol)
660
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol)
661
661
662
662
// Otherwise 'function ...' places no limit until we hit a CtxtLetDecl etc... (Recursive)
663
663
| ( CtxtMatchClauses _), ( CtxtFunction _ :: rest)
664
664
-> unindentationLimit false rest
665
665
666
666
// 'try ... with' limited by 'try'
667
667
| _,( CtxtMatchClauses _ :: ( CtxtTry _ as limitCtxt) :: _ rest)
668
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol)
668
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol)
669
669
670
670
// 'fun ->' places no limit until we hit a CtxtLetDecl etc... (Recursive)
671
671
| _,( CtxtFun _ :: rest)
@@ -684,7 +684,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
684
684
// This is a serious thing to allow, but is required since there is no "return" in this language.
685
685
// Without it there is no way of escaping special cases in large bits of code without indenting the main case.
686
686
| CtxtSeqBlock _, ( CtxtElse _ :: ( CtxtIf _ as limitCtxt) :: _ rest)
687
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol)
687
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol)
688
688
689
689
// Permitted inner-construct precise block alighnment:
690
690
// interface ...
@@ -695,7 +695,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
695
695
// with ...
696
696
// end
697
697
| CtxtWithAsAugment _,(( CtxtInterfaceHead _ | CtxtMemberHead _ | CtxtException _ | CtxtTypeDefns _) as limitCtxt :: _ rest)
698
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol)
698
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol)
699
699
700
700
// Permit unindentation via parentheses (or begin/end) following a 'then', 'else' or 'do':
701
701
// if nr > 0 then (
@@ -766,12 +766,12 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
766
766
// 'type C = interface ... ' limited by 'type'
767
767
// 'type C = struct ... ' limited by 'type'
768
768
| _,( CtxtParen (( CLASS | STRUCT | INTERFACE),_) :: CtxtSeqBlock _ :: ( CtxtTypeDefns _ as limitCtxt) :: _)
769
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol + 1 )
769
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol + 1 )
770
770
771
771
// REVIEW: document these
772
772
| _,( CtxtSeqBlock _ :: CtxtParen(( BEGIN | LPAREN | LBRACK | LBRACK_ BAR),_) :: CtxtVanilla _ :: ( CtxtSeqBlock _ as limitCtxt) :: _)
773
773
| ( CtxtSeqBlock _),( CtxtParen (( BEGIN | LPAREN | LBRACE | LBRACK | LBRACK_ BAR) ,_) :: CtxtSeqBlock _ :: (( CtxtTypeDefns _ | CtxtLetDecl _ | CtxtMemberBody _ | CtxtWithAsLet _) as limitCtxt) :: _)
774
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol + 1 )
774
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol + 1 )
775
775
776
776
// Permitted inner-construct (e.g. "then" block and "else" block in overall
777
777
// "if-then-else" block ) block alighnment:
@@ -780,22 +780,22 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer,
780
780
// elif expr
781
781
// else expr
782
782
| ( CtxtIf _ | CtxtElse _ | CtxtThen _), ( CtxtIf _ as limitCtxt) :: _ rest
783
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol)
783
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol)
784
784
// Permitted inner-construct precise block alighnment:
785
785
// while ...
786
786
// do expr
787
787
// done
788
788
| ( CtxtDo _), (( CtxtFor _ | CtxtWhile _) as limitCtxt) :: _ rest
789
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol)
789
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol)
790
790
791
791
792
792
// These contexts all require indentation by at least one space
793
793
| _,(( CtxtInterfaceHead _ | CtxtNamespaceHead _ | CtxtModuleHead _ | CtxtException _ | CtxtModuleBody (_, false ) | CtxtIf _ | CtxtWithAsLet _ | CtxtLetDecl _ | CtxtMemberHead _ | CtxtMemberBody _) as limitCtxt :: _)
794
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol + 1 )
794
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol + 1 )
795
795
796
796
// These contexts can have their contents exactly aligning
797
797
| _,(( CtxtParen _ | CtxtFor _ | CtxtWhen _ | CtxtWhile _ | CtxtTypeDefns _ | CtxtMatch _ | CtxtModuleBody (_, true ) | CtxtNamespaceBody _ | CtxtTry _ | CtxtMatchClauses _ | CtxtSeqBlock _) as limitCtxt :: _)
798
- -> PositionWithColumn ( limitCtxt.StartPos, limitCtxt.StartCol)
798
+ -> PositionWithColumn( limitCtxt.StartPos, limitCtxt.StartCol)
799
799
800
800
match newCtxt with
801
801
// Don't bother to check pushes of Vanilla blocks since we've
0 commit comments