Added two-argument linearBreak

This commit is contained in:
waldemar%netscape.com 2000-06-01 03:30:19 +00:00
Родитель 62529d1509
Коммит 17668e8a07
4 изменённых файлов: 30 добавлений и 0 удалений

Просмотреть файл

@ -2459,6 +2459,20 @@ void JS::PrettyPrinter::requiredBreak()
}
// If required is true, write a required line break; otherwise write a linear line break
// of the given width.
//
// If this method throws an exception, it may have emitted partial output but
// leaves the PrettyPrinter in a consistent state.
void JS::PrettyPrinter::linearBreak(uint32 nSpaces, bool required)
{
if (required)
requiredBreak();
else
linearBreak(nSpaces);
}
// Flush any saved output in the PrettyPrinter to the output. Call this just before
// destroying the PrettyPrinter. All Indent and Block objects must have been exited already.
//

Просмотреть файл

@ -1405,6 +1405,7 @@ namespace JavaScript {
void requiredBreak();
void linearBreak(uint32 nSpaces) {conditionalBreak(nSpaces, Item::linearBreak);}
void linearBreak(uint32 nSpaces, bool required);
void fillBreak(uint32 nSpaces) {conditionalBreak(nSpaces, Item::fillBreak);}
void end();

Просмотреть файл

@ -2459,6 +2459,20 @@ void JS::PrettyPrinter::requiredBreak()
}
// If required is true, write a required line break; otherwise write a linear line break
// of the given width.
//
// If this method throws an exception, it may have emitted partial output but
// leaves the PrettyPrinter in a consistent state.
void JS::PrettyPrinter::linearBreak(uint32 nSpaces, bool required)
{
if (required)
requiredBreak();
else
linearBreak(nSpaces);
}
// Flush any saved output in the PrettyPrinter to the output. Call this just before
// destroying the PrettyPrinter. All Indent and Block objects must have been exited already.
//

Просмотреть файл

@ -1405,6 +1405,7 @@ namespace JavaScript {
void requiredBreak();
void linearBreak(uint32 nSpaces) {conditionalBreak(nSpaces, Item::linearBreak);}
void linearBreak(uint32 nSpaces, bool required);
void fillBreak(uint32 nSpaces) {conditionalBreak(nSpaces, Item::fillBreak);}
void end();