import{Colon as t,Ident as e,Function as s,RightParenthesis as i}from"../../tokenizer/types.mjs";import"../../tokenizer/char-code-definitions.mjs";import"../../tokenizer/TokenStream.mjs";const n="PseudoClassSelector",o="function",h={name:String,children:[["Raw"],null]};function r(){const n=this.tokenStart;let o,h,r=null;return this.eat(t),this.tokenType===s?(o=this.consumeFunctionName(),h=o.toLowerCase(),this.lookupNonWSType(0)==i?r=this.createList():hasOwnProperty.call(this.pseudo,h)?(this.skipSC(),r=this.pseudo[h].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(null,!1))),this.eat(i)):o=this.consume(e),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:o,children:r}}function l(n){this.token(t,":"),null===n.children?this.token(e,n.name):(this.token(s,n.name+"("),this.children(n),this.token(i,")"))}export{l as generate,n as name,r as parse,h as structure,o as walkContext};