Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 // Copyright (C) 2007 Google Inc. | 1 // Copyright (C) 2007 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 MessageLevel.FATAL_ERROR), | 181 MessageLevel.FATAL_ERROR), |
182 | 182 |
183 CANNOT_LOAD_A_DYNAMIC_ES53_MODULE( | 183 CANNOT_LOAD_A_DYNAMIC_ES53_MODULE( |
184 "%s: Dynamically computed names should use load.async()", | 184 "%s: Dynamically computed names should use load.async()", |
185 MessageLevel.FATAL_ERROR), | 185 MessageLevel.FATAL_ERROR), |
186 | 186 |
187 CANNOT_LOAD_A_DYNAMIC_SERVERJS_MODULE( | 187 CANNOT_LOAD_A_DYNAMIC_SERVERJS_MODULE( |
188 "%s: Dynamically computed names should use require.async()", | 188 "%s: Dynamically computed names should use require.async()", |
189 MessageLevel.FATAL_ERROR), | 189 MessageLevel.FATAL_ERROR), |
190 | 190 |
191 TOP_LEVEL_FUNC_INCOMPATIBLE_WITH_CAJA( | 191 TOP_LEVEL_FUNC_INCOMPATIBLE_WITH_CAJA( |
kpreid2
2012/12/18 20:04:22
Mitigator should be making this obsolete too.
Jasvir
2012/12/26 23:31:13
In a separate CL.
kpreid2
2013/01/02 18:59:16
OK, but please note in the description of this one
Jasvir
2013/01/02 19:42:59
Done.
| |
192 "%s: Caja makes top-level functions local to a script tag." | 192 "%s: Caja makes top-level functions local to a script tag." |
193 + " If you need a global function, use: %s", | 193 + " If you need a global function, use: %s", |
194 MessageLevel.LINT); | 194 MessageLevel.LINT); |
195 | 195 |
196 private final String formatString; | 196 private final String formatString; |
197 private final MessageLevel level; | 197 private final MessageLevel level; |
198 private final int paramCount; | 198 private final int paramCount; |
199 | 199 |
200 RewriterMessageType(String formatString, MessageLevel level) { | 200 RewriterMessageType(String formatString, MessageLevel level) { |
201 this.formatString = formatString; | 201 this.formatString = formatString; |
202 this.level = level; | 202 this.level = level; |
203 this.paramCount = MessageType.formatStringArity(formatString); | 203 this.paramCount = MessageType.formatStringArity(formatString); |
204 } | 204 } |
205 | 205 |
206 public int getParamCount() { | 206 public int getParamCount() { |
207 return paramCount; | 207 return paramCount; |
208 } | 208 } |
209 | 209 |
210 public void format(MessagePart[] parts, MessageContext context, | 210 public void format(MessagePart[] parts, MessageContext context, |
211 Appendable out) throws IOException { | 211 Appendable out) throws IOException { |
212 MessageType.formatMessage(formatString, parts, context, out); | 212 MessageType.formatMessage(formatString, parts, context, out); |
213 } | 213 } |
214 | 214 |
215 public MessageLevel getLevel() { return level; } | 215 public MessageLevel getLevel() { return level; } |
216 } | 216 } |
LEFT | RIGHT |