Asm::Preproc::Token - One token retrieved from the input
use Asm::Preproc::Token;
my $token = Asm::Preproc::Token->new($type, $value, $line);
$token->type; $token->value;
$token->line; # isa Asm::Preproc::Line
my $token2 = $token->clone;
$token->error($message);
$token->warning($message);
Asm::Preproc::Token->error_at($token, $message);
Asm::Preproc::Token->warning_at($token, $message);
This module defines the object to represent one token of input text as retrieved
from the preprocessed input text. It contains the token type (a string), the
token value (a string) and a Asm::Preproc::Line object with the line where the
token was found.
There are also utility methods for error messages.
Creates a new object with the given type, value and line.
Creates an identical copy as a new object.
Dies with the given error message, indicating the place in the input source file
where the error occured as:
FILE(LINE) : error ... at TOKEN
Same as error(), but is a class method and can receive an undef
$token.
Warns with the given error message, indicating the place in the input source
file where the error occured as:
FILE(LINE) : warning ... at TOKEN
Same as warning(), but is a class method and can receive an undef
$token.