Just move all the one-liner functions straight into the parser.
This commit is contained in:
parent
60ed686eb0
commit
d558da1620
4 changed files with 38 additions and 76 deletions
37
lel.cpp
37
lel.cpp
|
@ -16,21 +16,6 @@ namespace lel {
|
|||
{
|
||||
}
|
||||
|
||||
void Parser::ltab() {
|
||||
cur.row = rows;
|
||||
}
|
||||
|
||||
void Parser::col() {
|
||||
}
|
||||
|
||||
void Parser::valign(char dir) {
|
||||
cur.bottom = dir == '.';
|
||||
}
|
||||
|
||||
void Parser::align(char dir) {
|
||||
cur.right = dir == '>';
|
||||
}
|
||||
|
||||
void Parser::id(std::string name) {
|
||||
if(name != "_") {
|
||||
dbc::check(!cells.contains(name),
|
||||
|
@ -41,28 +26,6 @@ namespace lel {
|
|||
cur = {cur.col + 1, cur.row};
|
||||
}
|
||||
|
||||
void Parser::row() {
|
||||
rows++;
|
||||
columns = std::max(columns, cur.col);
|
||||
cur.col = 0;
|
||||
}
|
||||
|
||||
void Parser::setwidth(int width) {
|
||||
cur.max_w = width;
|
||||
}
|
||||
|
||||
void Parser::setheight(int height) {
|
||||
cur.max_h = height;
|
||||
}
|
||||
|
||||
void Parser::expand() {
|
||||
cur.expand = true;
|
||||
}
|
||||
|
||||
void Parser::center() {
|
||||
cur.center = true;
|
||||
}
|
||||
|
||||
void Parser::finalize() {
|
||||
dbc::check(columns > 0, "columns are 0");
|
||||
dbc::check(rows > 0, "rows are 0");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue