Advertisement
C0BRA

Syntax extension

Apr 27th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. function meta::test(arg2, arg1)
  2.  
  3. end
  4. function meta::test(string arg1, string arg2)
  5.  
  6. end
  7. function meta.test(meta self, string arg1, string arg2)
  8.  
  9. end
  10. function meta.test(meta& self, string arg1, string arg2)
  11.  
  12. end
  13.  
  14.  
  15. --- is translated to:
  16.  
  17.  
  18. function meta:test (arg2, arg1) expects(meta, nil, nil)
  19.  
  20. end
  21. function meta:test (arg1, arg2) expects(meta, "string", "string")
  22.  
  23. end
  24. function meta.test (self, arg1, arg2) expects("meta", "string", "string")
  25.  
  26. end
  27. function meta.test (self, arg1, arg2) expects(meta, "string", "string")
  28.  
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement