void skipWhite() { while (Char.IsWhiteSpace(io.getNextChar())) { io.ReadChar(); } }
public void parse_and_compile() { prolog(); tree = new VarList(); IDictionaryEnumerator libEnum = lib.get_enum(); while (libEnum.MoveNext()) { Var procvar = new Var(); LibFunc lfunc = (LibFunc)libEnum.Value; procvar.setName(lfunc.nameShort); procvar.setType(Var.VAR_BLOCK); procvar.setTypeId(Tok.TOK_VOID); procvar.nodes = new VarList(); for (int i = 0; i < lfunc.typeParams.Count; i++) { Var param = new Var(); param.setName("PAR_" + i); param.setType(Var.VAR_PARAM); param.setTypeId((int)lfunc.typeParams[i]); procvar.nodes.add(param); } tree.add(procvar); } io.ReadChar(); tok.scan(); declarations(tree); while (tok.NotEOF()) { stmt(tree, null, null); } io.Message("compiled successfuly"); io.TreeDraw(tree); epilog(); }