jsfmt - For formatting, searching, and rewriting JavaScript.

  •        19

For formatting, searching, and rewriting JavaScript. Analogous to gofmt. If no path is given it will read from stdin. A directory path will recurse over all *.js files in the directory.

https://github.com/rdio/jsfmt

Dependencies:

deep-extend : ~0.4.0
docopt : ~0.4.1
escodegen : ~1.7.0
esformatter : ~0.9.0
esformatter-braces : ~1.2.1
esformatter-var-each : ~2.1.0
esprima : ~2.7.0
falafel : ~1.2.0
glob : ~5.0.15
rc : ~1.1.2
rocambole : ~0.7.0
tmp : ~0.0.23
underscore : ~1.8.0

Tags
Implementation
License
Platform

   




Related Projects

csstree - A tool set for working with CSS including fast detailed parser, walker, generator and lexer based on W3C specs and browser implementations

  •    Javascript

CSSTree is a tool set to work with CSS, including fast detailed parser (string->AST), walker (AST traversal), generator (AST->string) and lexer (validation and matching) based on knowledge of spec and browser implementations. The main goal is to be efficient and W3C spec compliant, with focus on CSS analyzing and source-to-source transforming tasks. NOTE: The project is in alpha stage since some parts need further improvements, AST format and API are subjects to change. However it's stable enough and used by packages like CSSO (CSS minifier) and SVGO (SVG optimizer) in production.

ast-types - Esprima-compatible implementation of the Mozilla JS Parser API

  •    Javascript

This module provides an efficient, modular, Esprima-compatible implementation of the abstract syntax tree type hierarchy pioneered by the Mozilla Parser API. Because it understands the AST type system so thoroughly, this library is able to provide excellent node iteration and traversal mechanisms.

espree - An Esprima-compatible JavaScript parser

  •    Javascript

Espree started out as a fork of Esprima v1.2.2, the last stable published released of Esprima before work on ECMAScript 6 began. Espree is now built on top of Acorn, which has a modular architecture that allows extension of core functionality. The goal of Espree is to produce output that is similar to Esprima with a similar API so that it can be used in place of Esprima. The primary goal is to produce the exact same AST structure and tokens as Esprima, and that takes precedence over anything else. (The AST structure being the ESTree API with JSX extensions.) Separate from that, Espree may deviate from what Esprima outputs in terms of where and how comments are attached, as well as what additional information is available on AST nodes. That is to say, Espree may add more things to the AST nodes than Esprima does but the overall AST structure produced will be the same.

tolerant-php-parser - An early-stage PHP parser designed for IDE usage scenarios.

  •    PHP

This is an early-stage PHP parser designed, from the beginning, for IDE usage scenarios (see Design Goals for more details). There is still a ton of work to be done, so at this point, this repo mostly serves as an experiment and the start of a conversation.After you've configured your machine, you can use the parser to generate and work with the Abstract Syntax Tree (AST) via a friendly API.

walt - :zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:

  •    Javascript

⚡️ Walt is an alternative syntax for WebAssembly text format. It's an experiment for using JavaScript syntax to write to as 'close to the metal' as possible. It's JavaScript with rules. .walt files compile directly to WebAssembly binary format. 🚀 Try it out in the Walt Explorer.


proposal-binary-ast - Binary AST proposal for ECMAScript

  •    

This is the explainer document for a proposed new binary AST format for JS. Performance of applications on the web platform is becoming increasingly bottlenecked by startup (load) time. Larger amounts of JS code are transferred over the wire by more sophisticated web properties. While caching helps, these properties regularly release new code, and cold load times are very important.

WAVM - WebAssembly Virtual Machine

  •    WebAssembly

This is a standalone VM for WebAssembly. It can load both the standard binary format, and the text format defined by the WebAssembly reference interpreter. For the text format, it can load both the standard stack machine syntax and the old-fashioned AST syntax used by the reference interpreter, and all of the testing commands. To build it, you'll need CMake and LLVM 6.0. If CMake can't find your LLVM directory, you can manually give it the location in the LLVM_DIR CMake configuration variable. Note that on Windows, you must compile LLVM from source, and manually point the LLVM_DIR configuration variable at <LLVM build directory>\lib\cmake\llvm.

typescript-eslint-parser - An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code

  •    Javascript

An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code. There is sometimes an incorrect assumption that the parser itself is what does everything necessary to facilitate the use of ESLint with TypeScript. In actuality, it is the combination of the parser and one or more plugins which allow you to maximize your usage of ESLint with TypeScript.

cppast - Library to parse and work with the C++ AST

  •    C++

Library interface to the C++ AST — parse source files, synthesize entities, get documentation comments and generate code. If you're writing a tool that needs access to the C++ AST (i.e. documentation generator, reflection library, …), your only option apart from writing your own parser is to use clang. It offers three interfaces for tools, but the only one that really works for standalone applications is libclang. However, libclang has various limitations and does not expose the entire AST.

recast - JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator

  •    Javascript

In less poetic terms, Recast exposes two essential interfaces, one for parsing JavaScript code (require("recast").parse) and the other for reprinting modified syntax trees (require("recast").print). See ast-types (especially the def/core.js) module for a thorough overview of the ast api.

estree - The ESTree Spec

  •    

Once upon a time, an unsuspecting Mozilla engineer created an API in Firefox that exposed the SpiderMonkey engine's JavaScript parser as a JavaScript API. Said engineer documented the format it produced, and this format caught on as a lingua franca for tools that manipulate JavaScript source code. Meanwhile JavaScript is evolving, notably with the upcoming release of ES2015. This site will serve as a community standard for people involved in building and using these tools to help evolve this format to keep up with the evolution of the JavaScript language.

php-parser - PHP parser written in Go

  •    Go

This project uses goyacc and golex libraries to parse PHP sources into AST. It can be used to write static analysis, refactoring, metrics, code style formatting tools. Dump AST to stdout.

esprima - ECMAScript parsing infrastructure for multipurpose analysis

  •    TypeScript

Esprima (esprima.org, BSD license) is a high performance, standard-compliant ECMAScript parser written in ECMAScript (also popularly known as JavaScript). Esprima is created and maintained by Ariya Hidayat, with the help of many contributors. Esprima can be used to perform lexical analysis (tokenization) or syntactic analysis (parsing) of a JavaScript program.

awesome-postcss - A curate list about PostCSS

  •    Shell

An selected list of PostCSS resources and other things related. PostCSS does is provide a css parser and a framework for creating plugins that can analyse, lint, handle assets, optimise, create fallbacks, and otherwise transform parsed css. PostCSS parses css into an abstract syntax tree AST, passes it through a series of plugins, and then concatenates back into a string.

react-syntax-highlighter - syntax highlighting component for react with prismjs or highlightjs ast using inline styles

  •    Javascript

Check out a small demo here and see the component in action highlighting the generated test code here. There are other syntax highlighters for React out there so why use this one? The biggest reason is that all the others rely on triggering calls in componentDidMount and componentDidUpdate to highlight the code block and then insert it in the render function using dangerouslySetInnerHTML or just manually altering the DOM with native javascript. This utilizes a syntax tree to dynamically build the virtual dom which allows for updating only the changing DOM instead of completely overwriting it on any change, and because of this it is also using more idiomatic React and allows the use of pure function components brought into React as of 0.14.

csso - CSS minifier with structural optimizations

  •    Javascript

CSSO (CSS Optimizer) is a CSS minifier. It performs three sort of transformations: cleaning (removing redundant), compression (replacement for shorter form) and restructuring (merge of declarations, rulesets and so on). As a result your CSS becomes much smaller. Warning: CSSO uses early versions of CSSTree that still in active development. CSSO doesn't guarantee API behind syntax field or AST format will not change in future releases of CSSO, since it's subject to change in CSSTree. Be carefull with CSSO updates if you use syntax API until this warning removal.

flexmark-java - CommonMark/Markdown Java parser with source level AST

  •    Java

Java re-implementation of commonmark-java based parser, with AST reflecting source elements, full source position tracking, greater parser extensibility.

sajson - Lightweight, extremely high-performance JSON parser for C++11

  •    C++

sajson is an extremely high-performance, in-place, DOM-style JSON parser written in C++. Originally, sajson meant Single Allocation JSON, but it now supports dynamic allocation too. sajson parses an input document into a contiguous AST structure. Unlike some other high-performance JSON parsers, the AST is efficiently queryable. Object lookups by key are O(lg N) and array indexing is O(1).

node-falafel - transform the ast on a recursive walk

  •    Javascript

Transform the ast on a recursive walk.This modules uses acorn to create an AST from source code.

Compiler Front End Generator

  •    C

Front provides a compiler front end generator that can generate a parser, pretty printer, symbol table handling, and Abstract Syntax Tree data structures and traversals. It also provides a C preprocessor library, and an AST rewriter generator.





We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.