Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita834b6b

Browse files
committed
Refine parsing priorities for indexer args. (changeset 1310226)
1 parent3abf58f commita834b6b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/fsharp/pars.fsy‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ let rangeOfLongIdent(lid:LongIdent) =
440440
%left COMMA
441441
%nonassoc slice_expr /* matrix.[e COMMA e] has higher precedence than "e COMMA e" */
442442
%nonassoc DOT_DOT /* for matrix.[1..2,3..4] the ".." has higher precedence than expression "2 COMMA 3" */
443+
%nonassoc slice_comma /* for matrix.[1..2,3..4] the "," has higher precedence than ".." */
443444
%nonassoc paren_pat_colon
444445
%nonassoc paren_pat_attribs
445446
%left OR BAR_BAR JOIN_IN
@@ -3596,8 +3597,8 @@ atomicExprQualification:
35963597
(fun e lhsm dotm -> exprFromParseError (mkSynDotBrackGet lhsm dotm e (arbExpr("indexerExpr2",mArg)))) }
35973598

35983599
optRangeSeqExpr:
3599-
| optRange COMMA optRangeSeqExpr { $1::$3 }
3600-
| optRange{ [$1] }
3600+
| optRange COMMA optRangeSeqExpr%prec slice_comma{ $1::$3 }
3601+
| optRange { [$1] }
36013602

36023603
optRange:
36033604
| declExpr DOT_DOT declExpr
@@ -4858,4 +4859,4 @@ ends_coming_soon_or_recover:
48584859
| RBRACE_COMING_SOON { false }
48594860
| RPAREN_COMING_SOON { false }
48604861
| OBLOCKEND_COMING_SOON { false }
4861-
| recover { $1 }
4862+
| recover { $1 }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp