Feature - Support plus binary expression for number and string

This commit is contained in:
2020-08-13 18:06:56 +05:30
parent 066e92d4b5
commit 01cac9f672
7 changed files with 78 additions and 1 deletions
+10
View File
@@ -29,3 +29,13 @@ export class CompletionRecord implements TCompletionRecord {
export function NormalCompletion(value?: TValue) {
return new CompletionRecord('normal', value);
}
export function v(cr: CompletionRecord): LanguageType | undefined {
if (cr[TypeString] === 'normal') {
return cr[ValueString];
}
// TODO: Else, from call site, return same value
return undefined;
}
export class AbruptCompletion extends TypeError {}