Close

Importing Files

A project log for Kyazuken: a Java-like language

Java is great. Could I roll my own?

dylan-brophyDylan Brophy 10/29/2020 at 00:410 Comments

Well, it's reading files I import.  Which is good.  Now I just need to make them parse...

And here's what was failing:

class Lexer {

	File file;

	String buffer = "";
	int line_number = 0;
	

	Lexer(File file) { // line 10
		this.file = file;
	}

       .... more code ....
}

It's the constructor.  I forgot to put a access restriction like 'public' or 'private' on it.  My parser must think it's manditory.  Debating weather it should be.

One thing I don't care for in Java is that the default access has no keyword.  It's not *bad* but it seems like better code would be produced by requiring one.  Just thinking.

Discussions