mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-06 06:58:46 +00:00
printing fixes
This commit is contained in:
parent
0bb72e0b10
commit
469cb3581f
23 changed files with 318 additions and 151 deletions
|
|
@ -75,13 +75,16 @@ public:
|
|||
std::vector<TypeProxy> &&types,
|
||||
std::vector<bool> &&optional_arguments,
|
||||
std::vector<bool> &&result_arguments,
|
||||
bool is_annotations_same_to_names,
|
||||
std::optional<ExpressionProxy> expression)
|
||||
: Node(node), docs_(std::move(docs)),
|
||||
constraints_(std::move(constraints)), modifier_(modifier), name_(name),
|
||||
annotations_(std::move(annotations)), arguments_(std::move(arguments)),
|
||||
reference_types_(std::move(reference_types)), types_(std::move(types)),
|
||||
optional_arguments_(optional_arguments),
|
||||
result_arguments_(result_arguments), expression_(expression) {}
|
||||
result_arguments_(result_arguments),
|
||||
is_annotations_same_to_names_(is_annotations_same_to_names),
|
||||
expression_(expression) {}
|
||||
|
||||
//
|
||||
|
||||
|
|
@ -91,7 +94,7 @@ public:
|
|||
|
||||
//
|
||||
|
||||
size_t get_constraints_size() const { return arguments_.size(); }
|
||||
size_t get_constraints_size() const { return constraints_.size(); }
|
||||
|
||||
Constraint *get_constraint(size_t id) { return &constraints_.at(id); }
|
||||
|
||||
|
|
@ -159,6 +162,12 @@ public:
|
|||
|
||||
//
|
||||
|
||||
bool is_annotations_same_to_names() const {
|
||||
return is_annotations_same_to_names_;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
std::optional<Expression *> get_expression() {
|
||||
if (expression_.has_value()) {
|
||||
return expression_.value().get();
|
||||
|
|
@ -184,6 +193,7 @@ private:
|
|||
std::vector<TypeProxy> types_;
|
||||
std::vector<bool> optional_arguments_;
|
||||
std::vector<bool> result_arguments_;
|
||||
bool is_annotations_same_to_names_;
|
||||
std::optional<ExpressionProxy> expression_;
|
||||
}; // refactor ??
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue