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:
@ -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 {
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user