Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
constructors.js13865 linesDownload Raw Back to lazy
1// Auto-generated code, DO NOT EDIT DIRECTLY!2// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer_lazy.rs`.3 4import { constructorError, TOKEN } from "../../raw-transfer/lazy-common.js";5import { NodeArray } from "../../raw-transfer/node-array.js";6 7const textDecoder = new TextDecoder("utf-8", { ignoreBOM: true }),8  decodeStr = textDecoder.decode.bind(textDecoder),9  { fromCodePoint } = String,10  inspectSymbol = Symbol.for("nodejs.util.inspect.custom");11 12export class Program {13  type = "Program";14  #internal;15 16  constructor(pos, ast) {17    if (ast?.token !== TOKEN) constructorError();18 19    const { nodes } = ast;20    const cached = nodes.get(pos);21    if (cached !== void 0) return cached;22 23    this.#internal = { pos, ast, $body: void 0 };24    nodes.set(pos, this);25  }26 27  get start() {28    const internal = this.#internal;29    return constructI32(internal.pos, internal.ast);30  }31 32  get end() {33    const internal = this.#internal;34    return constructI32(internal.pos + 4, internal.ast);35  }36 37  get sourceType() {38    const internal = this.#internal;39    return new SourceType(internal.pos + 136, internal.ast);40  }41 42  get hashbang() {43    const internal = this.#internal;44    return constructOptionHashbang(internal.pos + 56, internal.ast);45  }46 47  get body() {48    const internal = this.#internal,49      cached = internal.$body;50    if (cached !== void 0) return cached;51    return (internal.$body = constructVecStatement(internal.pos + 112, internal.ast));52  }53 54  toJSON() {55    return {56      type: "Program",57      start: this.start,58      end: this.end,59      sourceType: this.sourceType,60      hashbang: this.hashbang,61      body: this.body,62    };63  }64 65  [inspectSymbol]() {66    return Object.setPrototypeOf(this.toJSON(), DebugProgram.prototype);67  }68}69 70const DebugProgram = class Program {};71 72function constructExpression(pos, ast) {73  switch (ast.buffer[pos]) {74    case 0:75      return constructBoxBooleanLiteral(pos + 8, ast);76    case 1:77      return constructBoxNullLiteral(pos + 8, ast);78    case 2:79      return constructBoxNumericLiteral(pos + 8, ast);80    case 3:81      return constructBoxBigIntLiteral(pos + 8, ast);82    case 4:83      return constructBoxRegExpLiteral(pos + 8, ast);84    case 5:85      return constructBoxStringLiteral(pos + 8, ast);86    case 6:87      return constructBoxTemplateLiteral(pos + 8, ast);88    case 7:89      return constructBoxIdentifierReference(pos + 8, ast);90    case 8:91      return constructBoxMetaProperty(pos + 8, ast);92    case 9:93      return constructBoxSuper(pos + 8, ast);94    case 10:95      return constructBoxArrayExpression(pos + 8, ast);96    case 11:97      return constructBoxArrowFunctionExpression(pos + 8, ast);98    case 12:99      return constructBoxAssignmentExpression(pos + 8, ast);100    case 13:101      return constructBoxAwaitExpression(pos + 8, ast);102    case 14:103      return constructBoxBinaryExpression(pos + 8, ast);104    case 15:105      return constructBoxCallExpression(pos + 8, ast);106    case 16:107      return constructBoxChainExpression(pos + 8, ast);108    case 17:109      return constructBoxClass(pos + 8, ast);110    case 18:111      return constructBoxConditionalExpression(pos + 8, ast);112    case 19:113      return constructBoxFunction(pos + 8, ast);114    case 20:115      return constructBoxImportExpression(pos + 8, ast);116    case 21:117      return constructBoxLogicalExpression(pos + 8, ast);118    case 22:119      return constructBoxNewExpression(pos + 8, ast);120    case 23:121      return constructBoxObjectExpression(pos + 8, ast);122    case 24:123      return constructBoxParenthesizedExpression(pos + 8, ast);124    case 25:125      return constructBoxSequenceExpression(pos + 8, ast);126    case 26:127      return constructBoxTaggedTemplateExpression(pos + 8, ast);128    case 27:129      return constructBoxThisExpression(pos + 8, ast);130    case 28:131      return constructBoxUnaryExpression(pos + 8, ast);132    case 29:133      return constructBoxUpdateExpression(pos + 8, ast);134    case 30:135      return constructBoxYieldExpression(pos + 8, ast);136    case 31:137      return constructBoxPrivateInExpression(pos + 8, ast);138    case 32:139      return constructBoxJSXElement(pos + 8, ast);140    case 33:141      return constructBoxJSXFragment(pos + 8, ast);142    case 34:143      return constructBoxTSAsExpression(pos + 8, ast);144    case 35:145      return constructBoxTSSatisfiesExpression(pos + 8, ast);146    case 36:147      return constructBoxTSTypeAssertion(pos + 8, ast);148    case 37:149      return constructBoxTSNonNullExpression(pos + 8, ast);150    case 38:151      return constructBoxTSInstantiationExpression(pos + 8, ast);152    case 39:153      return constructBoxV8IntrinsicExpression(pos + 8, ast);154    case 48:155      return constructBoxComputedMemberExpression(pos + 8, ast);156    case 49:157      return constructBoxStaticMemberExpression(pos + 8, ast);158    case 50:159      return constructBoxPrivateFieldExpression(pos + 8, ast);160    default:161      throw new Error(`Unexpected discriminant ${ast.buffer[pos]} for Expression`);162  }163}164 165export class IdentifierName {166  type = "IdentifierName";167  #internal;168 169  constructor(pos, ast) {170    if (ast?.token !== TOKEN) constructorError();171 172    const { nodes } = ast;173    const cached = nodes.get(pos);174    if (cached !== void 0) return cached;175 176    this.#internal = { pos, ast, $name: void 0 };177    nodes.set(pos, this);178  }179 180  get start() {181    const internal = this.#internal;182    return constructI32(internal.pos, internal.ast);183  }184 185  get end() {186    const internal = this.#internal;187    return constructI32(internal.pos + 4, internal.ast);188  }189 190  get name() {191    const internal = this.#internal,192      cached = internal.$name;193    if (cached !== void 0) return cached;194    return (internal.$name = constructStr(internal.pos + 16, internal.ast));195  }196 197  toJSON() {198    return {199      type: "IdentifierName",200      start: this.start,201      end: this.end,202      name: this.name,203    };204  }205 206  [inspectSymbol]() {207    return Object.setPrototypeOf(this.toJSON(), DebugIdentifierName.prototype);208  }209}210 211const DebugIdentifierName = class IdentifierName {};212 213export class IdentifierReference {214  type = "IdentifierReference";215  #internal;216 217  constructor(pos, ast) {218    if (ast?.token !== TOKEN) constructorError();219 220    const { nodes } = ast;221    const cached = nodes.get(pos);222    if (cached !== void 0) return cached;223 224    this.#internal = { pos, ast, $name: void 0 };225    nodes.set(pos, this);226  }227 228  get start() {229    const internal = this.#internal;230    return constructI32(internal.pos, internal.ast);231  }232 233  get end() {234    const internal = this.#internal;235    return constructI32(internal.pos + 4, internal.ast);236  }237 238  get name() {239    const internal = this.#internal,240      cached = internal.$name;241    if (cached !== void 0) return cached;242    return (internal.$name = constructStr(internal.pos + 16, internal.ast));243  }244 245  toJSON() {246    return {247      type: "IdentifierReference",248      start: this.start,249      end: this.end,250      name: this.name,251    };252  }253 254  [inspectSymbol]() {255    return Object.setPrototypeOf(this.toJSON(), DebugIdentifierReference.prototype);256  }257}258 259const DebugIdentifierReference = class IdentifierReference {};260 261export class BindingIdentifier {262  type = "BindingIdentifier";263  #internal;264 265  constructor(pos, ast) {266    if (ast?.token !== TOKEN) constructorError();267 268    const { nodes } = ast;269    const cached = nodes.get(pos);270    if (cached !== void 0) return cached;271 272    this.#internal = { pos, ast, $name: void 0 };273    nodes.set(pos, this);274  }275 276  get start() {277    const internal = this.#internal;278    return constructI32(internal.pos, internal.ast);279  }280 281  get end() {282    const internal = this.#internal;283    return constructI32(internal.pos + 4, internal.ast);284  }285 286  get name() {287    const internal = this.#internal,288      cached = internal.$name;289    if (cached !== void 0) return cached;290    return (internal.$name = constructStr(internal.pos + 16, internal.ast));291  }292 293  toJSON() {294    return {295      type: "BindingIdentifier",296      start: this.start,297      end: this.end,298      name: this.name,299    };300  }301 302  [inspectSymbol]() {303    return Object.setPrototypeOf(this.toJSON(), DebugBindingIdentifier.prototype);304  }305}306 307const DebugBindingIdentifier = class BindingIdentifier {};308 309export class LabelIdentifier {310  type = "LabelIdentifier";311  #internal;312 313  constructor(pos, ast) {314    if (ast?.token !== TOKEN) constructorError();315 316    const { nodes } = ast;317    const cached = nodes.get(pos);318    if (cached !== void 0) return cached;319 320    this.#internal = { pos, ast, $name: void 0 };321    nodes.set(pos, this);322  }323 324  get start() {325    const internal = this.#internal;326    return constructI32(internal.pos, internal.ast);327  }328 329  get end() {330    const internal = this.#internal;331    return constructI32(internal.pos + 4, internal.ast);332  }333 334  get name() {335    const internal = this.#internal,336      cached = internal.$name;337    if (cached !== void 0) return cached;338    return (internal.$name = constructStr(internal.pos + 16, internal.ast));339  }340 341  toJSON() {342    return {343      type: "LabelIdentifier",344      start: this.start,345      end: this.end,346      name: this.name,347    };348  }349 350  [inspectSymbol]() {351    return Object.setPrototypeOf(this.toJSON(), DebugLabelIdentifier.prototype);352  }353}354 355const DebugLabelIdentifier = class LabelIdentifier {};356 357export class ThisExpression {358  type = "ThisExpression";359  #internal;360 361  constructor(pos, ast) {362    if (ast?.token !== TOKEN) constructorError();363 364    const { nodes } = ast;365    const cached = nodes.get(pos);366    if (cached !== void 0) return cached;367 368    this.#internal = { pos, ast };369    nodes.set(pos, this);370  }371 372  get start() {373    const internal = this.#internal;374    return constructI32(internal.pos, internal.ast);375  }376 377  get end() {378    const internal = this.#internal;379    return constructI32(internal.pos + 4, internal.ast);380  }381 382  toJSON() {383    return {384      type: "ThisExpression",385      start: this.start,386      end: this.end,387    };388  }389 390  [inspectSymbol]() {391    return Object.setPrototypeOf(this.toJSON(), DebugThisExpression.prototype);392  }393}394 395const DebugThisExpression = class ThisExpression {};396 397export class ArrayExpression {398  type = "ArrayExpression";399  #internal;400 401  constructor(pos, ast) {402    if (ast?.token !== TOKEN) constructorError();403 404    const { nodes } = ast;405    const cached = nodes.get(pos);406    if (cached !== void 0) return cached;407 408    this.#internal = { pos, ast, $elements: void 0 };409    nodes.set(pos, this);410  }411 412  get start() {413    const internal = this.#internal;414    return constructI32(internal.pos, internal.ast);415  }416 417  get end() {418    const internal = this.#internal;419    return constructI32(internal.pos + 4, internal.ast);420  }421 422  get elements() {423    const internal = this.#internal,424      cached = internal.$elements;425    if (cached !== void 0) return cached;426    return (internal.$elements = constructVecArrayExpressionElement(427      internal.pos + 16,428      internal.ast,429    ));430  }431 432  toJSON() {433    return {434      type: "ArrayExpression",435      start: this.start,436      end: this.end,437      elements: this.elements,438    };439  }440 441  [inspectSymbol]() {442    return Object.setPrototypeOf(this.toJSON(), DebugArrayExpression.prototype);443  }444}445 446const DebugArrayExpression = class ArrayExpression {};447 448function constructArrayExpressionElement(pos, ast) {449  switch (ast.buffer[pos]) {450    case 0:451      return constructBoxBooleanLiteral(pos + 8, ast);452    case 1:453      return constructBoxNullLiteral(pos + 8, ast);454    case 2:455      return constructBoxNumericLiteral(pos + 8, ast);456    case 3:457      return constructBoxBigIntLiteral(pos + 8, ast);458    case 4:459      return constructBoxRegExpLiteral(pos + 8, ast);460    case 5:461      return constructBoxStringLiteral(pos + 8, ast);462    case 6:463      return constructBoxTemplateLiteral(pos + 8, ast);464    case 7:465      return constructBoxIdentifierReference(pos + 8, ast);466    case 8:467      return constructBoxMetaProperty(pos + 8, ast);468    case 9:469      return constructBoxSuper(pos + 8, ast);470    case 10:471      return constructBoxArrayExpression(pos + 8, ast);472    case 11:473      return constructBoxArrowFunctionExpression(pos + 8, ast);474    case 12:475      return constructBoxAssignmentExpression(pos + 8, ast);476    case 13:477      return constructBoxAwaitExpression(pos + 8, ast);478    case 14:479      return constructBoxBinaryExpression(pos + 8, ast);480    case 15:481      return constructBoxCallExpression(pos + 8, ast);482    case 16:483      return constructBoxChainExpression(pos + 8, ast);484    case 17:485      return constructBoxClass(pos + 8, ast);486    case 18:487      return constructBoxConditionalExpression(pos + 8, ast);488    case 19:489      return constructBoxFunction(pos + 8, ast);490    case 20:491      return constructBoxImportExpression(pos + 8, ast);492    case 21:493      return constructBoxLogicalExpression(pos + 8, ast);494    case 22:495      return constructBoxNewExpression(pos + 8, ast);496    case 23:497      return constructBoxObjectExpression(pos + 8, ast);498    case 24:499      return constructBoxParenthesizedExpression(pos + 8, ast);500    case 25:501      return constructBoxSequenceExpression(pos + 8, ast);502    case 26:503      return constructBoxTaggedTemplateExpression(pos + 8, ast);504    case 27:505      return constructBoxThisExpression(pos + 8, ast);506    case 28:507      return constructBoxUnaryExpression(pos + 8, ast);508    case 29:509      return constructBoxUpdateExpression(pos + 8, ast);510    case 30:511      return constructBoxYieldExpression(pos + 8, ast);512    case 31:513      return constructBoxPrivateInExpression(pos + 8, ast);514    case 32:515      return constructBoxJSXElement(pos + 8, ast);516    case 33:517      return constructBoxJSXFragment(pos + 8, ast);518    case 34:519      return constructBoxTSAsExpression(pos + 8, ast);520    case 35:521      return constructBoxTSSatisfiesExpression(pos + 8, ast);522    case 36:523      return constructBoxTSTypeAssertion(pos + 8, ast);524    case 37:525      return constructBoxTSNonNullExpression(pos + 8, ast);526    case 38:527      return constructBoxTSInstantiationExpression(pos + 8, ast);528    case 39:529      return constructBoxV8IntrinsicExpression(pos + 8, ast);530    case 48:531      return constructBoxComputedMemberExpression(pos + 8, ast);532    case 49:533      return constructBoxStaticMemberExpression(pos + 8, ast);534    case 50:535      return constructBoxPrivateFieldExpression(pos + 8, ast);536    case 64:537      return constructBoxSpreadElement(pos + 8, ast);538    case 65:539      return new Elision(pos + 8, ast);540    default:541      throw new Error(`Unexpected discriminant ${ast.buffer[pos]} for ArrayExpressionElement`);542  }543}544 545export class Elision {546  type = "Elision";547  #internal;548 549  constructor(pos, ast) {550    if (ast?.token !== TOKEN) constructorError();551 552    const { nodes } = ast;553    const cached = nodes.get(pos);554    if (cached !== void 0) return cached;555 556    this.#internal = { pos, ast };557    nodes.set(pos, this);558  }559 560  get start() {561    const internal = this.#internal;562    return constructI32(internal.pos, internal.ast);563  }564 565  get end() {566    const internal = this.#internal;567    return constructI32(internal.pos + 4, internal.ast);568  }569 570  toJSON() {571    return {572      type: "Elision",573      start: this.start,574      end: this.end,575    };576  }577 578  [inspectSymbol]() {579    return Object.setPrototypeOf(this.toJSON(), DebugElision.prototype);580  }581}582 583const DebugElision = class Elision {};584 585export class ObjectExpression {586  type = "ObjectExpression";587  #internal;588 589  constructor(pos, ast) {590    if (ast?.token !== TOKEN) constructorError();591 592    const { nodes } = ast;593    const cached = nodes.get(pos);594    if (cached !== void 0) return cached;595 596    this.#internal = { pos, ast, $properties: void 0 };597    nodes.set(pos, this);598  }599 600  get start() {601    const internal = this.#internal;602    return constructI32(internal.pos, internal.ast);603  }604 605  get end() {606    const internal = this.#internal;607    return constructI32(internal.pos + 4, internal.ast);608  }609 610  get properties() {611    const internal = this.#internal,612      cached = internal.$properties;613    if (cached !== void 0) return cached;614    return (internal.$properties = constructVecObjectPropertyKind(internal.pos + 16, internal.ast));615  }616 617  toJSON() {618    return {619      type: "ObjectExpression",620      start: this.start,621      end: this.end,622      properties: this.properties,623    };624  }625 626  [inspectSymbol]() {627    return Object.setPrototypeOf(this.toJSON(), DebugObjectExpression.prototype);628  }629}630 631const DebugObjectExpression = class ObjectExpression {};632 633function constructObjectPropertyKind(pos, ast) {634  switch (ast.buffer[pos]) {635    case 0:636      return constructBoxObjectProperty(pos + 8, ast);637    case 1:638      return constructBoxSpreadElement(pos + 8, ast);639    default:640      throw new Error(`Unexpected discriminant ${ast.buffer[pos]} for ObjectPropertyKind`);641  }642}643 644export class ObjectProperty {645  type = "ObjectProperty";646  #internal;647 648  constructor(pos, ast) {649    if (ast?.token !== TOKEN) constructorError();650 651    const { nodes } = ast;652    const cached = nodes.get(pos);653    if (cached !== void 0) return cached;654 655    this.#internal = { pos, ast };656    nodes.set(pos, this);657  }658 659  get start() {660    const internal = this.#internal;661    return constructI32(internal.pos, internal.ast);662  }663 664  get end() {665    const internal = this.#internal;666    return constructI32(internal.pos + 4, internal.ast);667  }668 669  get kind() {670    const internal = this.#internal;671    return constructPropertyKind(internal.pos + 12, internal.ast);672  }673 674  get key() {675    const internal = this.#internal;676    return constructPropertyKey(internal.pos + 16, internal.ast);677  }678 679  get value() {680    const internal = this.#internal;681    return constructExpression(internal.pos + 32, internal.ast);682  }683 684  get method() {685    const internal = this.#internal;686    return constructBool(internal.pos + 13, internal.ast);687  }688 689  get shorthand() {690    const internal = this.#internal;691    return constructBool(internal.pos + 14, internal.ast);692  }693 694  get computed() {695    const internal = this.#internal;696    return constructBool(internal.pos + 15, internal.ast);697  }698 699  toJSON() {700    return {701      type: "ObjectProperty",702      start: this.start,703      end: this.end,704      kind: this.kind,705      key: this.key,706      value: this.value,707      method: this.method,708      shorthand: this.shorthand,709      computed: this.computed,710    };711  }712 713  [inspectSymbol]() {714    return Object.setPrototypeOf(this.toJSON(), DebugObjectProperty.prototype);715  }716}717 718const DebugObjectProperty = class ObjectProperty {};719 720function constructPropertyKey(pos, ast) {721  switch (ast.buffer[pos]) {722    case 0:723      return constructBoxBooleanLiteral(pos + 8, ast);724    case 1:725      return constructBoxNullLiteral(pos + 8, ast);726    case 2:727      return constructBoxNumericLiteral(pos + 8, ast);728    case 3:729      return constructBoxBigIntLiteral(pos + 8, ast);730    case 4:731      return constructBoxRegExpLiteral(pos + 8, ast);732    case 5:733      return constructBoxStringLiteral(pos + 8, ast);734    case 6:735      return constructBoxTemplateLiteral(pos + 8, ast);736    case 7:737      return constructBoxIdentifierReference(pos + 8, ast);738    case 8:739      return constructBoxMetaProperty(pos + 8, ast);740    case 9:741      return constructBoxSuper(pos + 8, ast);742    case 10:743      return constructBoxArrayExpression(pos + 8, ast);744    case 11:745      return constructBoxArrowFunctionExpression(pos + 8, ast);746    case 12:747      return constructBoxAssignmentExpression(pos + 8, ast);748    case 13:749      return constructBoxAwaitExpression(pos + 8, ast);750    case 14:751      return constructBoxBinaryExpression(pos + 8, ast);752    case 15:753      return constructBoxCallExpression(pos + 8, ast);754    case 16:755      return constructBoxChainExpression(pos + 8, ast);756    case 17:757      return constructBoxClass(pos + 8, ast);758    case 18:759      return constructBoxConditionalExpression(pos + 8, ast);760    case 19:761      return constructBoxFunction(pos + 8, ast);762    case 20:763      return constructBoxImportExpression(pos + 8, ast);764    case 21:765      return constructBoxLogicalExpression(pos + 8, ast);766    case 22:767      return constructBoxNewExpression(pos + 8, ast);768    case 23:769      return constructBoxObjectExpression(pos + 8, ast);770    case 24:771      return constructBoxParenthesizedExpression(pos + 8, ast);772    case 25:773      return constructBoxSequenceExpression(pos + 8, ast);774    case 26:775      return constructBoxTaggedTemplateExpression(pos + 8, ast);776    case 27:777      return constructBoxThisExpression(pos + 8, ast);778    case 28:779      return constructBoxUnaryExpression(pos + 8, ast);780    case 29:781      return constructBoxUpdateExpression(pos + 8, ast);782    case 30:783      return constructBoxYieldExpression(pos + 8, ast);784    case 31:785      return constructBoxPrivateInExpression(pos + 8, ast);786    case 32:787      return constructBoxJSXElement(pos + 8, ast);788    case 33:789      return constructBoxJSXFragment(pos + 8, ast);790    case 34:791      return constructBoxTSAsExpression(pos + 8, ast);792    case 35:793      return constructBoxTSSatisfiesExpression(pos + 8, ast);794    case 36:795      return constructBoxTSTypeAssertion(pos + 8, ast);796    case 37:797      return constructBoxTSNonNullExpression(pos + 8, ast);798    case 38:799      return constructBoxTSInstantiationExpression(pos + 8, ast);800    case 39:801      return constructBoxV8IntrinsicExpression(pos + 8, ast);802    case 48:803      return constructBoxComputedMemberExpression(pos + 8, ast);804    case 49:805      return constructBoxStaticMemberExpression(pos + 8, ast);806    case 50:807      return constructBoxPrivateFieldExpression(pos + 8, ast);808    case 64:809      return constructBoxIdentifierName(pos + 8, ast);810    case 65:811      return constructBoxPrivateIdentifier(pos + 8, ast);812    default:813      throw new Error(`Unexpected discriminant ${ast.buffer[pos]} for PropertyKey`);814  }815}816 817function constructPropertyKind(pos, ast) {818  switch (ast.buffer[pos]) {819    case 0:820      return "init";821    case 1:822      return "get";823    case 2:824      return "set";825    default:826      throw new Error(`Unexpected discriminant ${ast.buffer[pos]} for PropertyKind`);827  }828}829 830export class TemplateLiteral {831  type = "TemplateLiteral";832  #internal;833 834  constructor(pos, ast) {835    if (ast?.token !== TOKEN) constructorError();836 837    const { nodes } = ast;838    const cached = nodes.get(pos);839    if (cached !== void 0) return cached;840 841    this.#internal = { pos, ast, $quasis: void 0, $expressions: void 0 };842    nodes.set(pos, this);843  }844 845  get start() {846    const internal = this.#internal;847    return constructI32(internal.pos, internal.ast);848  }849 850  get end() {851    const internal = this.#internal;852    return constructI32(internal.pos + 4, internal.ast);853  }854 855  get quasis() {856    const internal = this.#internal,857      cached = internal.$quasis;858    if (cached !== void 0) return cached;859    return (internal.$quasis = constructVecTemplateElement(internal.pos + 16, internal.ast));860  }861 862  get expressions() {863    const internal = this.#internal,864      cached = internal.$expressions;865    if (cached !== void 0) return cached;866    return (internal.$expressions = constructVecExpression(internal.pos + 40, internal.ast));867  }868 869  toJSON() {870    return {871      type: "TemplateLiteral",872      start: this.start,873      end: this.end,874      quasis: this.quasis,875      expressions: this.expressions,876    };877  }878 879  [inspectSymbol]() {880    return Object.setPrototypeOf(this.toJSON(), DebugTemplateLiteral.prototype);881  }882}883 884const DebugTemplateLiteral = class TemplateLiteral {};885 886export class TaggedTemplateExpression {887  type = "TaggedTemplateExpression";888  #internal;889 890  constructor(pos, ast) {891    if (ast?.token !== TOKEN) constructorError();892 893    const { nodes } = ast;894    const cached = nodes.get(pos);895    if (cached !== void 0) return cached;896 897    this.#internal = { pos, ast };898    nodes.set(pos, this);899  }900 901  get start() {902    const internal = this.#internal;903    return constructI32(internal.pos, internal.ast);904  }905 906  get end() {907    const internal = this.#internal;908    return constructI32(internal.pos + 4, internal.ast);909  }910 911  get tag() {912    const internal = this.#internal;913    return constructExpression(internal.pos + 16, internal.ast);914  }915 916  get typeArguments() {917    const internal = this.#internal;918    return constructOptionBoxTSTypeParameterInstantiation(internal.pos + 32, internal.ast);919  }920 921  get quasi() {922    const internal = this.#internal;923    return new TemplateLiteral(internal.pos + 40, internal.ast);924  }925 926  toJSON() {927    return {928      type: "TaggedTemplateExpression",929      start: this.start,930      end: this.end,931      tag: this.tag,932      typeArguments: this.typeArguments,933      quasi: this.quasi,934    };935  }936 937  [inspectSymbol]() {938    return Object.setPrototypeOf(this.toJSON(), DebugTaggedTemplateExpression.prototype);939  }940}941 942const DebugTaggedTemplateExpression = class TaggedTemplateExpression {};943 944export class TemplateElement {945  type = "TemplateElement";946  #internal;947 948  constructor(pos, ast) {949    if (ast?.token !== TOKEN) constructorError();950 951    const { nodes } = ast;952    const cached = nodes.get(pos);953    if (cached !== void 0) return cached;954 955    this.#internal = { pos, ast };956    nodes.set(pos, this);957  }958 959  get start() {960    const internal = this.#internal;961    return constructI32(internal.pos, internal.ast);962  }963 964  get end() {965    const internal = this.#internal;966    return constructI32(internal.pos + 4, internal.ast);967  }968 969  get value() {970    const internal = this.#internal;971    return new TemplateElementValue(internal.pos + 16, internal.ast);972  }973 974  get tail() {975    const internal = this.#internal;976    return constructBool(internal.pos + 12, internal.ast);977  }978 979  toJSON() {980    return {981      type: "TemplateElement",982      start: this.start,983      end: this.end,984      value: this.value,985      tail: this.tail,986    };987  }988 989  [inspectSymbol]() {990    return Object.setPrototypeOf(this.toJSON(), DebugTemplateElement.prototype);991  }992}993 994const DebugTemplateElement = class TemplateElement {};995 996export class TemplateElementValue {997  #internal;998 999  constructor(pos, ast) {1000    if (ast?.token !== TOKEN) constructorError();1001 1002    const { nodes } = ast;1003    const cached = nodes.get(pos);1004    if (cached !== void 0) return cached;1005 1006    this.#internal = { pos, ast, $raw: void 0, $cooked: void 0 };1007    nodes.set(pos, this);1008  }1009 1010  get raw() {1011    const internal = this.#internal,1012      cached = internal.$raw;1013    if (cached !== void 0) return cached;1014    return (internal.$raw = constructStr(internal.pos, internal.ast));1015  }1016 1017  get cooked() {1018    const internal = this.#internal,1019      cached = internal.$cooked;1020    if (cached !== void 0) return cached;1021    return (internal.$cooked = constructOptionStr(internal.pos + 16, internal.ast));1022  }1023 1024  toJSON() {1025    return {1026      raw: this.raw,1027      cooked: this.cooked,1028    };1029  }1030 1031  [inspectSymbol]() {1032    return Object.setPrototypeOf(this.toJSON(), DebugTemplateElementValue.prototype);1033  }1034}1035 1036const DebugTemplateElementValue = class TemplateElementValue {};1037 1038function constructMemberExpression(pos, ast) {1039  switch (ast.buffer[pos]) {1040    case 48:1041      return constructBoxComputedMemberExpression(pos + 8, ast);1042    case 49:1043      return constructBoxStaticMemberExpression(pos + 8, ast);1044    case 50:1045      return constructBoxPrivateFieldExpression(pos + 8, ast);1046    default:1047      throw new Error(`Unexpected discriminant ${ast.buffer[pos]} for MemberExpression`);1048  }1049}1050 1051export class ComputedMemberExpression {1052  type = "ComputedMemberExpression";1053  #internal;1054 1055  constructor(pos, ast) {1056    if (ast?.token !== TOKEN) constructorError();1057 1058    const { nodes } = ast;1059    const cached = nodes.get(pos);1060    if (cached !== void 0) return cached;1061 1062    this.#internal = { pos, ast };1063    nodes.set(pos, this);1064  }1065 1066  get start() {1067    const internal = this.#internal;1068    return constructI32(internal.pos, internal.ast);1069  }1070 1071  get end() {1072    const internal = this.#internal;1073    return constructI32(internal.pos + 4, internal.ast);1074  }1075 1076  get object() {1077    const internal = this.#internal;1078    return constructExpression(internal.pos + 16, internal.ast);1079  }1080 1081  get property() {1082    const internal = this.#internal;1083    return constructExpression(internal.pos + 32, internal.ast);1084  }1085 1086  get optional() {1087    const internal = this.#internal;1088    return constructBool(internal.pos + 12, internal.ast);1089  }1090 1091  toJSON() {1092    return {1093      type: "ComputedMemberExpression",1094      start: this.start,1095      end: this.end,1096      object: this.object,1097      property: this.property,1098      optional: this.optional,1099    };1100  }1101 1102  [inspectSymbol]() {1103    return Object.setPrototypeOf(this.toJSON(), DebugComputedMemberExpression.prototype);1104  }1105}1106 1107const DebugComputedMemberExpression = class ComputedMemberExpression {};1108 1109export class StaticMemberExpression {1110  type = "StaticMemberExpression";1111  #internal;1112 1113  constructor(pos, ast) {1114    if (ast?.token !== TOKEN) constructorError();1115 1116    const { nodes } = ast;1117    const cached = nodes.get(pos);1118    if (cached !== void 0) return cached;1119 1120    this.#internal = { pos, ast };1121    nodes.set(pos, this);1122  }1123 1124  get start() {1125    const internal = this.#internal;1126    return constructI32(internal.pos, internal.ast);1127  }1128 1129  get end() {1130    const internal = this.#internal;1131    return constructI32(internal.pos + 4, internal.ast);1132  }1133 1134  get object() {1135    const internal = this.#internal;1136    return constructExpression(internal.pos + 16, internal.ast);1137  }1138 1139  get property() {1140    const internal = this.#internal;1141    return new IdentifierName(internal.pos + 32, internal.ast);1142  }1143 1144  get optional() {1145    const internal = this.#internal;1146    return constructBool(internal.pos + 12, internal.ast);1147  }1148 1149  toJSON() {1150    return {1151      type: "StaticMemberExpression",1152      start: this.start,1153      end: this.end,1154      object: this.object,1155      property: this.property,1156      optional: this.optional,1157    };1158  }1159 1160  [inspectSymbol]() {1161    return Object.setPrototypeOf(this.toJSON(), DebugStaticMemberExpression.prototype);1162  }1163}1164 1165const DebugStaticMemberExpression = class StaticMemberExpression {};1166 1167export class PrivateFieldExpression {1168  type = "PrivateFieldExpression";1169  #internal;1170 1171  constructor(pos, ast) {1172    if (ast?.token !== TOKEN) constructorError();1173 1174    const { nodes } = ast;1175    const cached = nodes.get(pos);1176    if (cached !== void 0) return cached;1177 1178    this.#internal = { pos, ast };1179    nodes.set(pos, this);1180  }1181 1182  get start() {1183    const internal = this.#internal;1184    return constructI32(internal.pos, internal.ast);1185  }1186 1187  get end() {1188    const internal = this.#internal;1189    return constructI32(internal.pos + 4, internal.ast);1190  }1191 1192  get object() {1193    const internal = this.#internal;1194    return constructExpression(internal.pos + 16, internal.ast);1195  }1196 1197  get property() {1198    const internal = this.#internal;1199    return new PrivateIdentifier(internal.pos + 32, internal.ast);1200  }

Showing the first 1,200 of 13865 lines. Download the file for the rest.

Brunobkr/llama.cpp_AlgMor24_github · Team Ai