This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/prettier/parser-glimmer.js

2 lines
136 KiB
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e())}(this,function(){"use strict";var t=function(t,e){var r=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return r.loc=e,r};function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function n(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),t}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function h(t){return!("object"!==e(t)||!t.type.match(/Literal$/))}var p=Object.freeze({isCall:function(t){return"SubExpression"===t.type||"MustacheStatement"===t.type&&"PathExpression"===t.path.type},isLiteral:h});function f(t,e){if("string"!=typeof t)return t;var r=t.split("."),a=!1;return"this"===r[0]&&(a=!0,r=r.slice(1)),{type:"PathExpression",original:t,this:a,parts:r,data:!1,loc:y(e||null)}}function d(t,e,r){return{type:t,value:e,original:e,loc:y(r||null)}}function m(t,e){return{type:"Hash",pairs:t||[],loc:y(e||null)}}function g(t){return t||null}function v(t,e){return{line:t,column:e}}var b={source:"(synthetic)",start:{line:1,column:0},end:{line:1,column:0}};function y(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];if(1===r.length){var n=r[0];return n&&"object"===e(n)?{source:g(n.source),start:v(n.start.line,n.start.column),end:v(n.end.line,n.end.column)}:b}var i=r[0],s=r[1],o=r[2],l=r[3];return{source:g(r[4]),start:v(i,s),end:v(o,l)}}var k={mustache:function(t,e,r,a,n){return h(t)||(t=f(t)),{type:"MustacheStatement",path:t,params:e||[],hash:r||m([]),escaped:!a,loc:y(n||null)}},block:function(t,e,r,a,n,i){return{type:"BlockStatement",path:f(t),params:e||[],hash:r||m([]),program:a||null,inverse:n||null,loc:y(i||null)}},partial:function(t,e,r,a,n){return{type:"PartialStatement",name:t,params:e||[],hash:r||m([]),indent:a||"",strip:{open:!1,close:!1},loc:y(n||null)}},comment:function(t,e){return{type:"CommentStatement",value:t,loc:y(e||null)}},mustacheComment:function(t,e){return{type:"MustacheCommentStatement",value:t,loc:y(e||null)}},element:function(t,e,r,a,n,i){return Array.isArray(n)||(i=n,n=[]),{type:"ElementNode",tag:t||"",attributes:e||[],blockParams:[],modifiers:r||[],comments:n||[],children:a||[],loc:y(i||null)}},elementModifier:function(t,e,r,a){return{type:"ElementModifierStatement",path:f(t),params:e||[],hash:r||m([]),loc:y(a||null)}},attr:function(t,e,r){return{type:"AttrNode",name:t,value:e,loc:y(r||null)}},text:function(t,e){return{type:"TextNode",chars:t||"",loc:y(e||null)}},sexpr:function(t,e,r,a){return{type:"SubExpression",path:f(t),params:e||[],hash:r||m([]),loc:y(a||null)}},path:f,concat:function(t,e){return{type:"ConcatStatement",p