aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/testLua/yueliang-0.4.1/nat-5.0.3/test/parser_log/sample_09.lua
blob: 2236388a1ca86cfc6267e47e4c01fe246b2ebace (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
-- 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
  expr:
  simpleexp: true
    enterblock(isbreakable=true)
    while_stat: block
    block: begin
      enterblock(isbreakable=false)
      chunk:
      -- STATEMENT: begin 'expr' line=1
      prefixexp: <name>
          str_checkname: 'foo'
          singlevar: name='foo'
      expr_stat: assignment k='VLOCAL'
      assignment: '=' -- RHS elements follows
        explist1: begin
        expr:
          subexpr: uop='not'
        prefixexp: <name>
            str_checkname: 'foo'
            singlevar: name='foo'
        explist1: end
      -- STATEMENT: end 'expr'
      
      leaveblock
    block: end
    leaveblock
  while_stat: end
  -- STATEMENT: end 'while'
  
  -- STATEMENT: begin 'while' line=2
  while_stat: begin/condition
  expr:
  prefixexp: <name>
      str_checkname: 'foo'
      singlevar: name='foo'
    subexpr: binop='~='
    simpleexp: <number>=42
    subexpr: -- evaluate
    enterblock(isbreakable=true)
    while_stat: block
    block: begin
      enterblock(isbreakable=false)
      chunk:
      -- STATEMENT: begin 'expr' line=2
      prefixexp: <name>
          str_checkname: 'foo'
          singlevar: name='foo'
      expr_stat: assignment k='VLOCAL'
      assignment: '=' -- RHS elements follows
        explist1: begin
        expr:
        prefixexp: <name>
            str_checkname: 'foo'
            singlevar: name='foo'
          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
  expr:
  simpleexp: true
    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