Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 870
Parser: Update OBLOCKSEP token passing#18921
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
9f9c0ec8347ba23e1a3c702d29849139f3e489cf4f74db5c8fcc7b41ae13b59c9be8b7fb776ab8828dadaa7bd5704d0c5bffdaa6e7d89c7b37b3cf1d138a231ff5bed53809e7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -308,21 +308,13 @@ type SeqExprOnly = SeqExprOnly of bool | ||
| [<NoEquality; NoComparison; RequireQualifiedAccess>] | ||
| type BlockSeparator = | ||
| | Semicolon of range: range * position: pos option | ||
| | Comma of range: range * position: pos option | ||
| | Offside of range: range * position: pos option | ||
| | Semicolon of range: range | ||
| | Comma of range: range | ||
| member this.Range = | ||
| match this with | ||
| | Semicolon(range = m) | ||
| | Comma(range = m) | ||
| | Offside(range = m) -> m | ||
| member this.Position = | ||
| match this with | ||
| | Semicolon(position = p) | ||
| | Comma(position = p) | ||
| | Offside(position = p) -> p | ||
| | Comma(range = m) -> m | ||
| type RecordFieldName = SynLongIdent * bool | ||
| @@ -549,18 +541,19 @@ type SynExpr = | ||
| | AnonRecd of | ||
| isStruct: bool * | ||
| copyInfo: (SynExpr * BlockSeparator) option * | ||
| copyInfo: (SynExpr * BlockSeparator option) option * | ||
| recordFields: (SynLongIdent * range option * SynExpr) list * | ||
| range: range * | ||
| trivia: SynExprAnonRecdTrivia | ||
| trivia: SynExprRecdTrivia | ||
| | ArrayOrList of isArray: bool * exprs: SynExpr list * range: range | ||
| | Record of | ||
| baseInfo: (SynType * SynExpr * range * BlockSeparator option * range) option * | ||
| copyInfo: (SynExpr * BlockSeparator) option * | ||
| copyInfo: (SynExpr * BlockSeparator option) option * | ||
Comment on lines
-561
to
+553
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This place still looks very wrong. We've stored the | ||
| recordFields: SynExprRecordField list * | ||
| range: range | ||
| range: range * | ||
| trivia: SynExprRecdTrivia | ||
| | New of isProtected: bool * targetType: SynType * expr: SynExpr * range: range | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does
4magic constant come from? If we assume that a separator is;or,then it can't be 4 characters long.If this is a
withkeyword range, it should not be calculated from the id, it's job of the parser to preserve it correctly, like it was before.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was how it was originally. See https://github.com/dotnet/fsharp/pull/18899/files#diff-1e790bba80026c421a964cb1d8be0297aff37a0a3dbe7cbf954b54f6e3544e40L93-L100. But I think in this case we do not have a separator we can use
range0?