File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ ostream& CommandLineInterface::serr(bool _markAsUsed)
99
99
return m_serr;
100
100
}
101
101
102
+ #define cin
102
103
#define cout
103
104
#define cerr
104
105
@@ -415,7 +416,7 @@ bool CommandLineInterface::readInputFilesAndConfigureFileReader()
415
416
}
416
417
417
418
if (m_options.input .addStdin )
418
- m_fileReader.setSource (g_stdinFileName, readUntilEnd (cin ));
419
+ m_fileReader.setSource (g_stdinFileName, readUntilEnd (m_sin ));
419
420
420
421
if (m_fileReader.sourceCodes ().size () == 0 )
421
422
{
@@ -513,7 +514,7 @@ bool CommandLineInterface::processInput()
513
514
{
514
515
string input;
515
516
if (m_options.input .standardJsonFile .empty ())
516
- input = readUntilEnd (cin );
517
+ input = readUntilEnd (m_sin );
517
518
else
518
519
{
519
520
try
Original file line number Diff line number Diff line change @@ -40,10 +40,12 @@ class CommandLineInterface
40
40
{
41
41
public:
42
42
explicit CommandLineInterface (
43
+ std::istream& _sin,
43
44
std::ostream& _sout,
44
45
std::ostream& _serr,
45
46
CommandLineOptions const & _options = CommandLineOptions{}
46
47
):
48
+ m_sin(_sin),
47
49
m_sout(_sout),
48
50
m_serr(_serr),
49
51
m_options(_options)
@@ -121,6 +123,7 @@ class CommandLineInterface
121
123
// / stream has ever been used unless @arg _markAsUsed is set to false.
122
124
std::ostream& serr (bool _markAsUsed = true );
123
125
126
+ std::istream& m_sin;
124
127
std::ostream& m_sout;
125
128
std::ostream& m_serr;
126
129
bool m_hasOutput = false ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ static void setDefaultOrCLocale()
54
54
int main (int argc, char ** argv)
55
55
{
56
56
setDefaultOrCLocale ();
57
- solidity::frontend::CommandLineInterface cli (cout, cerr);
57
+ solidity::frontend::CommandLineInterface cli (cin, cout, cerr);
58
58
if (!cli.parseArguments (argc, argv))
59
59
return 1 ;
60
60
if (!cli.processInput ())
You can’t perform that action at this time.
0 commit comments