From aa05a34dd5e4a56563cbfeab273785ce0e363089 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 08:44:07 +0800 Subject: Parse remove String. --- include/cru/parse/Production.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'include/cru/parse/Production.h') diff --git a/include/cru/parse/Production.h b/include/cru/parse/Production.h index 07bd2962..81236020 100644 --- a/include/cru/parse/Production.h +++ b/include/cru/parse/Production.h @@ -1,15 +1,13 @@ #pragma once -#include "cru/base/String.h" - #include "Nonterminal.h" -#include "Terminal.h" #include +#include namespace cru::parse { class CRU_PARSE_API Production : public Object { public: - Production(Grammar* grammar, String name, Nonterminal* left, + Production(Grammar* grammar, std::string name, Nonterminal* left, std::vector right); CRU_DELETE_COPY(Production) @@ -20,8 +18,8 @@ class CRU_PARSE_API Production : public Object { public: Grammar* GetGrammar() const { return grammar_; } - String GetName() const { return name_; } - void SetName(String name) { name_ = std::move(name); } + std::string GetName() const { return name_; } + void SetName(std::string name) { name_ = std::move(name); } Nonterminal* GetLeft() const { return left_; } void SetLeft(Nonterminal* left); @@ -35,7 +33,7 @@ class CRU_PARSE_API Production : public Object { private: Grammar* grammar_; - String name_; + std::string name_; Nonterminal* left_; std::vector right_; -- cgit v1.2.3