зеркало из https://github.com/mozilla/pjs.git
Fixed syntax errors
This commit is contained in:
Родитель
182fc056f3
Коммит
66d8f5244f
|
@ -22,15 +22,13 @@
|
|||
#include "utilities.h"
|
||||
#include "icodegenerator.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <stdexcept>
|
||||
|
||||
using std::ostream;
|
||||
|
||||
namespace JavaScript {
|
||||
|
||||
ostream & operator<<(ostream &s, ICodeGenerator &i)
|
||||
std::ostream & operator<<(std::ostream &s, ICodeGenerator &i)
|
||||
{
|
||||
return i.print(s);
|
||||
}
|
||||
|
@ -565,14 +563,14 @@ namespace JavaScript {
|
|||
"return"
|
||||
};
|
||||
|
||||
ostream &operator<<(ostream &s, StringAtom &str)
|
||||
std::ostream &operator<<(std::ostream &s, StringAtom &str)
|
||||
{
|
||||
for (String::iterator i = str.begin(); i != str.end(); i++)
|
||||
s << (char)*i;
|
||||
return s;
|
||||
}
|
||||
|
||||
ostream &ICodeGenerator::print(ostream &s)
|
||||
std::ostream &ICodeGenerator::print(std::ostream &s)
|
||||
{
|
||||
s << "ICG! " << iCode->size() << "\n";
|
||||
for (InstructionIterator i = iCode->begin(); i != iCode->end(); i++) {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <stack>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
namespace JavaScript {
|
||||
|
||||
|
@ -205,7 +205,7 @@ namespace JavaScript {
|
|||
|
||||
InstructionStream *complete();
|
||||
|
||||
ostream &print(ostream &s);
|
||||
std::ostream &print(std::ostream &s);
|
||||
|
||||
Register op(ICodeOp op, Register source);
|
||||
Register op(ICodeOp op, Register source1, Register source2);
|
||||
|
@ -289,8 +289,8 @@ namespace JavaScript {
|
|||
|
||||
};
|
||||
|
||||
ostream &operator<<(ostream &s, ICodeGenerator &i);
|
||||
ostream &operator<<(ostream &s, StringAtom &str);
|
||||
std::ostream &operator<<(std::ostream &s, ICodeGenerator &i);
|
||||
std::ostream &operator<<(std::ostream &s, StringAtom &str);
|
||||
|
||||
class WhileCodeState : public ICodeState {
|
||||
public:
|
||||
|
|
|
@ -22,15 +22,13 @@
|
|||
#include "utilities.h"
|
||||
#include "icodegenerator.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <stdexcept>
|
||||
|
||||
using std::ostream;
|
||||
|
||||
namespace JavaScript {
|
||||
|
||||
ostream & operator<<(ostream &s, ICodeGenerator &i)
|
||||
std::ostream & operator<<(std::ostream &s, ICodeGenerator &i)
|
||||
{
|
||||
return i.print(s);
|
||||
}
|
||||
|
@ -565,14 +563,14 @@ namespace JavaScript {
|
|||
"return"
|
||||
};
|
||||
|
||||
ostream &operator<<(ostream &s, StringAtom &str)
|
||||
std::ostream &operator<<(std::ostream &s, StringAtom &str)
|
||||
{
|
||||
for (String::iterator i = str.begin(); i != str.end(); i++)
|
||||
s << (char)*i;
|
||||
return s;
|
||||
}
|
||||
|
||||
ostream &ICodeGenerator::print(ostream &s)
|
||||
std::ostream &ICodeGenerator::print(std::ostream &s)
|
||||
{
|
||||
s << "ICG! " << iCode->size() << "\n";
|
||||
for (InstructionIterator i = iCode->begin(); i != iCode->end(); i++) {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <stack>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
namespace JavaScript {
|
||||
|
||||
|
@ -205,7 +205,7 @@ namespace JavaScript {
|
|||
|
||||
InstructionStream *complete();
|
||||
|
||||
ostream &print(ostream &s);
|
||||
std::ostream &print(std::ostream &s);
|
||||
|
||||
Register op(ICodeOp op, Register source);
|
||||
Register op(ICodeOp op, Register source1, Register source2);
|
||||
|
@ -289,8 +289,8 @@ namespace JavaScript {
|
|||
|
||||
};
|
||||
|
||||
ostream &operator<<(ostream &s, ICodeGenerator &i);
|
||||
ostream &operator<<(ostream &s, StringAtom &str);
|
||||
std::ostream &operator<<(std::ostream &s, ICodeGenerator &i);
|
||||
std::ostream &operator<<(std::ostream &s, StringAtom &str);
|
||||
|
||||
class WhileCodeState : public ICodeState {
|
||||
public:
|
||||
|
|
Загрузка…
Ссылка в новой задаче