Buffer holds the memory on top of which a parse tree / syntax tree is constructed. Besides giving access to individual characters, it provides the means to register replacements for buffer chunks, such that when the Buffer's write method is executed the new file will contain the modified source.
replace the text between from and to by the text between begin and begin + length
Return the origin of the given pointer (filename and line number)
Write the buffer into the given output stream The first line contains a line directive issuing the input file name; if filename is non-empty, use this to fake another one.
read a line directive starting at position pos, and return the line number found.
replace the text between from and to by the text between begin and begin + length
Return the origin of the given pointer (filename and line number)
Write the buffer into the given output stream The first line contains a line directive issuing the input file name; if filename is non-empty, use this to fake another one.
read a line directive starting at position pos, and return the line number found. Also report the begin and end of the filename (with respect to the internal buffer). line is the default line number that gets reported on error (in which case begin and end remain unchanged)