mirror of
https://github.com/bendtherules/not-a-js-engine.git
synced 2026-08-18 22:01:53 +00:00
Feature - Support plus binary expression for number and string
This commit is contained in:
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user