107 sstack.peek().add(0, statement); |
107 sstack.peek().add(0, statement); |
108 return statement; |
108 return statement; |
109 } |
109 } |
110 |
110 |
111 /** |
111 /** |
|
112 * Prepend a list of statement to the block being generated |
|
113 * @param statements a list of statements to prepend |
|
114 */ |
|
115 public void prependStatements(final List<Statement> statements) { |
|
116 assert statements != null; |
|
117 sstack.peek().addAll(0, statements); |
|
118 } |
|
119 |
|
120 |
|
121 /** |
112 * Get the last statement that was emitted into a block |
122 * Get the last statement that was emitted into a block |
113 * @return the last statement emitted |
123 * @return the last statement emitted |
114 */ |
124 */ |
115 public Statement getLastStatement() { |
125 public Statement getLastStatement() { |
116 return lastStatement; |
126 return lastStatement; |