Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Compiler/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1818,3 +1818,4 @@ featurePreprocessorElif,"#elif preprocessor directive"
3885,parsLetBangCannotBeLastInCE,"'%s' cannot be the final expression in a computation expression. Finish with 'return', 'return!', or a simple expression."
3886,tcListLiteralWithSingleTupleElement,"This list expression contains a single tuple element. Did you mean to use ';' instead of ',' to separate list elements?"
3887,ilCustomAttrInvalidArrayElemType,"The type '%s' is not a valid custom attribute argument type. Custom attribute arrays must have elements of primitive types, enums, string, System.Type, or System.Object."
3888,parsExpectingWith,"Expecting 'with'"
51 changes: 32 additions & 19 deletions src/Compiler/pars.fsy
Original file line number Diff line number Diff line change
Expand Up @@ -4218,29 +4218,17 @@ declExpr:
| anonLambdaExpr %prec expr_fun
{ $1 }

| MATCH typedSequentialExpr withClauses %prec expr_match
| MATCH matchExprCore
{ let mMatch = rhs parseState 1
let mWith, (clauses, mLast) = $3
let spBind = DebugPointAtBinding.Yes(unionRanges mMatch mWith)
let spBind, expr, clauses, mWith, mWhole = $2 mMatch
let trivia = { MatchKeyword = mMatch; WithKeyword = mWith }
SynExpr.Match(spBind, $2, clauses, unionRanges mMatch mLast, trivia) }

| MATCH typedSequentialExpr recover %prec expr_match
{ if not $3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileMatch())
// Produce approximate expression during error recovery
exprFromParseError $2 }
SynExpr.Match(spBind, expr, clauses, mWhole, trivia) }

| MATCH_BANG typedSequentialExpr withClauses %prec expr_match
{ let mMatch = (rhs parseState 1)
let mWith, (clauses, mLast) = $3
let spBind = DebugPointAtBinding.Yes(unionRanges mMatch mWith)
| MATCH_BANG matchExprCore
{ let mMatch = rhs parseState 1
let spBind, expr, clauses, mWith, mWhole = $2 mMatch
let trivia = { MatchBangKeyword = mMatch; WithKeyword = mWith }
SynExpr.MatchBang(spBind, $2, clauses, unionRanges mMatch mLast, trivia) }

| MATCH_BANG typedSequentialExpr recover %prec expr_match
{ if not $3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileMatch())
// Produce approximate expression during error recovery
exprFromParseError $2 }
SynExpr.MatchBang(spBind, expr, clauses, mWhole, trivia) }

| TRY typedSequentialExprBlockR withClauses %prec expr_try
{ let mTry = rhs parseState 1
Expand Down Expand Up @@ -4838,6 +4826,31 @@ declExpr:

| minusExpr %prec expr_prefix_plus_minus { $1 }

matchExprCore:
| typedSequentialExpr withClauses %prec expr_match
{ fun mMatch ->
let mWith, (clauses, mLast) = $2
let mWhole = unionRanges mMatch mLast
let spBind = DebugPointAtBinding.Yes(unionRanges mMatch mWith)
spBind, $1, clauses, mWith, mWhole }

| declExpr %prec expr_match
{ fun mMatch ->
let mExpr = $1.Range
let mWhole = unionRanges mMatch mExpr
let mEnd = mWhole.EndRange
reportParseErrorAt mEnd (FSComp.SR.parsExpectingWith ())
let spBind = DebugPointAtBinding.Yes(unionRanges mMatch mEnd)
spBind, $1, [], mEnd, mWhole }

| %prec prec_recover
{ fun mMatch ->
let spBind = DebugPointAtBinding.Yes(mMatch)
let expr = arbExpr ("match3", mMatch)
let mEnd = mMatch.EndRange
reportParseErrorAt mEnd (FSComp.SR.parsExpectingExpression ())
spBind, expr, [], mEnd, mMatch }

whileExprCore:
| declExpr doToken typedSequentialExprBlock doneDeclEnd
{ fun mKeyword ->
Expand Down
25 changes: 15 additions & 10 deletions src/Compiler/xlf/FSComp.txt.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 15 additions & 10 deletions src/Compiler/xlf/FSComp.txt.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 15 additions & 10 deletions src/Compiler/xlf/FSComp.txt.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 15 additions & 10 deletions src/Compiler/xlf/FSComp.txt.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 15 additions & 10 deletions src/Compiler/xlf/FSComp.txt.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 15 additions & 10 deletions src/Compiler/xlf/FSComp.txt.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading