import{Delim as t,Number as e,Function as i}from"../../tokenizer/types.mjs";import"../../tokenizer/char-code-definitions.mjs";import"../../tokenizer/TokenStream.mjs";function n(){switch(this.skipSC(),this.tokenType){case e:return this.Number();case i:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}const o="Ratio",s={left:["Number","Function"],right:["Number","Function",null]};function r(){const t=this.tokenStart,e=n.call(this);let i=null;return this.skipSC(),this.isDelim(47)&&(this.eatDelim(47),i=n.call(this)),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:e,right:i}}function h(i){this.node(i.left),this.token(t,"/"),i.right?this.node(i.right):this.node(e,1)}export{h as generate,o as name,r as parse,s as structure};