1 30 31 35 36 package jbet.cmd; 37 import jbet.*; 38 39 public class assemble implements Command 40 { 41 public int helplevel() { return 1; } 42 public String shorthelp() { return "assemble a class"; } 43 public String longhelp() { 44 return 45 "jbet assemble <string>\t\tassemble a class from string\n" + 46 "The input format is the same as the output of jbet disassemble.\n" + 47 "To assemble from a file, use jbet assemble %(include <file>).\n"; } 48 49 public void run (Lexer lexer) throws Exception 50 { 51 lexer.match(Token.END_OF_OPTS); 52 53 ClassInfo cr = new ClassInfo (ClassInfoLoader.directory(Jbet.outputdir), lexer); 54 55 Jbet.loader.putClass(cr); 56 Jbet.info.println("assembled " + cr.name()); 57 58 if (Jbet.default_class == null) 59 Jbet.setDefault(cr.name()); 60 } 61 } 62 | Popular Tags |