mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-07 15:38:49 +00:00
printing fixes, simple type annotations fix, Function and Array type shortcuts removed, '=' in function definition for block/array removed
This commit is contained in:
parent
d7f1b6c377
commit
d8ef39b2bd
11 changed files with 56 additions and 77 deletions
|
|
@ -254,8 +254,15 @@ public:
|
|||
void append_before(const std::string &name) { value_ = name + "." + value_; }
|
||||
|
||||
void append_after(const std::string &name) {
|
||||
value_ += ".";
|
||||
value_ += name;
|
||||
value_ += "." + name;
|
||||
}
|
||||
|
||||
std::pair<Identifier, Identifier> split_first() {
|
||||
const auto pos = value_.find('.');
|
||||
if (pos == std::string::npos) {
|
||||
return {Identifier(*this, type_, ""), *this};
|
||||
}
|
||||
return {Identifier(*this, type_, value_.substr(0, pos)), Identifier(*this, type_, value_.substr(pos + 1))}; // '.' is leaved out
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue