![]() |
![]()
| ![]() |
![]()
NAMEAsm::Preproc::Token - One token retrieved from the input SYNOPSISuse 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); DESCRIPTIONThis 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. METHODSnewCreates a new object with the given type, value and line. typeGet/set type. valueGet/set file value. lineGet/set line. cloneCreates an identical copy as a new object. errorDies with the given error message, indicating the place in the input source file where the error occured as: FILE(LINE) : error ... at TOKEN error_atSame as error(), but is a class method and can receive an undef $token. warningWarns with the given error message, indicating the place in the input source file where the error occured as: FILE(LINE) : warning ... at TOKEN warning_atSame as warning(), but is a class method and can receive an undef $token. AUTHOR, BUGS, SUPPORT, LICENSE, COPYRIGHTSee Asm::Preproc.
|