Revision 634522da69b14b38c15b14d6b717b1289812e9bb authored by Tim Foley on 19 June 2017, 15:47:23 UTC, committed by Tim Foley on 19 June 2017, 16:56:42 UTC
The basic idea of this change is that user code can just write:

    #include "foo.h"

and then if `foo.h` gets found in a list of registered directories for "auto-import," then it actually gets interpreted as if the user had writte, more or less:

    __import foo;

That is, the code in `foo.h` will be treated as Slang, and will be fully parsed and checked (no matter what the source language had been), and the scoping rules will be those of `__import` instead of `#include`.

This is a really big hammer, and I could imagine it smashing fingers if used poorly.
I'm not sure this feature will pan out, but we need to try things to know.

One big piece of that that I'll likely keep in either case is an overhaul of command-line options parsing for `slangc`. In particular, this logic has been moved into the core `slang` library (so that users can just pass options in via the API), and it is all done on UTF-8 strings rather than wide strings (which was always going to be Windows-specific).
1 parent cafed77
History
File Mode Size
build
examples
external
source
tests
tools
.gitignore -rw-r--r-- 247 bytes
.gitmodules -rw-r--r-- 107 bytes
LICENSE -rw-r--r-- 1.1 KB
README.md -rw-r--r-- 1.5 KB
appveyor.yml -rw-r--r-- 1.5 KB
slang.h -rw-r--r-- 29.1 KB
slang.sln -rw-r--r-- 6.3 KB
test.bat -rw-r--r-- 1.4 KB

README.md

back to top