Snap! Websites
An Open Source CMS System in C++
#include <position.h>
Definition at line 44 of file position.h.
Definition at line 47 of file position.h.
This function returns the filename as set by the set_filename() function.
It is possible for the filename to be empty (in case you are compiling a function from memory.)
Definition at line 143 of file position.cpp.
References f_filename.
Referenced by as2js::operator<<(), as2js::optimizer_details::anonymous_namespace{optimizer_optimize.cpp}::optimizer_func_MATCH(), and as2js::Message::~Message().
This function returns the function name as set by the set_function() function.
It is possible for the function name to be empty (before it was ever set.)
Definition at line 158 of file position.cpp.
References f_function.
Referenced by as2js::Message::~Message().
The line counter is reset to 1 (or some other value) at the start and then it increases by 1 each time a new line character is found. It does not get reset on anything. It is generally useful when using a text editor as it represents the line number in such an editor.
Definition at line 214 of file position.cpp.
References f_line.
Referenced by as2js::operator<<(), and as2js::optimizer_details::anonymous_namespace{optimizer_optimize.cpp}::optimizer_func_MATCH().
The page counter is incremented by one after X number of lines or when a Ctrl-L character is found in the input stream.
Definition at line 171 of file position.cpp.
References f_page.
The page line counter is incremented by one every time a new line character is found. It starts at 1. It is reset back to one each time a new page is found.
Definition at line 185 of file position.cpp.
References f_page_line.
The paragraph counter is incremented by one every time empty lines are found between blocks of non empty lines. It starts at 1. It is reset back to one each time a new page is found.
Definition at line 199 of file position.cpp.
References f_paragraph.
This function increases the file as a whole line counter by 1. It also increments the page line counter by 1.
Definition at line 127 of file position.cpp.
References f_line, and f_page_line.
This function increments the page counter by one, resets the page line to 1 and the paragraph to 1.
Definition at line 103 of file position.cpp.
References DEFAULT_COUNTER, f_page, f_page_line, and f_paragraph.
When the compiler detects the end of a paragraph, it calls this function to increment that counter by one. Paragraphs are counted within one page.
Definition at line 116 of file position.cpp.
References f_paragraph.
DEFAULT_COUNTER
)
This function resets all the counters to 1 except for the line which is set to the specified line
parameter (which defaults to 1.)
line
prameter is smaller than 1.
Definition at line 84 of file position.cpp.
References DEFAULT_COUNTER, f_line, f_page, f_page_line, and f_paragraph.
Referenced by as2js::StringInput::StringInput().
This function saves the name of the file being read if available.
Definition at line 52 of file position.cpp.
References f_filename.
Referenced by as2js::Database::add_package(), as2js::Database::load(), as2js::JSON::load(), as2js::Compiler::load_internal_packages(), as2js::FileInput::open(), as2js::FileOutput::open(), as2js::StandardInput::StandardInput(), as2js::StandardOutput::StandardOutput(), and as2js::Message::~Message().
This function saves the name of the function being read if available. The compile is capable of detecting which function is being read and keeps a stack of such (since a function can be declared within another.) Functions without a name are given a system name for the purpose of displaying errors that give us as much information as possible.
Definition at line 68 of file position.cpp.
References f_function.
Referenced by as2js::Message::~Message().
Definition at line 48 of file position.h.
Referenced by new_page(), and reset_counters().
Definition at line 70 of file position.h.
Referenced by get_filename(), and set_filename().
Definition at line 71 of file position.h.
Referenced by get_function(), and set_function().
Definition at line 75 of file position.h.
Referenced by get_line(), new_line(), and reset_counters().
Definition at line 72 of file position.h.
Referenced by get_page(), new_page(), and reset_counters().
Definition at line 73 of file position.h.
Referenced by get_page_line(), new_line(), new_page(), and reset_counters().
Definition at line 74 of file position.h.
Referenced by get_paragraph(), new_page(), new_paragraph(), and reset_counters().
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.
Snap! Websites
An Open Source CMS System in C++