1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

interface declaration tests

This commit is contained in:
Ayman Nadeem 2018-07-24 17:06:07 -04:00
parent 533b72930b
commit f524368c0b
9 changed files with 82 additions and 2 deletions

View File

@ -0,0 +1,14 @@
public class Test {
public static void main(String args[]) {
int [] numbers = {10, 20, 30, 40, 50};
for(int x : numbers ) {
if( x == 30 ) {
continue;
}
System.out.print( x );
System.out.print("\n");
}
}
}

View File

@ -0,0 +1,14 @@
public class Test {
public static void main(String args[]) {
int [] numbers = {10, 20, 30, 40, 50};
for(int x : numbers ) {
if( x == 30 ) {
continue;
}
System.out.print( x );
System.out.print("\n");
}
}
}

View File

@ -0,0 +1,3 @@
interface Top {
}
// normal declaration

View File

@ -1,3 +1,4 @@
@interface TerminationHandle { @interface TerminationHandle {
Bar foo = 1; Bar foo = 1;
} }
// annotation type declaration

View File

@ -0,0 +1,15 @@
(Statements
(InterfaceDeclaration
{ (Identifier)
->(Identifier) }
(Statements
{+(Statements
{+(Assignment
{+(Variable
{+(Identifier)+}
{+(Identifier)+})+}
{+(Integer)+})+})+}))
(Context
{ (Comment)
->(Comment) }
(Empty)))

View File

@ -0,0 +1,15 @@
(Statements
(InterfaceDeclaration
{ (Identifier)
->(Identifier) }
(Statements
{-(Statements
{-(Assignment
{-(Variable
{-(Identifier)-}
{-(Identifier)-})-}
{-(Integer)-})-})-}))
(Context
{ (Comment)
->(Comment) }
(Empty)))

View File

@ -0,0 +1,7 @@
(Statements
(InterfaceDeclaration
(Identifier)
(Statements))
(Context
(Comment)
(Empty)))

View File

@ -0,0 +1,13 @@
(Statements
(InterfaceDeclaration
(Identifier)
(Statements
(Statements
(Assignment
(Variable
(Identifier)
(Identifier))
(Integer)))))
(Context
(Comment)
(Empty)))

View File

@ -1,2 +0,0 @@
interface Top {
}