Proto&Type is a blog about UX, Interaction Design, and the Web.JavaScript’s scoping rules are pretty darn simple, but they make for a few implications that surprise novice and experienced developers alike. Luckily, most of those implications can be detected through static code analysis. We can use a tool like Esprima to do our scope analysis. Esprima is a JavaScript parser that builds a pretty det
最近、というか昨日からTypedCoffeeScriptの開発再開してAST 気分が盛り上がってるので、簡単なチュートリアルでも。 この記事でやること ASTの取得 ASTの生成 JavaScript の出力 やらないこと 構文解析 準備 適当にプロジェクト作ります。 $ mkdir tinyaltjs $ cd tinyaltjs $ npm init # 色々聞かれるけどEnter 連打で良い $ npm install escodegen esprima prettyjson --save esprima はJavaScript のコードをASTに変換。 escodegen は AST から JavaScript を生成。どっちもConstellationさん製 escodegenはConstellationさん製で、彼はesprimaにもコミットしてます。この界隈に来ると基本的に彼
Presented at jQuery Conference San Diego February 12-13, 2014 http://events.jquery.org/2014/san-diego/ February 12, 2014 at 11AM PST in the Code for Thought Track Description Many developers use popular JavaScript code analysis tools (e.g. JSHint, UglifyJS, the RequireJS Optimizer) in their workflows, yet don't know how to create similar tools for themselves. This talk will cover what JavaScrip
< 4 WEEKS AWAY The AI Conference for Humans Who Ship 3 DAYS | MAY 12 -14 | SF MARRIOTT MARQUIS Meet the top AI infrastructure minds where architects of AI share what actually works. Where the sharpest AI minds meet. AI Council is the technical AI conference where engineers, researchers, founders and builders have come every year since 2015. We are vendor neutral and community led.
So there's this recent open-source project from Facebook called jstransform. It's also used by ReactJS. It lets you explore ES6 features and not only explore, but use them in production code. All you need to do is add the transformation to your static resource pipeline. (Of course you have one, right, for minification and so on) I took an example from the readme of the project, added all the avail
最近、気になったJavaScript AST関係のものについてのメモです。 JavaScript ASTについては以下などを見て下さい。 カジュアルJavaScript AST JavaScript AST Walker esnext 元々ES6 Module Transpiler等やっていたSquare社がesnextというプロジェクトを立ち上げました。 esnextはTraceurと同様にES6のコードを今日のJavaScriptに変換するツールです。 @eventualbuddhaさんがメインでやっていて、それぞれのシンタックスの変換はes6-spreadのように、ひとつのモジュールとして分けて作られています。 また変換の書き方も大体統一したやり方(まあ一人で大体書かれてるので)が取られていて、 Facebookの@benjamnさんが作っているast-typesとrecastを使っ
今日の概要 実は使われてるJavaScript AST JavaScript AST(Abstract Syntax Tree)とは? JavaScript ASTを使ったツール紹介 使うだけじゃなくて書いてみよう browserify Node.jsで書かれたものをブラウザ向けに変換するツール Node環境で開発 -> browserifyでビルド -> ブラウザで動く JavaScriptのコードを 変換 する ≒ JavaScript ASTを見て変換 する 本体の色々な部分、transform pluginなどでASTを使ってる
はじめに Promises Bookという薄い本を書いているのですが、書籍中に出てくるサンプルコードはテストが必須であるという原則があります。 サンプルコードは必ずテストコードが必要となる。(読者がコピペして実行するようなコードをテストを書くべきである) promises-book/CONTRIBUTE.md at master · azu/promises-book サンプルコードとテストはNode(といってもほぼCommonJSというだけ)で書いています。 ECMAScript6 Promisesについての内容なので、ブラウザ/Node.js どちらの実行環境でもいいのですが、閲覧するのはブラウザが基本になると思うのでブラウザ向けのコードを表示したいという感じになると思います。 CommonJS -> ブラウザ用のJS といえば、browserifyやCommonJS Everywhe
There's been some recent talk on es-discuss about standardizing source maps in ECMAScript 7. Before that happens, we should take a moment to reflect on what source maps have done well, where they are lacking, and meditate on what a more perfect debug format for compilers targeting JavaScript might be. My response quickly outgrew an email reply, and so I am collecting my thoughts and posting them h
ブラウザの上でJavaScriptの構文木をリアルタイムで可視化するサイトを作りました。構文木っていうプログラミング言語の基本的な概念を、特に何かをインストールしたりすることなく簡単に実験・観察できます。 http://nhiro.org/learn_language/AST-Visualization-on-browser.html TODO ツリーのレイアウトの方法があんまり気に入っていない。論文を読んで実装したものがLazyK-on-browserの方にあるのでその内に差し替える LISPやPythonの構文木も表示できるようにする
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く