refactor(facade): inline StringWrapper (#12051)

This commit is contained in:
Alex Eagle
2016-10-06 15:10:27 -07:00
committed by Tobias Bosch
parent bb35fcb562
commit 8c975ed156
34 changed files with 105 additions and 288 deletions

View File

@ -7,7 +7,7 @@
*/
import {AST, AstVisitor, Binary, BindingPipe, Chain, Conditional, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead} from '../../src/expression_parser/ast';
import {StringWrapper, isString} from '../../src/facade/lang';
import {isString} from '../../src/facade/lang';
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/ml_parser/interpolation_config';
class Unparser implements AstVisitor {
@ -134,7 +134,7 @@ class Unparser implements AstVisitor {
visitLiteralPrimitive(ast: LiteralPrimitive, context: any) {
if (isString(ast.value)) {
this._expression += `"${StringWrapper.replaceAll(ast.value, Unparser._quoteRegExp, '\"')}"`;
this._expression += `"${ast.value.replace( Unparser._quoteRegExp, '\"')}"`;
} else {
this._expression += `${ast.value}`;
}