UNPKG

1.92 kBMarkdownView Raw
1Shift AST Constructors
2======================
3
4
5## About
6
7This project provides constructors for
8[Shift format](https://github.com/shapesecurity/shift-spec) AST nodes.
9
10The resulting objects are suitable for use with the rest of the [Shift suite](http://shift-ast.org/).
11
12There is a version with typechecking available as `shift-ast/checked` for use during development.
13
14## Status
15
16[Stable](http://nodejs.org/api/documentation.html#documentation_stability_index).
17
18
19## Installation
20
21```sh
22npm install shift-ast
23```
24
25
26## Usage
27
28```js
29var AST = require("shift-ast"); // or "shift-ast/checked"
30var myAstFragment = new AST.LabeledStatement({
31 label: "label",
32 body: new AST.EmptyStatement
33});
34```
35
36
37## Contributing
38
39* Open a Github issue with a description of your desired change. If one exists already, leave a message stating that you are working on it with the date you expect it to be complete.
40* Fork this repo, and clone the forked repo.
41* Install dependencies with `npm install`.
42* Build and test in your environment with `npm run build && npm test`.
43* Create a feature branch. Make your changes. Add tests.
44* Build and test in your environment with `npm run build && npm test`.
45* Make a commit that includes the text "fixes #*XX*" where *XX* is the Github issue.
46* Open a Pull Request on Github.
47
48
49## License
50
51 Copyright 2014 Shape Security, Inc.
52
53 Licensed under the Apache License, Version 2.0 (the "License");
54 you may not use this file except in compliance with the License.
55 You may obtain a copy of the License at
56
57 http://www.apache.org/licenses/LICENSE-2.0
58
59 Unless required by applicable law or agreed to in writing, software
60 distributed under the License is distributed on an "AS IS" BASIS,
61 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
62 See the License for the specific language governing permissions and
63 limitations under the License.