mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Parser: consolidate handleCaseMatch and endCaseExpression.
There was no need for both of these listener callbacks, because they were always called together. Since `beginCaseExpression` is actually used, it makes sense to keep `endCaseExpression` and get rid of `handleCaseMatch`. Change-Id: I544096b2c2b2814e8cc0c8606455855cb77c9e60 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264102 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
9aab3c7746
commit
5e29849393
|
@ -577,8 +577,8 @@ class ForwardingListener implements Listener {
|
|||
}
|
||||
|
||||
@override
|
||||
void endCaseExpression(Token? when, Token colon) {
|
||||
listener?.endCaseExpression(when, colon);
|
||||
void endCaseExpression(Token caseKeyword, Token? when, Token colon) {
|
||||
listener?.endCaseExpression(caseKeyword, when, colon);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1291,11 +1291,6 @@ class ForwardingListener implements Listener {
|
|||
listener?.handleBreakStatement(hasTarget, breakKeyword, endToken);
|
||||
}
|
||||
|
||||
@override
|
||||
void handleCaseMatch(Token caseKeyword, Token? when, Token colon) {
|
||||
listener?.handleCaseMatch(caseKeyword, when, colon);
|
||||
}
|
||||
|
||||
@override
|
||||
void handleCatchBlock(Token? onKeyword, Token? catchKeyword, Token? comma) {
|
||||
listener?.handleCatchBlock(onKeyword, catchKeyword, comma);
|
||||
|
|
|
@ -100,7 +100,7 @@ class Listener implements UnescapeErrorListener {
|
|||
|
||||
void beginCaseExpression(Token caseKeyword) {}
|
||||
|
||||
void endCaseExpression(Token? when, Token colon) {
|
||||
void endCaseExpression(Token caseKeyword, Token? when, Token colon) {
|
||||
logEvent("CaseExpression");
|
||||
}
|
||||
|
||||
|
@ -1351,10 +1351,6 @@ class Listener implements UnescapeErrorListener {
|
|||
|
||||
void beginTryStatement(Token token) {}
|
||||
|
||||
void handleCaseMatch(Token caseKeyword, Token? when, Token colon) {
|
||||
logEvent("CaseMatch");
|
||||
}
|
||||
|
||||
void beginCatchClause(Token token) {}
|
||||
|
||||
void endCatchClause(Token token) {
|
||||
|
|
|
@ -8271,8 +8271,7 @@ class Parser {
|
|||
token = parseExpression(token);
|
||||
}
|
||||
token = ensureColon(token);
|
||||
listener.endCaseExpression(when, token);
|
||||
listener.handleCaseMatch(caseKeyword, when, token);
|
||||
listener.endCaseExpression(caseKeyword, when, token);
|
||||
expressionCount++;
|
||||
peek = peekPastLabels(token.next!);
|
||||
} else if (expressionCount > 0) {
|
||||
|
|
|
@ -482,7 +482,7 @@ abstract class StackListener extends Listener {
|
|||
}
|
||||
|
||||
@override
|
||||
void endCaseExpression(Token? when, Token colon) {
|
||||
void endCaseExpression(Token caseKeyword, Token? when, Token colon) {
|
||||
debugEvent("CaseExpression");
|
||||
}
|
||||
|
||||
|
|
|
@ -893,6 +893,40 @@ class AstBuilder extends StackListener {
|
|||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void endCaseExpression(Token caseKeyword, Token? when, Token colon) {
|
||||
assert(optional('case', caseKeyword));
|
||||
assert(optional(':', colon));
|
||||
debugEvent("CaseMatch");
|
||||
|
||||
if (_featureSet.isEnabled(Feature.patterns)) {
|
||||
WhenClauseImpl? whenClause;
|
||||
if (when != null) {
|
||||
var expression = pop() as ExpressionImpl;
|
||||
whenClause = WhenClauseImpl(whenKeyword: when, expression: expression);
|
||||
}
|
||||
var pattern = pop() as DartPatternImpl;
|
||||
push(SwitchPatternCaseImpl(
|
||||
labels: <Label>[],
|
||||
keyword: caseKeyword,
|
||||
pattern: pattern,
|
||||
whenClause: whenClause,
|
||||
colon: colon,
|
||||
statements: <Statement>[]));
|
||||
} else {
|
||||
var expression = pop() as ExpressionImpl;
|
||||
push(
|
||||
SwitchCaseImpl(
|
||||
labels: <Label>[],
|
||||
keyword: caseKeyword,
|
||||
expression: expression,
|
||||
colon: colon,
|
||||
statements: <Statement>[],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void endClassConstructor(Token? getOrSet, Token beginToken, Token beginParam,
|
||||
Token? beginInitializers, Token endToken) {
|
||||
|
@ -3275,40 +3309,6 @@ class AstBuilder extends StackListener {
|
|||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void handleCaseMatch(Token caseKeyword, Token? when, Token colon) {
|
||||
assert(optional('case', caseKeyword));
|
||||
assert(optional(':', colon));
|
||||
debugEvent("CaseMatch");
|
||||
|
||||
if (_featureSet.isEnabled(Feature.patterns)) {
|
||||
WhenClauseImpl? whenClause;
|
||||
if (when != null) {
|
||||
var expression = pop() as ExpressionImpl;
|
||||
whenClause = WhenClauseImpl(whenKeyword: when, expression: expression);
|
||||
}
|
||||
var pattern = pop() as DartPatternImpl;
|
||||
push(SwitchPatternCaseImpl(
|
||||
labels: <Label>[],
|
||||
keyword: caseKeyword,
|
||||
pattern: pattern,
|
||||
whenClause: whenClause,
|
||||
colon: colon,
|
||||
statements: <Statement>[]));
|
||||
} else {
|
||||
var expression = pop() as ExpressionImpl;
|
||||
push(
|
||||
SwitchCaseImpl(
|
||||
labels: <Label>[],
|
||||
keyword: caseKeyword,
|
||||
expression: expression,
|
||||
colon: colon,
|
||||
statements: <Statement>[],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void handleCastPattern(Token asOperator) {
|
||||
assert(optional('as', asOperator));
|
||||
|
|
|
@ -598,9 +598,9 @@ class ForwardingTestListener extends ForwardingListener {
|
|||
}
|
||||
|
||||
@override
|
||||
void endCaseExpression(Token? when, Token colon) {
|
||||
void endCaseExpression(Token caseKeyword, Token? when, Token colon) {
|
||||
end('CaseExpression');
|
||||
super.endCaseExpression(when, colon);
|
||||
super.endCaseExpression(caseKeyword, when, colon);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -2529,7 +2529,7 @@ class BodyBuilder extends StackListenerImpl
|
|||
}
|
||||
|
||||
@override
|
||||
void endCaseExpression(Token? when, Token colon) {
|
||||
void endCaseExpression(Token caseKeyword, Token? when, Token colon) {
|
||||
// ignore: unused_local_variable
|
||||
Expression? guard;
|
||||
if (when != null) {
|
||||
|
@ -7251,12 +7251,6 @@ class BodyBuilder extends StackListenerImpl
|
|||
push(cases);
|
||||
}
|
||||
|
||||
@override
|
||||
void handleCaseMatch(Token caseKeyword, Token? when, Token colon) {
|
||||
debugEvent("CaseMatch");
|
||||
// Do nothing. Handled by [handleSwitchCase].
|
||||
}
|
||||
|
||||
@override
|
||||
void handleBreakStatement(
|
||||
bool hasTarget, Token breakKeyword, Token endToken) {
|
||||
|
|
|
@ -986,7 +986,7 @@ class _MacroListener implements Listener {
|
|||
}
|
||||
|
||||
@override
|
||||
void endCaseExpression(Token? when, Token colon) {
|
||||
void endCaseExpression(Token caseKeyword, Token? when, Token colon) {
|
||||
_unsupported();
|
||||
}
|
||||
|
||||
|
@ -1579,11 +1579,6 @@ class _MacroListener implements Listener {
|
|||
_unsupported();
|
||||
}
|
||||
|
||||
@override
|
||||
void handleCaseMatch(Token caseKeyword, Token? when, Token colon) {
|
||||
_unsupported();
|
||||
}
|
||||
|
||||
@override
|
||||
void handleCatchBlock(Token? onKeyword, Token? catchKeyword, Token? comma) {
|
||||
_unsupported();
|
||||
|
|
|
@ -141,9 +141,9 @@ abstract class AbstractParserAstListener implements Listener {
|
|||
}
|
||||
|
||||
@override
|
||||
void endCaseExpression(Token? when, Token colon) {
|
||||
CaseExpressionEnd data =
|
||||
new CaseExpressionEnd(ParserAstType.END, when: when, colon: colon);
|
||||
void endCaseExpression(Token caseKeyword, Token? when, Token colon) {
|
||||
CaseExpressionEnd data = new CaseExpressionEnd(ParserAstType.END,
|
||||
caseKeyword: caseKeyword, when: when, colon: colon);
|
||||
seen(data);
|
||||
}
|
||||
|
||||
|
@ -1779,13 +1779,6 @@ abstract class AbstractParserAstListener implements Listener {
|
|||
seen(data);
|
||||
}
|
||||
|
||||
@override
|
||||
void handleCaseMatch(Token caseKeyword, Token? when, Token colon) {
|
||||
CaseMatchHandle data = new CaseMatchHandle(ParserAstType.HANDLE,
|
||||
caseKeyword: caseKeyword, when: when, colon: colon);
|
||||
seen(data);
|
||||
}
|
||||
|
||||
@override
|
||||
void beginCatchClause(Token token) {
|
||||
CatchClauseBegin data =
|
||||
|
@ -3025,14 +3018,17 @@ class CaseExpressionBegin extends ParserAstNode {
|
|||
}
|
||||
|
||||
class CaseExpressionEnd extends ParserAstNode {
|
||||
final Token caseKeyword;
|
||||
final Token? when;
|
||||
final Token colon;
|
||||
|
||||
CaseExpressionEnd(ParserAstType type, {this.when, required this.colon})
|
||||
CaseExpressionEnd(ParserAstType type,
|
||||
{required this.caseKeyword, this.when, required this.colon})
|
||||
: super("CaseExpression", type);
|
||||
|
||||
@override
|
||||
Map<String, Object?> get deprecatedArguments => {
|
||||
"caseKeyword": caseKeyword,
|
||||
"when": when,
|
||||
"colon": colon,
|
||||
};
|
||||
|
@ -6006,23 +6002,6 @@ class TryStatementBegin extends ParserAstNode {
|
|||
};
|
||||
}
|
||||
|
||||
class CaseMatchHandle extends ParserAstNode {
|
||||
final Token caseKeyword;
|
||||
final Token? when;
|
||||
final Token colon;
|
||||
|
||||
CaseMatchHandle(ParserAstType type,
|
||||
{required this.caseKeyword, this.when, required this.colon})
|
||||
: super("CaseMatch", type);
|
||||
|
||||
@override
|
||||
Map<String, Object?> get deprecatedArguments => {
|
||||
"caseKeyword": caseKeyword,
|
||||
"when": when,
|
||||
"colon": colon,
|
||||
};
|
||||
}
|
||||
|
||||
class CatchClauseBegin extends ParserAstNode {
|
||||
final Token token;
|
||||
|
||||
|
|
|
@ -35,8 +35,7 @@ beginCompilationUnit(main)
|
|||
handleNoArguments(:)
|
||||
handleSend(d, :)
|
||||
endConditionalExpression(?, :)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleIdentifier(e, expression)
|
||||
handleNoTypeArguments(;)
|
||||
|
|
|
@ -130,8 +130,7 @@ parseUnit(main)
|
|||
listener: handleSend(d, :)
|
||||
listener: endConditionalExpression(?, :)
|
||||
ensureColon(d)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(e)
|
||||
parseStatementsInSwitchCase(:, e, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -27,8 +27,7 @@ beginCompilationUnit(main)
|
|||
handleNoArguments(])
|
||||
handleSend(c, ])
|
||||
handleIndexedExpression(?, [, ])
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
beginBlock({, BlockKind(statement))
|
||||
beginBlock({, BlockKind(statement))
|
||||
|
|
|
@ -120,8 +120,7 @@ parseUnit(main)
|
|||
listener: handleSend(c, ])
|
||||
listener: handleIndexedExpression(?, [, ])
|
||||
ensureColon(])
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels({)
|
||||
parseStatementsInSwitchCase(:, {, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -32,8 +32,7 @@ beginCompilationUnit(main)
|
|||
handleNoArguments(:)
|
||||
handleSend(baz, :)
|
||||
endConditionalExpression(?, :)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -119,8 +119,7 @@ parseUnit(main)
|
|||
listener: handleSend(baz, :)
|
||||
listener: endConditionalExpression(?, :)
|
||||
ensureColon(baz)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -42,8 +42,7 @@ beginCompilationUnit(main)
|
|||
handleLiteralSetOrMap(1, {, null, }, true)
|
||||
endConditionalExpression(?, :)
|
||||
handleRecoverableError(Message[ExpectedButGot, Expected ':' before this., null, {string: :}], ;, ;)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleEmptyStatement(;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -148,8 +148,7 @@ parseUnit(main)
|
|||
reportRecoverableError(;, Message[ExpectedButGot, Expected ':' before this., null, {string: :}])
|
||||
listener: handleRecoverableError(Message[ExpectedButGot, Expected ':' before this., null, {string: :}], ;, ;)
|
||||
rewriter()
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(;)
|
||||
parseStatementsInSwitchCase(:, ;, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -24,8 +24,7 @@ beginCompilationUnit(main)
|
|||
handleSend(x, ?)
|
||||
handleLiteralInt(4)
|
||||
handleIndexedExpression(?, [, ])
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
beginBlock({, BlockKind(statement))
|
||||
beginBlock({, BlockKind(statement))
|
||||
|
|
|
@ -108,8 +108,7 @@ parseUnit(main)
|
|||
listener: handleLiteralInt(4)
|
||||
listener: handleIndexedExpression(?, [, ])
|
||||
ensureColon(])
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels({)
|
||||
parseStatementsInSwitchCase(:, {, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -29,8 +29,7 @@ beginCompilationUnit(test)
|
|||
beginCaseExpression(case)
|
||||
handleLiteralBool(true)
|
||||
handleConstantPattern(null)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -75,8 +75,7 @@ parseUnit(test)
|
|||
listener: handleLiteralBool(true)
|
||||
listener: handleConstantPattern(null)
|
||||
ensureColon(true)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -35,8 +35,7 @@ beginCompilationUnit(test)
|
|||
handleType(Object, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -82,8 +82,7 @@ parseUnit(test)
|
|||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
ensureColon(Object)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -30,8 +30,7 @@ beginCompilationUnit(test)
|
|||
handleLiteralBool(true)
|
||||
handleConstantPattern(null)
|
||||
handleNullAssertPattern(!)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -76,8 +76,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(null)
|
||||
listener: handleNullAssertPattern(!)
|
||||
ensureColon(!)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -30,8 +30,7 @@ beginCompilationUnit(test)
|
|||
handleLiteralBool(true)
|
||||
handleConstantPattern(null)
|
||||
handleNullCheckPattern(?)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -76,8 +76,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(null)
|
||||
listener: handleNullCheckPattern(?)
|
||||
ensureColon(?)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -28,8 +28,7 @@ beginCompilationUnit(void)
|
|||
handleLiteralInt(0)
|
||||
handleConstantPattern(null)
|
||||
handleLiteralBool(true)
|
||||
endCaseExpression(when, :)
|
||||
handleCaseMatch(case, when, :)
|
||||
endCaseExpression(case, when, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -78,8 +78,7 @@ parseUnit(void)
|
|||
parseLiteralBool(when)
|
||||
listener: handleLiteralBool(true)
|
||||
ensureColon(true)
|
||||
listener: endCaseExpression(when, :)
|
||||
listener: handleCaseMatch(case, when, :)
|
||||
listener: endCaseExpression(case, when, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -27,8 +27,7 @@ beginCompilationUnit(void)
|
|||
beginCaseExpression(case)
|
||||
handleLiteralInt(0)
|
||||
handleConstantPattern(null)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -72,8 +72,7 @@ parseUnit(void)
|
|||
listener: handleLiteralInt(0)
|
||||
listener: handleConstantPattern(null)
|
||||
ensureColon(0)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -34,8 +34,7 @@ beginCompilationUnit(void)
|
|||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
handleLiteralBool(true)
|
||||
endCaseExpression(when, :)
|
||||
handleCaseMatch(case, when, :)
|
||||
endCaseExpression(case, when, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -85,8 +85,7 @@ parseUnit(void)
|
|||
parseLiteralBool(when)
|
||||
listener: handleLiteralBool(true)
|
||||
ensureColon(true)
|
||||
listener: endCaseExpression(when, :)
|
||||
listener: handleCaseMatch(case, when, :)
|
||||
listener: endCaseExpression(case, when, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -33,8 +33,7 @@ beginCompilationUnit(void)
|
|||
handleType(int, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -79,8 +79,7 @@ parseUnit(void)
|
|||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
ensureColon(int)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -49,8 +49,7 @@ beginCompilationUnit(test)
|
|||
handleType(int, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -116,8 +116,7 @@ parseUnit(test)
|
|||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
ensureColon(int)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -66,8 +66,7 @@ beginCompilationUnit(class)
|
|||
handlePatternField(:)
|
||||
handleExtractorPatternFields(1, (, ))
|
||||
handleExtractorPattern(C, null, null)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -135,8 +135,7 @@ parseUnit(class)
|
|||
listener: handleExtractorPatternFields(1, (, ))
|
||||
listener: handleExtractorPattern(C, null, null)
|
||||
ensureColon())
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -66,8 +66,7 @@ beginCompilationUnit(class)
|
|||
handlePatternField(:)
|
||||
handleExtractorPatternFields(1, (, ))
|
||||
handleExtractorPattern(C, null, null)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -131,8 +131,7 @@ parseUnit(class)
|
|||
listener: handleExtractorPatternFields(1, (, ))
|
||||
listener: handleExtractorPattern(C, null, null)
|
||||
ensureColon())
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -37,8 +37,7 @@ beginCompilationUnit(test)
|
|||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
handleListPattern(1, [, ])
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -87,8 +87,7 @@ parseUnit(test)
|
|||
listener: handleCastPattern(as)
|
||||
listener: handleListPattern(1, [, ])
|
||||
ensureColon(])
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -43,8 +43,7 @@ beginCompilationUnit(test)
|
|||
handleType(Object, ?)
|
||||
handleVariablePattern(null, _)
|
||||
endBinaryPattern(&)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -90,8 +90,7 @@ parseUnit(test)
|
|||
listener: handleVariablePattern(null, _)
|
||||
listener: endBinaryPattern(&)
|
||||
ensureColon(_)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -43,8 +43,7 @@ beginCompilationUnit(test)
|
|||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endBinaryPattern(&)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -90,8 +90,7 @@ parseUnit(test)
|
|||
listener: handleCastPattern(as)
|
||||
listener: endBinaryPattern(&)
|
||||
ensureColon(?)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -43,8 +43,7 @@ beginCompilationUnit(test)
|
|||
handleType(Object, ?)
|
||||
handleVariablePattern(null, _)
|
||||
endBinaryPattern(|)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -90,8 +90,7 @@ parseUnit(test)
|
|||
listener: handleVariablePattern(null, _)
|
||||
listener: endBinaryPattern(|)
|
||||
ensureColon(_)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -43,8 +43,7 @@ beginCompilationUnit(test)
|
|||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endBinaryPattern(|)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -90,8 +90,7 @@ parseUnit(test)
|
|||
listener: handleCastPattern(as)
|
||||
listener: endBinaryPattern(|)
|
||||
ensureColon(?)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -40,8 +40,7 @@ beginCompilationUnit(test)
|
|||
handleCastPattern(as)
|
||||
handleMapPatternEntry(:, })
|
||||
handleMapPattern(1, {, })
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -96,8 +96,7 @@ parseUnit(test)
|
|||
listener: handleMapPatternEntry(:, })
|
||||
listener: handleMapPattern(1, {, })
|
||||
ensureColon(})
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -36,8 +36,7 @@ beginCompilationUnit(test)
|
|||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
handleParenthesizedPattern(()
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -87,8 +87,7 @@ parseUnit(test)
|
|||
ensureCloseParen(int, ()
|
||||
listener: handleParenthesizedPattern(()
|
||||
ensureColon())
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -41,8 +41,7 @@ beginCompilationUnit(test)
|
|||
handleConstantPattern(null)
|
||||
handlePatternField(null)
|
||||
handleRecordPattern((, 2)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -95,8 +95,7 @@ parseUnit(test)
|
|||
ensureCloseParen(2, ()
|
||||
listener: handleRecordPattern((, 2)
|
||||
ensureColon())
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -41,8 +41,7 @@ beginCompilationUnit(test)
|
|||
handleConstantPattern(null)
|
||||
handlePatternField(null)
|
||||
handleRecordPattern((, 2)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -99,8 +99,7 @@ parseUnit(test)
|
|||
ensureCloseParen(2, ()
|
||||
listener: handleRecordPattern((, 2)
|
||||
ensureColon())
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -40,8 +40,7 @@ beginCompilationUnit(test)
|
|||
handleConstantPattern(null)
|
||||
handlePatternField(null)
|
||||
handleRecordPattern((, 2)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -97,8 +97,7 @@ parseUnit(test)
|
|||
ensureCloseParen(2, ()
|
||||
listener: handleRecordPattern((, 2)
|
||||
ensureColon())
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -42,8 +42,7 @@ beginCompilationUnit(test)
|
|||
handleSend(c, :)
|
||||
handleEndingBinaryExpression(.)
|
||||
handleConstantPattern(null)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -104,8 +104,7 @@ parseUnit(test)
|
|||
listener: handleEndingBinaryExpression(.)
|
||||
listener: handleConstantPattern(null)
|
||||
ensureColon(c)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -48,8 +48,7 @@ beginCompilationUnit(test)
|
|||
handleType(Object, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -111,8 +111,7 @@ parseUnit(test)
|
|||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
ensureColon(Object)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -43,8 +43,7 @@ beginCompilationUnit(test)
|
|||
handleEndingBinaryExpression(.)
|
||||
handleConstantPattern(null)
|
||||
handleNullAssertPattern(!)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -105,8 +105,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(null)
|
||||
listener: handleNullAssertPattern(!)
|
||||
ensureColon(!)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -43,8 +43,7 @@ beginCompilationUnit(test)
|
|||
handleEndingBinaryExpression(.)
|
||||
handleConstantPattern(null)
|
||||
handleNullCheckPattern(?)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -105,8 +105,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(null)
|
||||
listener: handleNullCheckPattern(?)
|
||||
ensureColon(?)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -43,8 +43,7 @@ beginCompilationUnit(test)
|
|||
handleNoArguments(:)
|
||||
handleSend(y, :)
|
||||
handleConstantPattern(null)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -109,8 +109,7 @@ parseUnit(test)
|
|||
listener: handleSend(y, :)
|
||||
listener: handleConstantPattern(null)
|
||||
ensureColon(y)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -49,8 +49,7 @@ beginCompilationUnit(test)
|
|||
handleType(Object, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -116,8 +116,7 @@ parseUnit(test)
|
|||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
ensureColon(Object)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -44,8 +44,7 @@ beginCompilationUnit(test)
|
|||
handleSend(y, !)
|
||||
handleConstantPattern(null)
|
||||
handleNullAssertPattern(!)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -110,8 +110,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(null)
|
||||
listener: handleNullAssertPattern(!)
|
||||
ensureColon(!)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -44,8 +44,7 @@ beginCompilationUnit(test)
|
|||
handleSend(y, ?)
|
||||
handleConstantPattern(null)
|
||||
handleNullCheckPattern(?)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -110,8 +110,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(null)
|
||||
listener: handleNullCheckPattern(?)
|
||||
ensureColon(?)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -35,8 +35,7 @@ beginCompilationUnit(void)
|
|||
handleSend(b, :)
|
||||
handleEndingBinaryExpression(.)
|
||||
handleConstantPattern(null)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -90,8 +90,7 @@ parseUnit(void)
|
|||
listener: handleEndingBinaryExpression(.)
|
||||
listener: handleConstantPattern(null)
|
||||
ensureColon(b)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -37,8 +37,7 @@ beginCompilationUnit(test)
|
|||
handleSend(b, :)
|
||||
handleEndingBinaryExpression(.)
|
||||
handleConstantPattern(null)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -93,8 +93,7 @@ parseUnit(test)
|
|||
listener: handleEndingBinaryExpression(.)
|
||||
listener: handleConstantPattern(null)
|
||||
ensureColon(b)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -43,8 +43,7 @@ beginCompilationUnit(test)
|
|||
handleType(Object, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -100,8 +100,7 @@ parseUnit(test)
|
|||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
ensureColon(Object)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -38,8 +38,7 @@ beginCompilationUnit(test)
|
|||
handleEndingBinaryExpression(.)
|
||||
handleConstantPattern(null)
|
||||
handleNullAssertPattern(!)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -94,8 +94,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(null)
|
||||
listener: handleNullAssertPattern(!)
|
||||
ensureColon(!)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -38,8 +38,7 @@ beginCompilationUnit(test)
|
|||
handleEndingBinaryExpression(.)
|
||||
handleConstantPattern(null)
|
||||
handleNullCheckPattern(?)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -94,8 +94,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(null)
|
||||
listener: handleNullCheckPattern(?)
|
||||
ensureColon(?)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -34,8 +34,7 @@ beginCompilationUnit(test)
|
|||
endTypeArguments(1, <, >)
|
||||
handleLiteralList(0, [, null, ])
|
||||
handleConstantPattern(const)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -84,8 +84,7 @@ parseUnit(test)
|
|||
listener: handleLiteralList(0, [, null, ])
|
||||
listener: handleConstantPattern(const)
|
||||
ensureColon(])
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -40,8 +40,7 @@ beginCompilationUnit(test)
|
|||
handleType(Object, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -91,8 +91,7 @@ parseUnit(test)
|
|||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
ensureColon(Object)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -35,8 +35,7 @@ beginCompilationUnit(test)
|
|||
handleLiteralList(0, [, null, ])
|
||||
handleConstantPattern(const)
|
||||
handleNullAssertPattern(!)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -85,8 +85,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(const)
|
||||
listener: handleNullAssertPattern(!)
|
||||
ensureColon(!)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -35,8 +35,7 @@ beginCompilationUnit(test)
|
|||
handleLiteralList(0, [, null, ])
|
||||
handleConstantPattern(const)
|
||||
handleNullCheckPattern(?)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -85,8 +85,7 @@ parseUnit(test)
|
|||
listener: handleConstantPattern(const)
|
||||
listener: handleNullCheckPattern(?)
|
||||
ensureColon(?)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -35,8 +35,7 @@ beginCompilationUnit(test)
|
|||
handleLiteralInt(1)
|
||||
handleLiteralList(1, [, null, ])
|
||||
handleConstantPattern(const)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -87,8 +87,7 @@ parseUnit(test)
|
|||
listener: handleLiteralList(1, [, null, ])
|
||||
listener: handleConstantPattern(const)
|
||||
ensureColon(])
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -41,8 +41,7 @@ beginCompilationUnit(test)
|
|||
handleType(Object, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
|
@ -94,8 +94,7 @@ parseUnit(test)
|
|||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
ensureColon(Object)
|
||||
listener: endCaseExpression(null, :)
|
||||
listener: handleCaseMatch(case, null, :)
|
||||
listener: endCaseExpression(case, null, :)
|
||||
peekPastLabels(break)
|
||||
parseStatementsInSwitchCase(:, break, case, 0, 1, null, null)
|
||||
listener: beginSwitchCase(0, 1, case)
|
||||
|
|
|
@ -36,8 +36,7 @@ beginCompilationUnit(test)
|
|||
handleLiteralList(1, [, null, ])
|
||||
handleConstantPattern(const)
|
||||
handleNullAssertPattern(!)
|
||||
endCaseExpression(null, :)
|
||||
handleCaseMatch(case, null, :)
|
||||
endCaseExpression(case, null, :)
|
||||
beginSwitchCase(0, 1, case)
|
||||
handleBreakStatement(false, break, ;)
|
||||
endSwitchCase(0, 1, null, null, 1, case, })
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue