Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
fixes #15: allow reserved word names in NativeFunction grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Sep 28, 2016
1 parent 1c13f99 commit c44efc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proposal.html
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ <h1>(<a href="http://tc39.github.io/ecma262/#sec-function.prototype.tostring">19

<ins class="block">
<emu-alg>
1. If _func_ is a <emu-xref href="#sec-bound-function-exotic-objects">Bound Function exotic object</emu-xref> or a <emu-xref href="#sec-ecmascript-standard-built-in-objects">built-in Function object</emu-xref>, then return an implementation-dependent String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ is a <emu-xref href="#sec-well-known-intrinsic-objects">Well-known Intrinsic Object</emu-xref>, the portion of the returned String that would be matched by |BindingIdentifier| must be the initial value of the *name* property of _func_.
1. If _func_ is a <emu-xref href="#sec-bound-function-exotic-objects">Bound Function exotic object</emu-xref> or a <emu-xref href="#sec-ecmascript-standard-built-in-objects">built-in Function object</emu-xref>, then return an implementation-dependent String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ is a <emu-xref href="#sec-well-known-intrinsic-objects">Well-known Intrinsic Object</emu-xref>, the portion of the returned String that would be matched by |IdentifierName| must be the initial value of the *name* property of _func_.
1. If _func_ has a [[SourceText]] internal slot and Type(_func_.[[SourceText]]) is String
1. Let _sourceText_ be _func_.[[SourceText]].
1. Let _sourceText_ be _sourceText_ with all occurrences of the code unit sequence 0x000D (CARRIAGE RETURN) 0x000A (LINE FEED) replaced with the single code unit 0x000A (LINE FEED).
Expand All @@ -539,7 +539,7 @@ <h1>(<a href="http://tc39.github.io/ecma262/#sec-function.prototype.tostring">19

<emu-grammar>
NativeFunction :
`function` BindingIdentifier? `(` FormalParameters `)` `{` `[` `native` `code` `]` `}`
`function` IdentifierName? `(` FormalParameters `)` `{` `[` `native` `code` `]` `}`
</emu-grammar>
</ins>
</emu-clause>

0 comments on commit c44efc4

Please sign in to comment.