refactor(parser): align expression language with host language

Remove "enhancements" to the language from the parser, so the expression language mimics the host language.
This commit is contained in:
vsavkin
2014-12-16 10:10:32 -08:00
parent 90daca02cf
commit 3d534928b5
6 changed files with 17 additions and 75 deletions

View File

@ -33,21 +33,6 @@ bool toBool(x) {
return false;
}
autoConvertAdd(a, b) {
if (a != null && b != null) {
if (a is String && b is! String) {
return a + b.toString();
}
if (a is! String && b is String) {
return a.toString() + b;
}
return a + b;
}
if (a != null) return a;
if (b != null) return b;
return 0;
}
String stringify(obj) => obj.toString();
class StringWrapper {

View File

@ -30,10 +30,6 @@ export function toBool(obj) {
return !!obj;
}
export function autoConvertAdd(a, b) {
return a + b;
}
export function stringify(token):string {
if (typeof token === 'string') {
return token;