Added some more things

develop_before_lexer_parser_merge_parseName
parent 5761a454a8
commit 1af072de8c

@ -28,7 +28,42 @@ public final class TypeChecker
// writeln("Res:",isValidEntity(program.getStatements(), "clazz1"));
// writeln("Res:",isValidEntity(program.getStatements(), "clazz_2_1.clazz_2_2"));
//process();
}
/**
* List of currently declared variables
*/
private Entity[] declaredVars;
/**
* Initialization order
*/
/**
* Example:
*
*
* int a;
* int b = a;
* int c = b;
* Reversing must not work
*
* Only time it can is if the path is to something in a class as those should
* be initialized all before variables
*/
private void process(Statement[] statements)
{
/* Go through each entity and check them */
/* TODO: Starting with x, if `int x = clacc.class.class.i` */
/* TODO: Then we getPath from the assignment aexpressiona nd eval it */
/**
* TODO: The variable there cannot rely on x without it being initted, hence
* need for global list of declared variables
*/
}
/* Test name resolution */

@ -4,6 +4,10 @@ module bababoioey;
int x;
ubyte y;
int a;
int b = a;
int c = b;
public ubyte k = 1;
private ubyte k2 = 1;
protected ubyte k3 = -1;

Loading…
Cancel
Save