import{Function as t,RightParenthesis as n}from"../../tokenizer/types.mjs";import"../../tokenizer/char-code-definitions.mjs";import"../../tokenizer/TokenStream.mjs";const e="Function",i="function",o={name:String,children:[[]]};function r(t,e){const i=this.tokenStart,o=this.consumeFunctionName(),r=o.toLowerCase();let s;return s=e.hasOwnProperty(r)?e[r].call(this,e):t.call(this,e),this.eof||this.eat(n),{type:"Function",loc:this.getLocation(i,this.tokenStart),name:o,children:s}}function s(e){this.token(t,e.name+"("),this.children(e),this.token(n,")")}export{s as generate,e as name,r as parse,o as structure,i as walkContext};