import{WhiteSpace as e,Comment as t}from"../tokenizer/types.mjs";import"../tokenizer/char-code-definitions.mjs";import"../tokenizer/TokenStream.mjs";function i(i){const o=this.createList();let n=!1;const s={recognizer:i};for(;!this.eof;){switch(this.tokenType){case t:this.next();continue;case e:n=!0,this.next();continue}let c=i.getNode.call(this,s);if(void 0===c)break;n&&(i.onWhiteSpace&&i.onWhiteSpace.call(this,c,o,s),n=!1),o.push(c)}return n&&i.onWhiteSpace&&i.onWhiteSpace.call(this,null,o,s),o}export{i as readSequence};