class Tlf\Lexer

Constants

Properties

  • protected $grammars = [];
  • protected $state = null;
  • protected $stateStack = [];
  • protected $previous = ['docblock'=>null]; Calling $lexer->previous('docblock') will get the previous docblock $lexer->setPrevious('docblock', value) will set the previous docblock ['nameOfPrevItem'
  • protected $cacheMap = null; Copy of .cache/map.json
  • protected $grammarListForCache = null; array of grammar class names & their file's last mtime

Methods

  • public function previous($key)
  • public function setPrevious($key, $value)
  • public function unsetPrevious($key)
  • public function getState()
  • public function setState($newState)
  • public function popState()
  • public function clearBuffer()
  • public function addGrammar($grammar)
  • public function setHead($ast)
  • public function popHead()
  • public function getHead()
  • public function lexStr($str)
  • public function getCachedAst($filePath)
  • public function cacheFileAst($filePath, $ast)
  • public function getGrammarListForCache()
  • public function lex($file)

Static Properties

Static functions