Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4688e18

Browse files
author
Vincent Cantin
committed
Some WIP for representing the semantic of the program.
1 parent 9512631 commit 4688e18

File tree

15 files changed

+163
-0
lines changed

15 files changed

+163
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
import java.util.List;
4+
5+
public class Class extends DeclaredType {
6+
7+
boolean isStatic;
8+
boolean isFinal;
9+
boolean isAbstract;
10+
11+
Class superClass;
12+
List<Interface> interfaces;
13+
14+
List<Field> fields;
15+
List<Constructor> constructor;
16+
List<Method> methods;
17+
18+
public Class(String name) {
19+
super(name);
20+
}
21+
22+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
public abstract class Comment {
4+
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
public class Constructor extends FunctionDeclaration {
4+
5+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
public abstract class DeclaredType extends Type {
4+
5+
DeclaredType parent;
6+
Visibility visibility;
7+
8+
public DeclaredType(String name) {
9+
super(name);
10+
}
11+
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
public class Field {
4+
5+
Type type;
6+
String name;
7+
8+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
import java.util.List;
4+
5+
public abstract class FunctionDeclaration {
6+
7+
DeclaredType parent;
8+
9+
boolean isFinal;
10+
Visibility visibility;
11+
12+
List<Parameter> parameters;
13+
Parameter ellipsis;
14+
15+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
import java.util.List;
4+
5+
public class Interface extends DeclaredType {
6+
7+
List<Interface> superInterfaces;
8+
9+
List<Field> fields;
10+
List<Constructor> constructor;
11+
List<Method> methods;
12+
13+
public Interface(String name) {
14+
super(name);
15+
}
16+
17+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
public class JavadocComment extends Comment {
4+
5+
String text;
6+
7+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
public class Method extends FunctionDeclaration {
4+
5+
boolean isStatic;
6+
boolean isAbstract;
7+
8+
String name;
9+
Type returnType;
10+
11+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.lemoulinstudio.sdiff.java.tree.sem;
2+
3+
public class MultiLineComment extends Comment {
4+
5+
String text;
6+
7+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /