module.js 682 B

123456789101112131415161718192021222324252627282930313233
  1. var Procedure = require("procedure.js");
  2. var Type = require("type.js");
  3. var AnyType = Type.Basic.extend({
  4. init: function AnyType(){
  5. Type.Basic.prototype.init.call(this, "ANY");
  6. },
  7. findSymbol: function(){return this;},
  8. callGenerator: function(codegenerator, id){
  9. return new Procedure.CallGenerator(codegenerator, id);
  10. }
  11. });
  12. var any = new AnyType();
  13. var Module = Type.Basic.extend({
  14. init: function(){
  15. Type.Basic.prototype.init.call(this, "MODULE");
  16. }
  17. });
  18. var JSModule = Module.extend({
  19. init: function(){
  20. Module.prototype.init.call(this);
  21. },
  22. findSymbol: function(id){
  23. return any;
  24. }
  25. });
  26. exports.AnyType = AnyType;
  27. exports.JS = JSModule;
  28. exports.Type = Module;