Target.hpp: Return false by default in the uniqueLineSeparator function
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
6e35682911
commit
de658bd032
|
@ -119,7 +119,7 @@ protected:
|
|||
}
|
||||
typedef optional<const char*> optional_string;
|
||||
virtual optional_string uniqueLineSeparator() { return ";"; };
|
||||
virtual bool use_uniqueLineSeparator() { return supportsOneLine(); };
|
||||
virtual bool use_uniqueLineSeparator() { return false; };
|
||||
const bool newLines;
|
||||
string separator;
|
||||
static constexpr const char* indentation = " ";
|
||||
|
@ -142,7 +142,7 @@ public:
|
|||
};
|
||||
static unique_ptr<Target> forName(string_view name, bool newLines);
|
||||
string transpileWithTree(const ParseTree& tree) {
|
||||
separator = newLines ? "\n" : (use_uniqueLineSeparator() ? uniqueLineSeparator().value() : throw Yerbacon::Exception("--newlines=off is not supported by the current target"));
|
||||
separator = newLines ? "\n" : (supportsOneLine() ? uniqueLineSeparator().value() : throw Yerbacon::Exception("--newlines=off is not supported by the current target"));
|
||||
output.str(string());
|
||||
separate_transpileTree(tree);
|
||||
return output.str() + '\n';
|
||||
|
|
Loading…
Reference in New Issue