Skip to content

Commit

Permalink
include: Make all includes quotations
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Oct 27, 2024
1 parent 2f73724 commit 8e34478
Show file tree
Hide file tree
Showing 29 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

mkdir -p bin

cc_flags="-std=c11 -g -Wall -Wextra -Werror -Iflamingo/runtime -Iflamingo -Wno-unused-parameter"
cc_flags="-std=c11 -g -Wall -Wextra -Werror -Iflamingo/runtime -Wno-unused-parameter"

# XXX With the default error limit, clangd tells us that there are too many errors and it's stopping here.
# When the error limit is disabled like I'm doing here, it says there are no errors.
Expand Down
8 changes: 4 additions & 4 deletions flamingo/call.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#pragma once

#include <common.h>
#include <env.h>
#include <scope.h>
#include <var.h>
#include "common.h"
#include "env.h"
#include "scope.h"
#include "var.h"

#include "grammar/block.h"
#include "grammar/expr.h"
Expand Down
4 changes: 2 additions & 2 deletions flamingo/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include <common.h>
#include <scope.h>
#include "../common.h"
#include "../scope.h"

#include <assert.h>
#include <stdlib.h>
Expand Down
10 changes: 5 additions & 5 deletions flamingo/flamingo.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

#include "runtime/lib.c"

#include <common.h>
#include <env.h>
#include <grammar/statement.h>
#include <primitive_type_member.h>
#include <scope.h>
#include "common.h"
#include "env.h"
#include "grammar/statement.h"
#include "primitive_type_member.h"
#include "scope.h"

typedef struct {
TSParser* parser;
Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/access.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "expr.h"

#include <common.h>
#include <scope.h>
#include "../common.h"
#include "../scope.h"

static int access_find_var(flamingo_t* flamingo, TSNode node, flamingo_var_t** var, flamingo_val_t** accessed_val) {
assert(var != NULL);
Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "expr.h"

#include <common.h>
#include <val.h>
#include "../common.h"
#include "../val.h"

static int parse_assert(flamingo_t* flamingo, TSNode node) {
assert(ts_node_child_count(node) == 2);
Expand Down
8 changes: 4 additions & 4 deletions flamingo/grammar/assignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#include "access.h"
#include "expr.h"

#include <common.h>
#include <scope.h>
#include <val.h>
#include <var.h>
#include "../common.h"
#include "../scope.h"
#include "../val.h"
#include "../var.h"

static int parse_assignment(flamingo_t* flamingo, TSNode node) {
assert(strcmp(ts_node_type(node), "assignment") == 0);
Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/binary_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "expr.h"

#include <common.h>
#include <val.h>
#include "../common.h"
#include "../val.h"

#include <math.h>

Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "statement.h"

#include <common.h>
#include <env.h>
#include "../common.h"
#include "../env.h"

static int parse_block(flamingo_t* flamingo, TSNode node, flamingo_scope_t** inner_scope) {
assert(strcmp(ts_node_type(node), "block") == 0);
Expand Down
6 changes: 3 additions & 3 deletions flamingo/grammar/call.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include <call.h>
#include <common.h>
#include <scope.h>
#include "../call.h"
#include "../common.h"
#include "../scope.h"

#include "block.h"
#include "expr.h"
Expand Down
10 changes: 5 additions & 5 deletions flamingo/grammar/function_declaration.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

#pragma once

#include "../common.h"
#include "../env.h"
#include "../scope.h"
#include "../val.h"
#include "../var.h"
#include "params.h"
#include "static.h"
#include "var_decl.h"
#include <common.h>
#include <env.h>
#include <scope.h>
#include <val.h>
#include <var.h>

static int parse_function_declaration(flamingo_t* flamingo, TSNode node, flamingo_fn_kind_t kind) {
size_t const child_count = ts_node_child_count(node);
Expand Down
6 changes: 3 additions & 3 deletions flamingo/grammar/identifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include <common.h>
#include <env.h>
#include <val.h>
#include "../common.h"
#include "../env.h"
#include "../val.h"

static int parse_identifier(flamingo_t* flamingo, TSNode node, flamingo_val_t** val) {
assert(strcmp(ts_node_type(node), "identifier") == 0);
Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/import.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include <common.h>
#include "../common.h"

#include <env.h>
#include "../env.h"

#include <errno.h>
#include <sys/stat.h>
Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "expr.h"

#include <common.h>
#include <scope.h>
#include "../common.h"
#include "../scope.h"

static int parse_index(flamingo_t* flamingo, TSNode node, flamingo_val_t** val) {
assert(strcmp(ts_node_type(node), "index") == 0);
Expand Down
6 changes: 3 additions & 3 deletions flamingo/grammar/lambda.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include <common.h>
#include <env.h>
#include <val.h>
#include "../common.h"
#include "../env.h"
#include "../val.h"

#include "params.h"

Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/literal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include <common.h>
#include <val.h>
#include "../common.h"
#include "../val.h"

static int parse_literal(flamingo_t* flamingo, TSNode node, flamingo_val_t** val) {
assert(strcmp(ts_node_type(node), "literal") == 0);
Expand Down
2 changes: 1 addition & 1 deletion flamingo/grammar/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include <common.h>
#include "../common.h"

static inline int check_param_types(flamingo_t* flamingo, TSNode params) {
size_t const n = ts_node_named_child_count(params);
Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/print.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "expr.h"

#include <common.h>
#include <val.h>
#include "../common.h"
#include "../val.h"

#include <inttypes.h>

Expand Down
6 changes: 3 additions & 3 deletions flamingo/grammar/return.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

#include "expr.h"

#include <common.h>
#include <env.h>
#include <val.h>
#include "../common.h"
#include "../env.h"
#include "../val.h"

static int parse_return(flamingo_t* flamingo, TSNode node) {
assert(ts_node_child_count(node) == 1 || ts_node_child_count(node) == 2);
Expand Down
2 changes: 1 addition & 1 deletion flamingo/grammar/statement.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "return.h"
#include "var_decl.h"

#include <common.h>
#include "../common.h"

static int parse_statement(flamingo_t* flamingo, TSNode node) {
// Line insensitive statements, which are only wrapped by a hidden node.
Expand Down
2 changes: 1 addition & 1 deletion flamingo/grammar/static.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include "../common.h"
#include "var_decl.h"
#include <common.h>

static inline int find_static_members_in_class(flamingo_t* flamingo, flamingo_scope_t* scope, TSNode body) {
assert(strcmp(ts_node_type(body), "block") == 0);
Expand Down
4 changes: 2 additions & 2 deletions flamingo/grammar/unary_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "expr.h"

#include <common.h>
#include <val.h>
#include "../common.h"
#include "../val.h"

#include <math.h>

Expand Down
6 changes: 3 additions & 3 deletions flamingo/grammar/var_decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

#include "expr.h"

#include <common.h>
#include <env.h>
#include <scope.h>
#include "../common.h"
#include "../env.h"
#include "../scope.h"

static int parse_var_decl(flamingo_t* flamingo, TSNode node) {
size_t const child_count = ts_node_named_child_count(node);
Expand Down
6 changes: 3 additions & 3 deletions flamingo/primitive_type_member.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include <common.h>
#include <val.h>
#include <var.h>
#include "common.h"
#include "val.h"
#include "var.h"

#include "ptm/str.h"
#include "ptm/vec.h"
Expand Down
6 changes: 3 additions & 3 deletions flamingo/ptm/str.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include <common.h>
#include <val.h>
#include <var.h>
#include "../common.h"
#include "../val.h"
#include "../var.h"

static inline int str_len(flamingo_t* flamingo, flamingo_val_t* self, flamingo_arg_list_t* args, flamingo_val_t** rv) {
assert(self->kind == FLAMINGO_VAL_KIND_STR);
Expand Down
8 changes: 4 additions & 4 deletions flamingo/ptm/vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

#pragma once

#include <common.h>
#include <val.h>
#include <var.h>
#include "../common.h"
#include "../val.h"
#include "../var.h"

#include <grammar/call.h>
#include "../grammar/call.h"

static inline int vec_len(flamingo_t* flamingo, flamingo_val_t* self, flamingo_arg_list_t* args, flamingo_val_t** rv) {
assert(self->kind == FLAMINGO_VAL_KIND_VEC);
Expand Down
4 changes: 2 additions & 2 deletions flamingo/scope.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#pragma once

#include <common.h>
#include <val.h>
#include "common.h"
#include "val.h"

#include <assert.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion flamingo/val.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include <common.h>
#include "common.h"

#include <assert.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion flamingo/var.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include <common.h>
#include "../common.h"

static void var_set_val(flamingo_var_t* var, flamingo_val_t* val) {
if (var->val != NULL && val != NULL) {
Expand Down

0 comments on commit 8e34478

Please sign in to comment.