1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

test variable declaration

This commit is contained in:
Ayman Nadeem 2018-07-24 18:20:57 -04:00
parent 632bf50506
commit 7a7c9ba222
7 changed files with 74 additions and 1 deletions

View File

@ -0,0 +1,5 @@
class Dino {
void test() {
int x = 3;
}
}

View File

@ -0,0 +1,5 @@
class Dino {
void test() {
float x = 3.0;
}
}

View File

@ -0,0 +1,17 @@
(Statements
(Class
(Identifier)
(Statements
(Method
(Void)
(Empty)
(Identifier)
(Statements
(Statements
(Assignment
(Variable
{ (Int)
->(Float) }
(Identifier))
{ (Integer)
->(Float) })))))))

View File

@ -0,0 +1,17 @@
(Statements
(Class
(Identifier)
(Statements
(Method
(Void)
(Empty)
(Identifier)
(Statements
(Statements
(Assignment
(Variable
{ (Float)
->(Int) }
(Identifier))
{ (Float)
->(Integer) })))))))

View File

@ -0,0 +1,15 @@
(Statements
(Class
(Identifier)
(Statements
(Method
(Void)
(Empty)
(Identifier)
(Statements
(Statements
(Assignment
(Variable
(Int)
(Identifier))
(Integer))))))))

View File

@ -0,0 +1,15 @@
(Statements
(Class
(Identifier)
(Statements
(Method
(Void)
(Empty)
(Identifier)
(Statements
(Statements
(Assignment
(Variable
(Float)
(Identifier))
(Float))))))))

View File

@ -1 +0,0 @@
int x = 3;