![]() |
![]()
| ![]() |
![]()
NAMEAsm::Preproc::Line - One line of text retrieved from the input SYNOPSISuse Asm::Preproc::Line; my $line = Asm::Preproc::Line->new($text, $file, $line_nr); $line->text; $line->rtext; $line->file; $line->line_nr; my $line2 = $line->clone; if ($line == $line2) {...} if ($line != $line2) {...} $line->error($message); $line->warning($message); DESCRIPTIONThis module defines the object to represent one line of input text to preprocess. It contains the actual text from the line, and the file name and line number where the text was retrieved. It contains also utility methods for error messages. METHODSnewCreates a new object with the given text, file name and line number. textGet/set line text. rtextReturn reference to the text value. fileGet/set file name. line_nrGet/set line number. cloneCreates an identical copy as a new object. is_equalif ($self == $other) { ... } Compares two line objects. Overloads the '==' operator. is_differentif ($self != $other) { ... } Compares two line objects. Overloads the '!=' operator. errorDies with the given error message, indicating the place in the input source file where the error occured as: FILE(LINE) : error: MESSAGE warningWarns with the given error message, indicating the place in the input source file where the error occured as: FILE(LINE) : warning: MESSAGE AUTHOR, BUGS, SUPPORT, LICENSE, COPYRIGHTSee Asm::Preproc.
|