OSDN Git Service

<identify>、<number>、<boolean>を解釈するそれぞれの部分字句解析を行うLexerを追加。
[simplecms/utakata.git] / src / lexeme.cpp
index 331e937..10519bc 100755 (executable)
@@ -1,4 +1,3 @@
-#include <iostream>
 #include "src/lexeme.h"
 #include "src/unicode.h"
 
@@ -11,12 +10,12 @@ lexer::Lexeme::Lexeme(const unicode::UniString& lexeme_str,
       type_(type) {}
 
 lexer::Lexeme::Lexeme(const lexer::Lexeme& rh)
-    : string_(new unicode::UniString(*rh.string_)),
+    : string_(rh.string_),
       type_(rh.type_) {}
 
 lexer::Lexeme& lexer::Lexeme::operator=(const lexer::Lexeme& rh) {
   lexer::Lexeme tmp(rh);
-  string_.reset(new unicode::UniString(*tmp.string_));
+  string_ = tmp.string_;
   type_ = tmp.type_;
   return *this;
 }