-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24d8997
commit b7ba40a
Showing
4 changed files
with
256 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,24 @@ | ||
// This is a class. | ||
class HelloWorld { | ||
private final static int MY_CONSTANT = 1234; | ||
|
||
public static void main(String[] args) { | ||
System.out.println("Hello, world!"); | ||
|
||
String myString = "Test"; | ||
int x = 5; | ||
System.out.println(myString); | ||
|
||
System.out.println(HelperClass.compute(convert(x))); | ||
} | ||
|
||
// This is a private static method | ||
private static String convert(int input) { | ||
return input.toString(); | ||
} | ||
|
||
/** This is an instance method. */ | ||
public int getValue() { | ||
return 15; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,23 @@ | ||
#pragma once | ||
|
||
#include "java-parser.hpp" | ||
|
||
#define YY_DECL yy::parser::symbol_type yylex() | ||
|
||
enum class AccessModifier | ||
{ | ||
DEFAULT, | ||
PUBLIC, | ||
PROTECTED, | ||
PRIVATE | ||
}; | ||
|
||
enum class MutabilityModifier | ||
{ | ||
MUTABLE, | ||
FINAL | ||
}; | ||
|
||
enum class StorageModifier | ||
{ | ||
INSTANCE, | ||
STATIC | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters