X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Floader%2FParser.cpp;h=25a99b6d2314dbc7f7e6e591e80dee875a040b2e;hb=5cca794c5b6549b7750c88b5c2217d659fa963dd;hp=3f5f3446955ab8d78005912ad1d31df432c658e8;hpb=a67f7e662c85b2b8d46f26a3c6e018b2df6eb318;p=l2e.git diff --git a/src/loader/Parser.cpp b/src/loader/Parser.cpp index 3f5f344..25a99b6 100644 --- a/src/loader/Parser.cpp +++ b/src/loader/Parser.cpp @@ -1,11 +1,14 @@ #include "Parser.h" +#include "ParsedSource.h" #include "utility.h" -#include #include +#include +#include +#include -using std::auto_ptr; +using std::unique_ptr; using std::ifstream; using std::string; using std::vector; @@ -84,14 +87,14 @@ Declaration *Parser::ProbeDefinition() { Token t(GetToken()); tok.Putback(t); if (BeginOfPropertyList(t)) { - auto_ptr propertyList(ParsePropertyList()); - auto_ptr dfn(new Definition(typeName, identifier)); + unique_ptr propertyList(ParsePropertyList()); + unique_ptr dfn(new Definition(typeName, identifier)); dfn->SetValue(propertyList.release()); product.AddDefinition(dfn.get()); return dfn.release(); } else if (BeginningOfPrimitiveLiteral(t)) { - auto_ptr literal(ParseLiteral()); - auto_ptr dfn(new Definition(typeName, identifier)); + unique_ptr literal(ParseLiteral()); + unique_ptr dfn(new Definition(typeName, identifier)); dfn->SetValue(literal.release()); product.AddDefinition(dfn.get()); return dfn.release(); @@ -179,7 +182,7 @@ PropertyList *Parser::ParsePropertyList() { Token t(GetToken()); AssertTokenType(t.type, Token::ANGLE_BRACKET_OPEN); - auto_ptr props(new PropertyList); + unique_ptr props(new PropertyList); while (t.type != Token::ANGLE_BRACKET_CLOSE) { Token name(GetToken());