APWTCL Arnulf's Preferred Web Tcl

Check-in [ab46330ed7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:initial version
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ab46330ed76b0ba3b0e6b5d2434fc85266d0164e
User & Date: arnulf 2012-04-18 16:51:10
Context
2012-04-18
21:46
fixes and new code check-in: 3f365d7d4a user: arnulf tags: trunk
16:51
initial version check-in: ab46330ed7 user: arnulf tags: trunk
16:50
initial version check-in: 7e61f47e50 user: arnulf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added src/org/apwtcl/lang/cmd/JavadebugCommand.java.

































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*=======================================================
 * JavadebugCommand.java 
 *
 * "A Tcl like language implementation in Java named APWTCL
 * ((Java) Arnulf's Preferred Web Tcl)"
 *
 * APWTCL JavadebugCommand class
 *
 * Released under same BSD license as Tcl.
 * (Tcl BSD license found at <http://www.tcl.tk/software/tcltk/license.html>)
 *
 * Copyright 2012 Arnulf P. Wiedemann
 *
 */

package org.apwtcl.lang.cmd;

import java.util.ArrayList;

import org.apwtcl.lang.CallFrame;
import org.apwtcl.lang.Command;
import org.apwtcl.lang.Interp;
import org.apwtcl.lang.ApwtclObj;
import org.apwtcl.lang.Token;

public class JavadebugCommand extends Token {

  /* ==================== JavadebugCommand ================================== */
  public JavadebugCommand() {
  }

  /* ==================== javadebugCmd ================================== */
  public int javadebugCmd(Interp interp, ArrayList<ApwtclObj> args) {
print("javadebug called!"+args+"!");
    int val = 1;
    String type = args.get(1).toString();
    if (args.size() > 1) {
      val = Integer.parseInt(args.get(2).getString());
    }
    if (type.equals("eval_subst_debug")) {
print("ev_subst!"+interp.eval_statement.eval_subst_debug+"!"+val+"!");
      interp.eval_statement.eval_subst_debug = val;
    }
    if (type.equals("eval_ipol_debug")) {
print("ev_ipol!"+interp.eval_statement.eval_ipol_debug+"!"+val+"!");
      interp.eval_statement.eval_ipol_debug = val;
    }
    if (type.equals("eval_cmd_debug")) {
      interp.eval_statement.eval_stmt_debug = val;
    }
    if (type.equals("expr_debug")) {
//      interp.eval_statement.expr_debug = val;
    }
    if (type.equals("expr_parser_debug")) {
//      interp.eval_statement.expr_parser_debug = val;
    }
    if (type.equals("class_command_debug")) {
//      this.class_command_debug = 1;
    }
print("javadebug set: "+type+"!"+val+"!");
    return interp.OK;
  }

}