- 
                Notifications
    You must be signed in to change notification settings 
- Fork 834
Parser: recover on unfinished isConst patterns #17232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            10 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      f8c13be
              
                Parser: recover on unfinished isConst patterns
              
              
                auduchinok 6c65132
              
                Update baselines
              
              
                auduchinok a3c9338
              
                Update baselines
              
              
                auduchinok f9adba4
              
                Release notes
              
              
                auduchinok 1ff35b4
              
                Undo change
              
              
                auduchinok ef47a5e
              
                Report error at EOF
              
              
                auduchinok 7231ef4
              
                Update baselines
              
              
                auduchinok efc5958
              
                Update baselines
              
              
                auduchinok cf9b084
              
                Fix broken F# build output symbol
              
              
                auduchinok 223628c
              
                Merge branch 'main' into parser-pat-isInst
              
              
                auduchinok File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| module Module | ||
|  | ||
| match () with | ||
| | | ||
|  | ||
| () | 
        
          
  
    
      
          
            18 changes: 18 additions & 0 deletions
          
          18 
        
  tests/service/data/SyntaxTree/MatchClause/Missing pat 05.fs.bsl
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| ImplFile | ||
| (ParsedImplFileInput | ||
| ("/root/MatchClause/Missing pat 05.fs", false, QualifiedNameOfFile Module, | ||
| [], [], | ||
| [SynModuleOrNamespace | ||
| ([Module], false, NamedModule, | ||
| [Expr | ||
| (Match | ||
| (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), [], (3,0--4,1), | ||
| { MatchKeyword = (3,0--3,5) | ||
| WithKeyword = (3,9--3,13) }), (3,0--4,1)); | ||
| Expr (Const (Unit, (6,0--6,2)), (6,0--6,2))], | ||
| PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
| (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
| { ConditionalDirectives = [] | ||
| CodeComments = [] }, set [])) | ||
|  | ||
| (6,0)-(6,1) parse error Incomplete structured construct at or before this point in expression | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| module Module | ||
|  | ||
| match () with | ||
| | :? T -> () | ||
|  | ||
| () | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ImplFile | ||
| (ParsedImplFileInput | ||
| ("/root/Pattern/IsInst 01.fs", false, QualifiedNameOfFile Module, [], [], | ||
| [SynModuleOrNamespace | ||
| ([Module], false, NamedModule, | ||
| [Expr | ||
| (Match | ||
| (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), | ||
| [SynMatchClause | ||
| (IsInst | ||
| (LongIdent (SynLongIdent ([T], [], [None])), (4,2--4,6)), | ||
| None, Const (Unit, (4,10--4,12)), (4,2--4,12), Yes, | ||
| { ArrowRange = Some (4,7--4,9) | ||
| BarRange = Some (4,0--4,1) })], (3,0--4,12), | ||
| { MatchKeyword = (3,0--3,5) | ||
| WithKeyword = (3,9--3,13) }), (3,0--4,12)); | ||
| Expr (Const (Unit, (6,0--6,2)), (6,0--6,2))], | ||
| PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
| (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
| { ConditionalDirectives = [] | ||
| CodeComments = [] }, set [])) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| module Module | ||
|  | ||
| match () with | ||
| | :? T | ||
|  | ||
| () | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ImplFile | ||
| (ParsedImplFileInput | ||
| ("/root/Pattern/IsInst 02.fs", false, QualifiedNameOfFile Module, [], [], | ||
| [SynModuleOrNamespace | ||
| ([Module], false, NamedModule, | ||
| [Expr | ||
| (Match | ||
| (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), | ||
| [SynMatchClause | ||
| (IsInst | ||
| (LongIdent (SynLongIdent ([T], [], [None])), (4,2--4,6)), | ||
| None, ArbitraryAfterError ("patternClauses2", (4,6--4,6)), | ||
| (4,2--4,6), Yes, { ArrowRange = None | ||
| BarRange = Some (4,0--4,1) })], | ||
| (3,0--4,6), { MatchKeyword = (3,0--3,5) | ||
| WithKeyword = (3,9--3,13) }), (3,0--4,6)); | ||
| Expr (Const (Unit, (6,0--6,2)), (6,0--6,2))], | ||
| PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
| (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
| { ConditionalDirectives = [] | ||
| CodeComments = [] }, set [])) | ||
|  | ||
| (6,0)-(6,1) parse error Incomplete structured construct at or before this point in pattern matching. Expected '->' or other token. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| module Module | ||
|  | ||
| match () with | ||
| | :? -> () | ||
|  | ||
| () | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| ImplFile | ||
| (ParsedImplFileInput | ||
| ("/root/Pattern/IsInst 03.fs", false, QualifiedNameOfFile Module, [], [], | ||
| [SynModuleOrNamespace | ||
| ([Module], false, NamedModule, | ||
| [Expr | ||
| (Match | ||
| (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), | ||
| [SynMatchClause | ||
| (IsInst (FromParseError (4,4--4,4), (4,2--4,4)), None, | ||
| Const (Unit, (4,8--4,10)), (4,2--4,10), Yes, | ||
| { ArrowRange = Some (4,5--4,7) | ||
| BarRange = Some (4,0--4,1) })], (3,0--4,10), | ||
| { MatchKeyword = (3,0--3,5) | ||
| WithKeyword = (3,9--3,13) }), (3,0--4,10)); | ||
| Expr (Const (Unit, (6,0--6,2)), (6,0--6,2))], | ||
| PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
| (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
| { ConditionalDirectives = [] | ||
| CodeComments = [] }, set [])) | ||
|  | ||
| (4,2)-(4,4) parse error Expecting type | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| module Module | ||
|  | ||
| match () with | ||
| | :? | ||
|  | ||
| () | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ImplFile | ||
| (ParsedImplFileInput | ||
| ("/root/Pattern/IsInst 04.fs", false, QualifiedNameOfFile Module, [], [], | ||
| [SynModuleOrNamespace | ||
| ([Module], false, NamedModule, | ||
| [Expr | ||
| (Match | ||
| (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), | ||
| [SynMatchClause | ||
| (IsInst (FromParseError (4,4--4,4), (4,2--4,4)), None, | ||
| ArbitraryAfterError ("patternClauses2", (4,4--4,4)), | ||
| (4,2--4,4), Yes, { ArrowRange = None | ||
| BarRange = Some (4,0--4,1) })], | ||
| (3,0--4,4), { MatchKeyword = (3,0--3,5) | ||
| WithKeyword = (3,9--3,13) }), (3,0--4,4)); | ||
| Expr (Const (Unit, (6,0--6,2)), (6,0--6,2))], | ||
| PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
| (1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
| { ConditionalDirectives = [] | ||
| CodeComments = [] }, set [])) | ||
|  | ||
| (4,2)-(4,4) parse error Expecting type | ||
| (6,0)-(6,1) parse error Incomplete structured construct at or before this point in pattern matching. Expected '->' or other token. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module Module | ||
|  | ||
| match () with | ||
| | :? | ||
| | _ -> () | ||
|  | ||
| () | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| ImplFile | ||
| (ParsedImplFileInput | ||
| ("/root/Pattern/IsInst 05.fs", false, QualifiedNameOfFile Module, [], [], | ||
| [SynModuleOrNamespace | ||
| ([Module], false, NamedModule, | ||
| [Expr | ||
| (Match | ||
| (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), | ||
| [SynMatchClause | ||
| (Or | ||
| (IsInst (FromParseError (4,4--4,4), (4,2--4,4)), | ||
| Wild (5,2--5,3), (4,2--5,3), { BarRange = (5,0--5,1) }), | ||
| None, Const (Unit, (5,7--5,9)), (4,2--5,9), Yes, | ||
| { ArrowRange = Some (5,4--5,6) | ||
| BarRange = Some (4,0--4,1) })], (3,0--5,9), | ||
| { MatchKeyword = (3,0--3,5) | ||
| WithKeyword = (3,9--3,13) }), (3,0--5,9)); | ||
| Expr (Const (Unit, (7,0--7,2)), (7,0--7,2))], | ||
| PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, | ||
| (1,0--7,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true), | ||
| { ConditionalDirectives = [] | ||
| CodeComments = [] }, set [])) | ||
|  | ||
| (4,2)-(4,4) parse error Expecting type | ||
|         
                  psfinaki marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.