Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bigodon #611

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The AST explorer provides following code parsers:
- Graphviz:
- [redot][]
- Handlebars:
- [bigodon][]
- [glimmer][]
- [handlebars][]
- [ember-template-recast][]
Expand Down Expand Up @@ -137,6 +138,7 @@ are included so you can prototype your own plugins:
[babel-eslint]: https://github.com/babel/babel-eslint
[babel]: https://babeljs.io/docs/advanced/plugins/
[babylon]: https://babeljs.io/
[bigodon]: https://github.com/gabriel-pinheiro/bigodon
[cssom]: https://github.com/NV/CSSOM
[csstree]: https://github.com/csstree/csstree
[ember-template-recast]: https://github.com/ember-template-lint/ember-template-recast
Expand Down
1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"babylon5": "npm:babylon@^5",
"babylon6": "npm:babylon@^6",
"babylon7": "npm:@babel/parser@^7",
"bigodon": "^1.4.0",
"cherow": "^1.6.8",
"codemirror": "^5.22.0",
"codemirror-graphql": "^0.11.6",
Expand Down
25 changes: 25 additions & 0 deletions website/src/parsers/handlebars/bigodon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import defaultParserInterface from './utils/defaultHandlebarsParserInterface';
import pkg from 'bigodon/package.json';

const ID = 'bigodon';

export default {
...defaultParserInterface,

id: ID,
displayName: ID,
version: pkg.version,
homepage: pkg.homepage,

loadParser(callback) {
require(['bigodon'], (bigodon) => callback(bigodon.parse));
},

getOffset(position) {
return position;
},

opensByDefault(node, key) {
return key === 'params';
},
};
18 changes: 18 additions & 0 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3041,6 +3041,14 @@ big.js@^5.2.2:
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==

bigodon@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/bigodon/-/bigodon-1.4.0.tgz#31ebe530970a9f49c8c74c738a14709ea93e771c"
integrity sha512-bDD4AyY0BjkiyONAr8TjbEOVHgGD52164nHsmeOV1s7t8ZSN2FbA1OWHIQa+q7kVcic3IY6SXfi91k1uHnc3qg==
dependencies:
pierrejs "^0.5.0"
uuid "^8.3.2"

binary-extensions@^1.0.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
Expand Down Expand Up @@ -8460,6 +8468,11 @@ picomatch@^2.0.5, picomatch@^2.2.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==

pierrejs@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/pierrejs/-/pierrejs-0.5.0.tgz#9f0ffa8583227be6d9f48b338fbbc55f2fc39e6a"
integrity sha512-etm2ZMrdCZh61aks0qRDynlI/fKb9YFqLroHaBrdMvLXdhHUMzxlchndz2fOyDVsfAXwXJS8/zsaRHntg9wFsw==

pify@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
Expand Down Expand Up @@ -11045,6 +11058,11 @@ utila@^0.4.0, utila@~0.4:
resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c"
integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=

uuid@^8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==

[email protected]:
version "2.0.3"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe"
Expand Down