Pelzini

This is the code documentation for the Pelzini project

class Token

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)

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2024-06-21
**/
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 &quot;current&quot; line number. New tokens have a line number set to this figure.
    **/
    public function setCurrLineNum (int $line) {
        // Method code goes here
    }
    
    /**
    * Increment the &quot;current&quot; 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
    }
    
}
?>