weltling / parle

Parser and lexer for PHP
Other
83 stars 9 forks source link

[feature request] get sigil length #24

Closed lublak closed 1 year ago

lublak commented 3 years ago

current solution:

$i = 0;
$gs = [];
try {
  while(true) {
    array_push($gs, $this->parser->sigil($i++));
  }
} catch(ParserException) {
}

it would be nicer if you knew beforehand how many you are allowed to read.

BenHanson commented 1 year ago

I have added $this->parser->sigilCount()