shift-spec
Advanced tools
Comparing version 2015.0.0 to 2015.1.0
{ | ||
"name": "shift-spec", | ||
"version": "2015.0.0", | ||
"description": "Shift AST specification", | ||
"version": "2015.1.0", | ||
"description": "JavaScript representation of the Shift AST specification", | ||
"author": "Shape Security Labs", | ||
"homepage": "https://github.com/shapesecurity/shift-spec", | ||
"homepage": "https://github.com/shapesecurity/shift-spec-js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/shapesecurity/shift-spec.git" | ||
"url": "https://github.com/shapesecurity/shift-spec-js.git" | ||
}, | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"build": "node src/generate-spec.js", | ||
"test": "node ./" | ||
}, | ||
"files": [ | ||
"spec.idl" | ||
"dist" | ||
], | ||
@@ -23,8 +25,12 @@ "keywords": [ | ||
"syntax", | ||
"tree" | ||
"tree", | ||
"implementation" | ||
], | ||
"devDependencies": { | ||
"shift-spec-idl": "2015.0.0" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/shapesecurity/shift-spec/issues" | ||
"url": "https://github.com/shapesecurity/shift-spec-js/issues" | ||
}, | ||
"license": "Apache-2.0" | ||
} |
@@ -1,3 +0,3 @@ | ||
Shift AST Specification | ||
======================= | ||
JavaScript Shift AST Specification Representation | ||
================================================= | ||
@@ -7,87 +7,10 @@ | ||
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. | ||
TODO | ||
This specification is defined using the [Web IDL](http://www.w3.org/TR/WebIDL/) | ||
standard with the following extended attributes: | ||
0. `TypeIndicator`: This extended attribute may be applied to a readonly | ||
attribute to indicate the following: | ||
* The *type* following the *attribute* keyword must be an *identifier*. | ||
* Declare an enum whose *identifier* is the *type* that follows the | ||
*attribute* keyword, whose values are the *identifier*s of all | ||
interfaces that inherit the attribute. | ||
* The value of the attribute is the member of the above-declared enum | ||
associated with the interface's *identifier*. | ||
0. `NonEmpty`: This extended attribute may be applied to any attribute with a | ||
Sequence or Array type to disallow the zero-length inhabitant of that type. | ||
## Usage | ||
TODO | ||
## Status | ||
This specification currently supports ECMAScript as defined in ECMA-262 version | ||
6 (as of release candidate 2), which is the upcoming version of ECMA-262 at the | ||
time of this writing. | ||
## Implementations | ||
This section is reserved for a listing of implementations that conform to this | ||
specification as well as tools that operate on those data types. To add your | ||
own implementation to this list, please open a Pull Request. Implementations | ||
should be ordered by submission date within a category that appropriately | ||
describes their purpose. | ||
### Create | ||
* [Shift Parser](https://github.com/shapesecurity/shift-parser-js) | ||
* [Shift AST Constructors](https://github.com/shapesecurity/shift-ast-js) | ||
* [Shift-SpiderMonkey Converter](https://github.com/shapesecurity/shift-spidermonkey-converter-js) | ||
### Transform | ||
* [Shift Reducer](https://github.com/shapesecurity/shift-reducer-js) | ||
* [Shift Code Generator](https://github.com/shapesecurity/shift-codegen-js) | ||
### Analyse | ||
* [Shift Validator](https://github.com/shapesecurity/shift-validator-js) | ||
* [Shift Scope Analyzer](https://github.com/shapesecurity/shift-scope-js) | ||
### Use | ||
* [Shift Traverse](https://github.com/Constellation/shift-traverse-js) | ||
## Design Decisions | ||
* The concepts of `Block` and `VariableDeclaration` are separate from | ||
`BlockStatement` and `VariableDeclarationStatement` respectively in order to | ||
avoid usage of those statements where other types of statements are not | ||
allowed. | ||
* The `FunctionBody` node represents a `Block` where directives are allowed. | ||
Directives are not represented as `LiteralStringExpression`s to avoid | ||
confusion with unnecessarily parenthesised string literals in statement | ||
position. | ||
* `AssignmentExpression` is separate from `BinaryExpression` to prepare for | ||
ES6, which will only allow valid bindings in the left operand (12.14.1). All | ||
other binary expressions are grouped together. | ||
* RegExps and other exotic values are not used as primitives to allow for the | ||
possibility of serialisation to JSON. | ||
### Compromises | ||
* `VariableDeclarationKind` contains `let` and `const`, which should only be | ||
allowed in ES6, but implementations had widespread support for these | ||
declaration kinds long before they had support for any other ES6 feature. | ||
Because of this, many people consider it an unofficial extension to ES5. | ||
* Similarly, `FunctionDeclaration`s in arbitrary `Statement` position were | ||
allowed by many ES5 implementations (with varying semantics), so the | ||
`SourceElement` class was removed, and `FunctionDeclaration` was moved to | ||
`Statement`. | ||
## License | ||
@@ -94,0 +17,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
49409
749
0
1
1
30