Skip to content

Conversation

@Starexify
Copy link

This PR allows interfaces to be parsed and not just throw errors, which would make the whole script no longer work, even when working classes are inside.

For now this is just allowing people to add interfaces without getting errors if they have them in their code structure alongside classes/enums etc.

Now

image

Before this would be shown

image

Since hscript would return unexpected(TId(ident));

@Starexify
Copy link
Author

Starexify commented Jan 18, 2026

Also I tried in tryhaxe this snippet which shows how externs behave, private, static, final works, but not override/inline. So that's why I didnt allow the inline keyword if someone is wondering

class Test {
	static function main() {
		var test = new TestClass();
		trace(TestClass.id);
		trace(test.nr);
		trace(test.test());
	}
}

class TestClass implements TestInterface {
	var name:String = "class";

	public static final id:Int = 1;

	public var nr:Int = 90;

	public function new() {}

	public function test():String {
		return "TEST";
	}
}

extern interface TestInterface extends TestInterfaceTwo {
	private var name:String;
	static final id:Int;
	var nr:Int;
}

interface TestInterfaceTwo {
	function test():String;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant