aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/testLua/yueliang-0.4.1/nat-5.1.3/test/parser_log/sample_09.lua
blob: 67c6cf30af168d0832add436db1e60ca4aed58c5 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
-- START OF SOURCE --
while true do foo=not foo end
while foo~=42 do foo=foo-1 end
while true do break end
-- END OF SOURCE --

-- TOP: begin
  open_func
  
  chunk:
  -- STATEMENT: begin 'while' line=1
  while_stat: begin/condition
    cond: begin
    expr:
    simpleexp: true
    cond: end
    enterblock(isbreakable=true)
    while_stat: block
    block: begin
      enterblock(isbreakable=false)
      chunk:
      -- STATEMENT: begin 'expr' line=1
      prefixexp: <name>
          str_checkname: 'foo'
          singlevar(kind): 'VGLOBAL'
      expr_stat: assignment k='VGLOBAL'
      assignment: '=' -- RHS elements follows
        explist1: begin
        expr:
          subexpr: uop='not'
        prefixexp: <name>
            str_checkname: 'foo'
            singlevar(kind): 'VGLOBAL'
        explist1: end
      -- STATEMENT: end 'expr'
      
      leaveblock
    block: end
    leaveblock
  while_stat: end
  -- STATEMENT: end 'while'
  
  -- STATEMENT: begin 'while' line=2
  while_stat: begin/condition
    cond: begin
    expr:
    prefixexp: <name>
        str_checkname: 'foo'
        singlevar(kind): 'VGLOBAL'
      subexpr: binop='~='
      simpleexp: <number>=42
      subexpr: -- evaluate
    cond: end
    enterblock(isbreakable=true)
    while_stat: block
    block: begin
      enterblock(isbreakable=false)
      chunk:
      -- STATEMENT: begin 'expr' line=2
      prefixexp: <name>
          str_checkname: 'foo'
          singlevar(kind): 'VGLOBAL'
      expr_stat: assignment k='VGLOBAL'
      assignment: '=' -- RHS elements follows
        explist1: begin
        expr:
        prefixexp: <name>
            str_checkname: 'foo'
            singlevar(kind): 'VGLOBAL'
          subexpr: binop='-'
          simpleexp: <number>=1
          subexpr: -- evaluate
        explist1: end
      -- STATEMENT: end 'expr'
      
      leaveblock
    block: end
    leaveblock
  while_stat: end
  -- STATEMENT: end 'while'
  
  -- STATEMENT: begin 'while' line=3
  while_stat: begin/condition
    cond: begin
    expr:
    simpleexp: true
    cond: end
    enterblock(isbreakable=true)
    while_stat: block
    block: begin
      enterblock(isbreakable=false)
      chunk:
      -- STATEMENT: begin 'break' line=3
      break_stat: -- break out of loop
      -- STATEMENT: end 'break'
      leaveblock
    block: end
    leaveblock
  while_stat: end
  -- STATEMENT: end 'while'
  
  close_func
-- TOP: end