top | up | prev | next

GrammarSymbol Class

Definition at line 13 of GrammarSymbol.hpp

Constructors

GrammarSymbol(const Span& span_, const std::u32string& name_)

Member Functions

void AddMember(std::unique_ptr<Symbol>&& member) override
std::unique_ptr<sngxml::dom::Element> CreateElement() override
bool IsGrammarSymbol() const override
std::u32string KindStr() override

Member Variables

std::vector<RuleSymbol*> rules

Constructor Details

GrammarSymbol Constructor

sngcpp::symbols::GrammarSymbol::GrammarSymbol(const Span& span_, const std::u32string& name_)

Definition at line 10 of GrammarSymbol.cpp :
10 : ContainerSymbol(span_name_)
11 {
12     SetAccess(Specifier::public_);
13 }


Declaration at line 16 of GrammarSymbol.hpp


Member Function Details

AddMember Member Function

void sngcpp::symbols::GrammarSymbol::AddMember(std::unique_ptr<Symbol >&& member) override

Definition at line 20 of GrammarSymbol.cpp :
21 {
22     Symbol* m = member.get();
23     ContainerSymbol::AddMember(std::move(member));
24     if (m->IsRuleSymbol())
25     {
26         rules.push_back(static_cast<RuleSymbol*>(m));
27     }
28 }


Declaration at line 17 of GrammarSymbol.hpp

Base class overridden functions: sngcpp::symbols::ContainerSymbol::AddMember

Calls: sngcpp::symbols::ContainerSymbol::AddMember , sngcpp::symbols::Symbol::IsRuleSymbol


CreateElement Member Function

std::unique_ptr<sngxml::dom::Element> sngcpp::symbols::GrammarSymbol::CreateElement() override

Definition at line 30 of GrammarSymbol.cpp
Declaration at line 19 of GrammarSymbol.hpp

Base class overridden functions: sngcpp::symbols::Symbol::CreateElement

Calls: sngcpp::symbols::Symbol::ToDomElement


IsGrammarSymbol Member Function

bool sngcpp::symbols::GrammarSymbol::IsGrammarSymbol() const override

Definition at line 20 of GrammarSymbol.hpp :
20 { return true; }

Base class overridden functions: sngcpp::symbols::Symbol::IsGrammarSymbol


KindStr Member Function

std::u32string sngcpp::symbols::GrammarSymbol::KindStr() override

Definition at line 15 of GrammarSymbol.cpp :
16 {
17     return U"grammar";
18 }


Declaration at line 18 of GrammarSymbol.hpp

Base class overridden functions: sngcpp::symbols::Symbol::KindStr


top | up | prev | next