Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: replace uses of the Type macro with is-a tests #241

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Markup Shorthands: markdown yes
urlPrefix: https://tc39.github.io/ecma262/#; spec: ECMASCRIPT
type: abstract-op
text: ObjectCreate; url: sec-objectcreate
text: Type; url: sec-ecmascript-data-types-and-values
text: ToString; url: sec-tostring
text: Call; url: sec-call
type: interface
Expand All @@ -24,6 +23,24 @@ urlPrefix: https://tc39.github.io/ecma262/#; spec: ECMASCRIPT
type: dfn
text: %parseFloat%; url: sec-parsefloat-string
text: %parseInt%; url: sec-parseint-string-radix
url: sec-ecmascript-language-types-bigint-type
text: is a BigInt
text: is not a BigInt
url: sec-ecmascript-language-types-boolean-type
text: is a Boolean
text: is not a Boolean
url: sec-ecmascript-language-types-number-type
text: is a Number
text: is not a Number
url: sec-ecmascript-language-types-string-type
text: is a String
text: is not a String
url: sec-ecmascript-language-types-symbol-type
text: is a Symbol
text: is not a Symbol
url: sec-object-type
text: is an Object
text: is not an Object
</pre>

<h2 id="status" class="no-num no-toc">Status</h2>
Expand Down Expand Up @@ -92,7 +109,7 @@ its \[[Prototype]] an empty object, created as if by
1. If |data| is [=list/is empty|empty=], [=list/append=] |message| to |data|.
1. Otherwise:
1. Let |first| be |data|[0].
1. If <a abstract-op>Type</a>(|first|) is not String, then [=list/prepend=] |message| to |data|.
1. If |first| [=is not a String=], then [=list/prepend=] |message| to |data|.
1. Otherwise:
1. Let |concat| be the concatenation of |message|, U+003A (:), U+0020 SPACE, and |first|.
1. Set |data|[0] to |concat|.
Expand Down Expand Up @@ -315,11 +332,11 @@ more arguments are left. It returns a [=/list=] of objects suitable for printing
1. If |specifier| is `%s`, let |converted| be the result of
[$Call$](<a idl>%String%</a>, **undefined**, « |current| »).
1. If |specifier| is `%d` or `%i`:
1. If [$Type$](|current|) is Symbol, let |converted| be `NaN`
1. If |current| [=is a Symbol=], let |converted| be `NaN`
1. Otherwise, let |converted| be the result of
[$Call$]([=%parseInt%=], **undefined**, « |current|, 10 »).
1. If |specifier| is `%f`:
1. If [$Type$](|current|) is Symbol, let |converted| be `NaN`
1. If |current| [=is a Symbol=], let |converted| be `NaN`
1. Otherwise, let |converted| be the result of
[$Call$]([=%parseFloat%=], **undefined**, « |current| »).
1. If |specifier| is `%o`, optionally let |converted| be |current| with
Expand Down
Loading