This class is used to represent a token that has been tokenised using a Lexer. (e.g. the JavascriptLexer) These tokens are used to create various ParserItems, by passing them to an Analyser (e.g. the JavascriptAnalyser)
This is the code documentation for the Pelzini project
Search documentation |
class TokenThis class is used to represent a token that has been tokenised using a Lexer. (e.g. the JavascriptLexer) These tokens are used to create various ParserItems, by passing them to an Analyser (e.g. the JavascriptAnalyser)
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2025-10-31
**/
class NewClassName extends Token {
/**
* Gets the type of this token
**/
public function gettype () {
// Method code goes here
}
/**
* Gets the value of this token
**/
public function getValue () {
// Method code goes here
}
/**
* Set the "current" line number. New tokens have a line number set to this figure.
**/
public function setCurrLineNum (int $line) {
// Method code goes here
}
/**
* Increment the "current" line number. New tokens have a line number set to this figure.
**/
public function setIncrLineNum ($incr) {
// Method code goes here
}
/**
* Gets the line number this toekn
**/
public function getLineNum () {
// Method code goes here
}
/**
* Uses some PHP cleverness to get the name of the constant
* that this token referres to.
* Good for debugging
**/
public function getTypeName () {
// Method code goes here
}
public function __construct ($type, $value) {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Thursday, 15th March, 2018 at 02:05 pm |
|