You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have first this issue: Simn/hxparse#59
Additionally i get this: C:\HaxeToolkit\haxe\lib\haxeparser/git/src/haxeparser/HaxeParser.hx:369: character 1 : You cannot use @:build inside a macro : make sure that your type is not used in macro
If i remove just the static function it works.
Another error: C:\HaxeToolkit\haxe\lib\haxeparser/git/src/haxeparser/HaxeParser.hx:369: character 1 : You cannot use @:build inside a macro : make sure that your type is not used in macro used macro
Can i use it at macro level? If not Is there anlternative for it?
Full parsing not just an expression.
Some background Infos:
Technically I need to test a haxe file before using it (Syntax and also to test if the class using some packages that are not allowed in is target. And with the current project. I need to test allot in a big environment (with allot of libraries) so compiling each takes to long.
/* Current target is --js*/macrofunctiontest () {
if(isValidFile('HelloWorld.hx')) {
Context.getType('HelloWorld');
}
returnmacronull;
}
I would suggest you write a command line tool that does all of the checking and use it as a pre-build step. that way you can speed up compilation during development and testing because all that extra parsing and checking only needs to happens when those files change and not with every build. it also eliminates issues with cached types.
you could even use checkstyle for your testing needs by writing a new check that blacklists certain full qualified types or packages (in that case: please send your PR to checkstyle).
AlexHaxe
changed the title
Doesn't work at 4.2.4
parsing Haxe code at compile time
Feb 21, 2022
We have first this issue: Simn/hxparse#59
Additionally i get this:
C:\HaxeToolkit\haxe\lib\haxeparser/git/src/haxeparser/HaxeParser.hx:369: character 1 : You cannot use @:build inside a macro : make sure that your type is not used in macro
If i remove just the static function it works.
Another error:
C:\HaxeToolkit\haxe\lib\haxeparser/git/src/haxeparser/HaxeParser.hx:369: character 1 : You cannot use @:build inside a macro : make sure that your type is not used in macro
used macroCan i use it at macro level? If not Is there anlternative for it?
Full parsing not just an expression.
Some background Infos:
Technically I need to test a haxe file before using it (Syntax and also to test if the class using some packages that are not allowed in is target. And with the current project. I need to test allot in a big environment (with allot of libraries) so compiling each takes to long.
My plan was to define this type dynamically and cache any errors.
Context.getType can not be cached for this type of errors.
(https://github.com/HaxeCheckstyle/haxeparser/blob/master/src/haxeparser/DefinitionConverter.hx)
The text was updated successfully, but these errors were encountered: