JavaScript Snippet parser