Created
May 27, 2017 19:24
-
-
Save badcc/a6c7231e471a3f4a514e3756cc871196 to your computer and use it in GitHub Desktop.
Meta hax. I tried using __lt to get `#include<` but working but you can't compare table/userdata with strings. This is good enough.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local _ = function() end | |
local include=setmetatable({},{__call=function(b,c)local d=newproxy(true)local e=getmetatable(d)e.__len=function()print('You included:',c)end return d end}) | |
_( | |
#include 'stdio.h', | |
#include 'test' | |
) | |
--> You included: stdio.h | |
--> You included: test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment