Update clang-format config, run it.
This commit is contained in:
parent
7a72294426
commit
08368b178c
|
@ -4,8 +4,10 @@ IndentWidth: 2
|
|||
---
|
||||
Language: Cpp
|
||||
PointerAlignment: Left
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
ColumnLimit: 100
|
||||
AlignEscapedNewlines: DontAlign
|
||||
BreakStringLiterals: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SortIncludes: true
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/build
|
|
@ -25,21 +25,13 @@ public:
|
|||
moveTo(0, 0);
|
||||
}
|
||||
|
||||
void setColor(double r, double g, double b) {
|
||||
cairo_set_source_rgb(context, r, g, b);
|
||||
}
|
||||
void setColor(double r, double g, double b) { cairo_set_source_rgb(context, r, g, b); }
|
||||
|
||||
void setLineWidth(double size) {
|
||||
cairo_set_line_width(context, size);
|
||||
}
|
||||
void setLineWidth(double size) { cairo_set_line_width(context, size); }
|
||||
|
||||
void paint() {
|
||||
cairo_paint(context);
|
||||
}
|
||||
void paint() { cairo_paint(context); }
|
||||
|
||||
void moveTo(double x, double y) {
|
||||
cairo_move_to(context, x, y);
|
||||
}
|
||||
void moveTo(double x, double y) { cairo_move_to(context, x, y); }
|
||||
|
||||
void rectangleTo(double width, double height) {
|
||||
double baseX;
|
||||
|
@ -58,17 +50,13 @@ public:
|
|||
moveTo(x, y);
|
||||
}
|
||||
|
||||
void save(char const* filename) {
|
||||
cairo_surface_write_to_png(surface, filename);
|
||||
}
|
||||
void save(char const* filename) { cairo_surface_write_to_png(surface, filename); }
|
||||
|
||||
void save(std::string const& filename) {
|
||||
save(filename.c_str());
|
||||
}
|
||||
void save(std::string const& filename) { save(filename.c_str()); }
|
||||
|
||||
private:
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *context;
|
||||
cairo_surface_t* surface;
|
||||
cairo_t* context;
|
||||
};
|
||||
|
||||
static std::unique_ptr<Turtle> turtle;
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
V(Module) \
|
||||
V(FunctionCallExpression) \
|
||||
V(BinaryExpression) \
|
||||
V(AtomicExpression) \
|
||||
V(AtomicExpression)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -32,6 +32,6 @@
|
|||
V(GE, OGE) \
|
||||
V(GT, OGT) \
|
||||
V(LE, OLE) \
|
||||
V(LT, OLT) \
|
||||
V(LT, OLT)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -38,6 +38,6 @@
|
|||
V(FUN_PARAMS, VOID) \
|
||||
V(RETURN, VOID) \
|
||||
V(END, VOID) \
|
||||
V(UNKNOWN, VOID) \
|
||||
V(UNKNOWN, VOID)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
V(OP_PLUS, VOID) \
|
||||
V(OP_MINUS, VOID) \
|
||||
V(OP_TIMES, VOID) \
|
||||
V(OP_DIV, VOID) \
|
||||
V(OP_DIV, VOID)
|
||||
|
||||
// lexer_token, ast_operator, priority, representation
|
||||
// All priorities must be STRICTLY LARGER than 0.
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
V(CHAR, Int8, "%c", "%c", "Mascetti", "char") \
|
||||
V(FLOAT, Float, "%f", "%f\n", "Perozzi", "float") \
|
||||
V(BOOL, Int1, "%d", "%d\n", "Melandri", "bool") \
|
||||
V(DOUBLE, Double, "%lf", "%f\n", "Sassaroli", "double") \
|
||||
V(DOUBLE, Double, "%lf", "%f\n", "Sassaroli", "double")
|
||||
|
||||
#endif
|
||||
|
|
Reference in New Issue
Block a user