A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/commit/b03e2336477b614e9bd9f6aedbca6f8a1b100453 below:

Turn Statement into an interface · pmd/pmd@b03e233 · GitHub

@@ -1548,13 +1548,13 @@ TOKEN :

1548 1548

ASTCompilationUnit CompilationUnit() :

1549 1549

{}

1550 1550

{

1551 -

[ LOOKAHEAD( ( Annotation() )* "package" ) PackageDeclaration() ( EmptyStatement() )* ]

1552 -

( ImportDeclaration() ( EmptyStatement() )* )*

1551 +

[ LOOKAHEAD( ( Annotation() )* "package" ) PackageDeclaration() ( EmptyDeclaration() )* ]

1552 +

( ImportDeclaration() ( EmptyDeclaration() )* )*

1553 1553

// the module decl lookahead needs to be before the type declaration branch,

1554 1554

// looking for annotations + "open" | "module" will fail faster if it's *not*

1555 1555

// a module (most common case)

1556 -

[ LOOKAHEAD(ModuleDeclLahead()) ModuleDeclaration() ( EmptyStatement() )* ]

1557 -

( TypeDeclaration() ( EmptyStatement() )* )*

1556 +

[ LOOKAHEAD(ModuleDeclLahead()) ModuleDeclaration() ( EmptyDeclaration() )* ]

1557 +

( TypeDeclaration() ( EmptyDeclaration() )* )*

1558 1558

( < "\u001a" > )?

1559 1559

( < "~[]" > )? // what's this for? Do you mean ( < ~[] > )*, i.e. "any character"?

1560 1560

<EOF>

@@ -2654,7 +2654,7 @@ void ArrayDimExpr() #void:

2654 2654

* Statement syntax follows.

2655 2655

*/

2656 2656 2657 -

void Statement() :

2657 +

void Statement() #void:

2658 2658

{}

2659 2659

{

2660 2660

Block()

@@ -2675,7 +2675,7 @@ void Statement() :

2675 2675

// because they start with a different token

2676 2676

| LOOKAHEAD( { isNextTokenAnAssert() } ) AssertStatement()

2677 2677

| LOOKAHEAD(2) LabeledStatement()

2678 -

| StatementExpression() ";"

2678 +

| ( StatementExpression() ";" ) #ExpressionStatement

2679 2679

}

2680 2680 2681 2681

void LabeledStatement() :

@@ -2692,14 +2692,14 @@ void Block() :

2692 2692

( BlockStatement() )* t = "}" { if (isPrecededByComment(t)) { jjtThis.setContainsComment(); } }

2693 2693

}

2694 2694 2695 -

void BlockStatement():

2695 +

void BlockStatement() #void:

2696 2696

{}

2697 2697

{

2698 2698

LOOKAHEAD( { isNextTokenAnAssert() } ) AssertStatement()

2699 2699

| LOOKAHEAD({ jdkVersion >= 13 && isKeyword("yield") }) YieldStatement()

2700 2700

|

2701 2701

LOOKAHEAD(( "final" | Annotation() )* Type() <IDENTIFIER>)

2702 -

LocalVariableDeclaration() ";"

2702 +

LocalVariableDeclaration() ";" { ((AbstractJavaNode) jjtree.peekNode()).shiftTokens(0, 1); }

2703 2703

|

2704 2704

// we need to lookahead until the "class" token,

2705 2705

// because a method ref may be annotated

@@ -2709,7 +2709,7 @@ void BlockStatement():

2709 2709

Statement()

2710 2710

}

2711 2711 2712 -

void LocalClassDecl() #void:

2712 +

void LocalClassDecl() #LocalClassStatement:

2713 2713

{int mods = 0;}

2714 2714

{

2715 2715

// this preserves the modifiers of the local class.

@@ -2757,7 +2757,13 @@ void EmptyStatement() :

2757 2757

";"

2758 2758

}

2759 2759 2760 -

void StatementExpression() :

2760 +

void EmptyDeclaration() :

2761 +

{}

2762 +

{

2763 +

";"

2764 +

}

2765 + 2766 +

void StatementExpression() #void:

2761 2767

{AssignmentOp op = null;}

2762 2768

{

2763 2769

PrefixIncrementExpression()

@@ -2859,19 +2865,21 @@ void DoStatement() :

2859 2865

"do" Statement() "while" "(" Expression() ")" ";"

2860 2866

}

2861 2867 2862 -

void ForStatement() :

2863 -

{}

2868 +

void ForStatement() #void:

2869 +

{Token t;}

2864 2870

{

2865 -

"for" "("

2871 +

t="for" "("

2866 2872

(

2867 2873

LOOKAHEAD(LocalVariableDeclaration() ":")

2868 -

LocalVariableDeclaration() ":" Expression()

2869 -

|

2874 +

(LocalVariableDeclaration() ":" Expression() ")" Statement() { jjtThis.jjtSetFirstToken(t); }) #ForeachStatement

2875 +

| (

2870 2876

[ ForInit() ] ";"

2871 2877

[ Expression() ] ";"

2872 2878

[ ForUpdate() ]

2873 -

)

2874 2879

")" Statement()

2880 +

{ jjtThis.jjtSetFirstToken(t); }

2881 +

) #ForStatement

2882 +

)

2875 2883

}

2876 2884 2877 2885

void ForInit() :

@@ -2932,9 +2940,10 @@ void TryStatement() :

2932 2940

*/

2933 2941

{}

2934 2942

{

2935 -

"try" (ResourceList())? Block()

2936 -

( CatchStatement() )*

2937 -

[ FinallyStatement() ]

2943 +

"try" (ResourceList())?

2944 +

Block()

2945 +

( CatchClause() )*

2946 +

[ FinallyClause() ]

2938 2947

}

2939 2948 2940 2949

void ResourceList():

@@ -2964,15 +2973,15 @@ void Resource() :

2964 2973

{}

2965 2974

}

2966 2975 2967 -

void CatchStatement() :

2976 +

void CatchClause() :

2968 2977

{}

2969 2978

{

2970 2979

"catch"

2971 2980

"(" FormalParameter() ")"

2972 2981

Block()

2973 2982

}

2974 2983 2975 -

void FinallyStatement() :

2984 +

void FinallyClause() :

2976 2985

{}

2977 2986

{

2978 2987

"finally" Block()


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4