diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2015-12-06 03:04:23 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2015-12-06 03:04:23 +0800 |
commit | 1e1bfad8ec07ab2e928cb152c492f24f9fa4e2b3 (patch) | |
tree | d15943db967fdebbea61a194f48e1dff6cea91bd | |
parent | 9b5000658fd659452acb6cfd9c5517e41992894e (diff) | |
download | compiler2015-1e1bfad8ec07ab2e928cb152c492f24f9fa4e2b3.tar compiler2015-1e1bfad8ec07ab2e928cb152c492f24f9fa4e2b3.tar.gz compiler2015-1e1bfad8ec07ab2e928cb152c492f24f9fa4e2b3.tar.bz2 compiler2015-1e1bfad8ec07ab2e928cb152c492f24f9fa4e2b3.tar.lz compiler2015-1e1bfad8ec07ab2e928cb152c492f24f9fa4e2b3.tar.xz compiler2015-1e1bfad8ec07ab2e928cb152c492f24f9fa4e2b3.tar.zst compiler2015-1e1bfad8ec07ab2e928cb152c492f24f9fa4e2b3.zip |
Fix indent and broken include guard in state.[ch]
-rw-r--r-- | src/state.c | 14 | ||||
-rw-r--r-- | src/state.h | 10 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/state.c b/src/state.c index a4e5080..cf41d56 100644 --- a/src/state.c +++ b/src/state.c @@ -7,14 +7,16 @@ void ccmmc_state_init (CcmmcState *state) { - state->ast = NULL; - state->line_number = 1; - state->any_error = false; + state->ast = NULL; + state->line_number = 1; + state->any_error = false; } void ccmmc_state_fini (CcmmcState *state) { - if (state->ast != NULL) { - // TODO: Free the AST - } + if (state->ast != NULL) { + // TODO: Free the AST + } } + +// vim: set sw=4 ts=4 sts=4 et: diff --git a/src/state.h b/src/state.h index 2f250af..5a88980 100644 --- a/src/state.h +++ b/src/state.h @@ -1,5 +1,5 @@ #ifndef CCMMC_HEADER_STATE_H -#endif +#define CCMMC_HEADER_STATE_H #include "ast.h" #include "symbol-table.h" @@ -9,13 +9,13 @@ // All states of the compiler instance typedef struct CcmmcState_struct { - CcmmcAst *ast; - size_t line_number; - bool any_error; + CcmmcAst *ast; + size_t line_number; + bool any_error; } CcmmcState; void ccmmc_state_init (CcmmcState *state); void ccmmc_state_fini (CcmmcState *state); +#endif // vim: set sw=4 ts=4 sts=4 et: -#define CCMMC_HEADER_STATE_H |