Twitter hashtag: #esspec
便利ツール
自己紹介 (近況報告)
syumai syumai.icon
引っ越した
部屋が段ボールまみれ
tars0x9752 (たーず / naoki aoyama) tars0x9752.icon
オーディオ周りの機材を変えた(audiofuse studioというやつを導入)
ので声がでないかも
マイク: SM58
yebis0942 (えびす) yebis0942.icon
Go, Reactを書いて暮らしています
最近はFigmaに入門したりしていました
antisatori
フィヨルドブートキャンプで学習している無職です
フロントエンドが好きでReactをよく書いてます
yasumura / harupiyo
Google Chrome のバグ報告しました
前回のあらすじ
今回の範囲
11.1 Source Text
U+0000 to U+10FFFFまでの間の Unicode code point の値が許されてる
NOTE: JavaScriptとJavaで\uXXXXのようなunicode escape sequenceの扱いが違う
code:js
// abc \u000A console.log("a");
console.log("b");
console.log("A\nB\u000AC");
code:java
public class HelloWorld {
// Comment \n hoge OK
// Comment \u000A hoge NG
public static void main(String []args){
System.out.println("Hello, World!\n");\u000ASystem.out.println("World!"); // OK
}
}
JavaScriptのString.prototype.split
code:js
"𩸽".split("").length // 2
"鯨".split("").length // 1
UTF16EncodeCodePoint
code:javascript
String.fromCodePoint(0xffff).length
1
String.fromCodePoint(0x10000).length
2
String.prototype.codePointAt
code:js
const s = "𐀀𐀁𐀂𐀃𐀄";
undefined
String.fromCodePoint(s.codePointAt(2))
'𐀁'
String.fromCodePoint(s.codePointAt(4))
'𐀂'
String.fromCodePoint(s.codePointAt(5))
'\udc02'
String.fromCodePoint(s.codePointAt(6))
'𐀃'
encodeURI("𩸽"0.toWellFormed()) '%EF%BF%BD'
...
休憩後: (antisatoriさんのターン) Parsinag and early error detection may be interleaved in an implementation-defined manner.
Q. Parse Nodeは構文木のルートなのでは?
A. Parse Nodeは構文木のひとつひとつのノードのことなので、ルートとは限定されていない
When a parse is successful, it constructs a parse tree, a rooted tree structure in which each node is a Parse Node.
a parse pass
Multi-pass compilerのpass
NOTE1
処理系のearly errorとsyntax errorの扱い
少なくともどちらかを返していれば仕様に準拠している
11.2 Types of Source Code
ECMAScript code
1. Global code
2. Eval code
3. Function code
いくつかの構文によるfunction codeでは
then the source text matched by the BindingIdentifier... is also included in the function code ...
という特別な作用がある
(includedされて何が起きるのかは謎)
4. Module code
global codeとほぼ同じだが
The module code of a particular module does not include any source text that is parsed as part of a nested
というところが違う
Function.nameの挙動
code:js
function A() {};
console.log(A.name);
console.log((() => {}).name);
const B = () => {};
const C = B;
console.log(B.name);
console.log(C.name);
--- 結果 ---
A
B
B
NOTE1
Function constructor = new Function(...)