This document defines an interface for an abstract syntax tree that can be used to represent the structure of an ECMAScript program. The interface is intended to be able to represent any structurally valid ECMAScript program (according to the latest version of ECMA-262) while minimising the number of invalid programs that may be represented. This specification is defined using the Web IDL standard
This page has moved... Click here if you are not redirected.
JavaScript Advent Calendar 2014 11日目。 いきなり要約: Promiseや非同期テストのアサーションを簡単確実に書けるようになるesplanというライブラリのPoCを作った話。 Promiseや非同期のテストは難しい 詳しくはJavaScript Promiseの本: Chapter.3 Promiseのテストをご覧いただきたいのだが、Promiseのテストを正確に書くのはそんなに簡単ではない。 例えばmochaだと、 // 間違ったテスト1: // mayBeResolveWithOne() が1以外でresolveしたときタイムアウトエラーになる it("mayBeResolveWithOne()は1でresolveする", function(done) { mayBeResolveWithOne().then(function(value) { as
この記事はJavaScript Advent Calender 2014の10日目の記事です。 altjs作りたいやろ 半年前にこんなLTをやった。未完成で放置するのは気持ち悪いので、この機会に完成させようと思った…んだけど、advent当日の時点でまだ完成してない。すまんな。ただ知見は多少溜まったので、基本的なaltjsの作り方と合わせて紹介しようと思う。 altjsってどうやって作んの? 方法は様々だけど、 文法をPEG(pegjs)で記述する ソースコードを、Parser APIで定義されるASTに変換するロジックを書く 変換されたASTを、escodegenでJavaScriptのコードにさらに変換する というのが今ならやりやすいと思う。結局ある構文をjsに変換するだけで、変換は既存のツールを使えるので、実はそんなに広い知識を要求せず、0から王道のコンパイラを作るみたいな壮大な話に
README.md Note: All source code in this repository is under the Unlicense. Proposal for SpiderMonkey AST representation for import and export statements The current AST format is both inconsistent and complicated. Esprima and Acorn have two different syntax trees for the same thing, and that currently heavily hinders inter-op between the two. Since the module syntax is stabilized, but I can tell t
AST, CST & Ferramentas Incríveis!! @millermedeiros / Agosto 2014 Primeira regra... Não use RegExp para analizar JavaScript! Segunda regra... Não use RegExp para manipular JavaScript! rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ http://stackoverflow.com/a/1732454 Como parsers funcionam? Mas
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く