ast-generator
Advanced tools
Comparing version 0.0.5 to 0.0.6
16
cli.js
@@ -28,3 +28,3 @@ #!/usr/bin/env node | ||
function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
@@ -54,2 +54,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
function splitFirst(value) { | ||
var first = value.split(/\s+/)[0]; | ||
var rest = value.substring(first.length).trimLeft(); | ||
return [first, rest]; | ||
} | ||
function takeWhile(items, predicate) { | ||
@@ -416,6 +422,6 @@ var result = []; | ||
} else { | ||
var _line$split = line.split(/\s+/), | ||
_line$split2 = _slicedToArray(_line$split, 2), | ||
name = _line$split2[0], | ||
spec = _line$split2[1]; | ||
var _splitFirst = splitFirst(line), | ||
_splitFirst2 = _slicedToArray(_splitFirst, 2), | ||
name = _splitFirst2[0], | ||
spec = _splitFirst2[1]; | ||
@@ -422,0 +428,0 @@ (0, _invariant["default"])(currNode, 'Expect a curr node'); |
{ | ||
"name": "ast-generator", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Helper to generate a TypeScript or JavaScript module for an arbitrary AST definition from a specification.", | ||
@@ -34,3 +34,3 @@ "license": "MIT", | ||
"invariant": "^2.2.4", | ||
"prettier": "^2.3.0" | ||
"prettier": "^2.3.2" | ||
}, | ||
@@ -37,0 +37,0 @@ "types": "./index.d.ts", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44960
560
Updatedprettier@^2.3.2