moniel-parser
Advanced tools
| { | ||
| "type": "Graph", | ||
| "definitions": [ | ||
| { | ||
| "type": "Chain", | ||
| "blocks": [ | ||
| { | ||
| "type": "Node", | ||
| "id": null, | ||
| "node": { | ||
| "type": "LiteralNode", | ||
| "name": "HelloWorld", | ||
| "parameters": [ | ||
| { | ||
| "type": "Parameter", | ||
| "name": "param1", | ||
| "value": "hello" | ||
| }, | ||
| { | ||
| "type": "Parameter", | ||
| "name": "param2", | ||
| "value": "world" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
Sorry, the diff of this file is not supported yet
+1
-1
| { | ||
| "name": "moniel-parser", | ||
| "version": "0.0.1", | ||
| "version": "0.0.2", | ||
| "description": "Parser for Moniel notation", | ||
@@ -5,0 +5,0 @@ "main": "Parser.js", |
+13
-1
| # moniel-parser | ||
| Parser for Moniel notation | ||
| Parser for [Moniel](https://github.com/mlajtos/moniel) notation | ||
| ## Usage | ||
| Install: ```npm i moniel-parser``` | ||
| Use: | ||
| ```javascript | ||
| const p = require("moniel-parser") | ||
| const ast = p.parse(`In -> Out`).ast | ||
| ``` | ||
| Run tests: ```npm test``` |
+3
-3
@@ -52,2 +52,5 @@ module.exports = { | ||
| }), | ||
| ParameterValue: function(_) { | ||
| return this.sourceString | ||
| }, | ||
| path: (path) => ({ | ||
@@ -66,5 +69,2 @@ type: "Path", | ||
| }, | ||
| parameterValue: function(_) { | ||
| return this.sourceString | ||
| }, | ||
| NonemptyListOf: (x, _, xs) => [x.eval(), ...xs.eval()], | ||
@@ -71,0 +71,0 @@ EmptyListOf: () => [], |
Sorry, the diff of this file is not supported yet
16567
5.31%48
4.35%574
5.32%15
400%