© Ecma International 2015
Contents Page
1 Scope .............................................................................................................................................1
2 Conformance .................................................................................................................................1
3 Normative references ....................................................................................................................1
4 Overview ........................................................................................................................................1
4.1 Web Scripting ................................................................................................................................2
4.2 ECMAScript Overview ...................................................................................................................2
Objects...........................................................................................................................................3 4.2.1
The Strict Variant of ECMAScript .................................................................................................4 4.2.2
4.3 Terms and definitions ...................................................................................................................5
4.4 Organization of This Specification ...............................................................................................8
5 Notational Conventions ................................................................................................................8
5.1 Syntactic and Lexical Grammars ..................................................................................................8
Context-Free Grammars................................................................................................................8 5.1.1
The Lexical and RegExp Grammars .............................................................................................9 5.1.2
The Numeric String Grammar .......................................................................................................9 5.1.3
The Syntactic Grammar ................................................................................................................9 5.1.4
Grammar Notation ....................................................................................................................... 10 5.1.5
5.2 Algorithm Conventions ............................................................................................................... 14
5.3 Static Semantic Rules ................................................................................................................. 16
6 ECMAScript Data Types and Values .......................................................................................... 16
6.1 ECMAScript Language Types ..................................................................................................... 16
The Undefined Type .................................................................................................................... 16 6.1.1
The Null Type............................................................................................................................... 17 6.1.2
The Boolean Type ....................................................................................................................... 17 6.1.3
The String Type ........................................................................................................................... 17 6.1.4
The Symbol Type......................................................................................................................... 17 6.1.5
The Number Type ........................................................................................................................ 18 6.1.6
The Object Type .......................................................................................................................... 19 6.1.7
6.2 ECMAScript Specification Types ................................................................................................ 29
The List and Record Specification Type .................................................................................... 29 6.2.1
The Completion Record Specification Type .............................................................................. 30 6.2.2
The Reference Specification Type .............................................................................................. 31 6.2.3
The Property Descriptor Specification Type .............................................................................. 33 6.2.4
The Lexical Environment and Environment Record Specification Types ................................ 35 6.2.5
Data Blocks ................................................................................................................................. 35 6.2.6
7 Abstract Operations .................................................................................................................... 36
7.1 Type Conversion ......................................................................................................................... 36
ToPrimitive ( input [, PreferredType] ) ........................................................................................ 36 7.1.1
ToBoolean ( argument ) .............................................................................................................. 37 7.1.2
ToNumber ( argument ) ............................................................................................................... 38 7.1.3
ToInteger ( argument ) ................................................................................................................ 40 7.1.4
ToInt32 ( argument ) .................................................................................................................... 40 7.1.5
ToUint32 ( argument ) ................................................................................................................. 41 7.1.6
ToInt16 ( argument ) .................................................................................................................... 41 7.1.7
ToUint16 ( argument ) ................................................................................................................. 41 7.1.8
ToInt8 ( argument ) ...................................................................................................................... 41 7.1.9
ToUint8 ( argument ) ................................................................................................................... 42 7.1.10
ToUint8Clamp ( argument ) ......................................................................................................... 42 7.1.11
ToString ( argument ) .................................................................................................................. 42 7.1.12
评论2
最新资源