Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 // Copyright (C) 2008 Google Inc. | 1 // Copyright (C) 2008 Google Inc. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 public Object getValue() { return null; } | 57 public Object getValue() { return null; } |
58 | 58 |
59 @Override | 59 @Override |
60 public List<? extends Statement> children() { | 60 public List<? extends Statement> children() { |
61 return childrenAs(Statement.class); | 61 return childrenAs(Statement.class); |
62 } | 62 } |
63 | 63 |
64 public Statement getTranslation() { return children().get(0); } | 64 public Statement getTranslation() { return children().get(0); } |
65 | 65 |
66 public void render(RenderContext rc) { | 66 public void render(RenderContext rc) { |
67 rc.getOut().consume("/* Start translated code */"); | 67 rc.getOut().consume("/* Start translated code */"); |
Jasvir
2009/05/22 04:50:51
Why was this change made? Previously translated c
MikeSamuel
2009/05/22 20:42:54
Part of the contract of render is that it produces
Jasvir
2009/05/27 21:21:15
Making the first line a throw would be both safe a
ihab.awad
2009/05/29 05:11:04
Changed to emit a JavaScript 'throw'.
| |
68 children().get(0).render(rc); | 68 children().get(0).render(rc); |
69 rc.getOut().consume("/* End translated code */"); | 69 rc.getOut().consume("/* End translated code */"); |
70 } | 70 } |
71 | 71 |
72 @Override | 72 @Override |
73 public boolean isTerminal() { | 73 public boolean isTerminal() { |
74 return true; | 74 return true; |
75 } | 75 } |
76 } | 76 } |
LEFT | RIGHT |