/
thomas-king
/
SyntacticAnalyzer
Обзор
Документация
Войти
/
thomas-king
/
SyntacticAnalyzer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
lib/Models/AST/Operand.cpp
30 строк
715 B
Ace Rodstin
Add ParseExpressionTests. Fix parenthesis parsing.
06 апр 2023, 13:52
06 апр 2023, 13:52
760e23e
Код
Авторство
О чём код?
// // Operand.cpp // SyntacticAnalyzer // // Created by Ace Rodstin on 4/5/23. // Copyright © 2023 Ace Rodstin. All rights reserved. // #include "Models/AST/Operand.h" using namespace ace; using namespace ast; Operand::Operand(unique_ptr<Literal> literal): literal(std::move(literal)) {} Operand::Operand(unique_ptr<Expression> expression): expression(std::move(expression)) {} Operand::Operand(unique_ptr<OperandName> operandName): operandName(std::move(operandName)) {} const Literal* Operand::getLiteral() const { return literal.get(); } const Expression* Operand::getExpression() const { return expression.get(); } const OperandName* Operand::getOperandName() const { return operandName.get(); }