Revert "feat(i18n): add support for custom placeholder names"
This reverts commit 2abb414cfb
.
This commit is contained in:
@ -49,7 +49,6 @@ import {
|
||||
var _implicitReceiver = new ImplicitReceiver();
|
||||
// TODO(tbosch): Cannot make this const/final right now because of the transpiler...
|
||||
var INTERPOLATION_REGEXP = /\{\{([\s\S]*?)\}\}/g;
|
||||
var COMMENT_REGEX = /\/\//g;
|
||||
|
||||
class ParseException extends BaseException {
|
||||
constructor(message: string, input: string, errLocation: string, ctxLocation?: any) {
|
||||
@ -68,7 +67,7 @@ export class Parser {
|
||||
|
||||
parseAction(input: string, location: any): ASTWithSource {
|
||||
this._checkNoInterpolation(input, location);
|
||||
var tokens = this._lexer.tokenize(this._stripComments(input));
|
||||
var tokens = this._lexer.tokenize(input);
|
||||
var ast = new _ParseAST(input, location, tokens, true).parseChain();
|
||||
return new ASTWithSource(ast, input, location);
|
||||
}
|
||||
@ -97,7 +96,7 @@ export class Parser {
|
||||
}
|
||||
|
||||
this._checkNoInterpolation(input, location);
|
||||
var tokens = this._lexer.tokenize(this._stripComments(input));
|
||||
var tokens = this._lexer.tokenize(input);
|
||||
return new _ParseAST(input, location, tokens, false).parseChain();
|
||||
}
|
||||
|
||||
@ -123,7 +122,7 @@ export class Parser {
|
||||
let expressions = [];
|
||||
|
||||
for (let i = 0; i < split.expressions.length; ++i) {
|
||||
var tokens = this._lexer.tokenize(this._stripComments(split.expressions[i]));
|
||||
var tokens = this._lexer.tokenize(split.expressions[i]);
|
||||
var ast = new _ParseAST(input, location, tokens, false).parseChain();
|
||||
expressions.push(ast);
|
||||
}
|
||||
@ -159,10 +158,6 @@ export class Parser {
|
||||
return new ASTWithSource(new LiteralPrimitive(input), input, location);
|
||||
}
|
||||
|
||||
private _stripComments(input: string): string {
|
||||
return StringWrapper.split(input, COMMENT_REGEX)[0].trim();
|
||||
}
|
||||
|
||||
private _checkNoInterpolation(input: string, location: any): void {
|
||||
var parts = StringWrapper.split(input, INTERPOLATION_REGEXP);
|
||||
if (parts.length > 1) {
|
||||
|
Reference in New Issue
Block a user