Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for load external file #1

Open
francescoagati opened this issue Oct 16, 2015 · 2 comments
Open

support for load external file #1

francescoagati opened this issue Oct 16, 2015 · 2 comments

Comments

@francescoagati
Copy link
Contributor

Hi,
i'am try to use compiletime lib for load external file. But there is a macro conflict i think.

with this code
return jsx( CompileTime.interpolateFile('a.txt'));
i get
C:\HaxeToolkit\haxe\std/haxe/macro/ExprTools.hx:286: characters 11-16 : Unsupported expression: { expr => ECall({ expr => EField({ expr => EConst(CIdent(CompileTime)), pos => #pos(src/Main.hx:60: characters 20-31) },interpolateFile), pos => #pos(src/Main.hx:60: characters 20-47) },[{ expr => EConst(CString(a.txt)), pos => #pos(src/Main.hx:60: characters 48-55) }]), pos => #pos(src/Main.hx:60: characters 20-56) }

@elsassph
Copy link
Contributor

Yes your interpolate macro hasn't run when the jsx-one happens. It sounds like interpolating a file should be built into jsx, like jsx('./source.txt').

@francescoagati
Copy link
Contributor Author

yes or do another macro like jsxParseFromFile

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

No branches or pull requests

2 participants