diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-02-12 21:27:13 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-02-12 21:27:13 +0000 |
| commit | bd27c24fab9900f46c0b2a92debf2b42a071e463 (patch) | |
| tree | 08ed86a7d7314ae8a39ddc9971203c9f21dc9990 /src/parser.c | |
| parent | 282f8bb06f18aca7f6a9838780d0e2c70a5d345e (diff) | |
Use a global to store the build context information
Diffstat (limited to 'src/parser.c')
| -rw-r--r-- | src/parser.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/parser.c b/src/parser.c index 085aade38..b5d8f442b 100644 --- a/src/parser.c +++ b/src/parser.c @@ -84,9 +84,9 @@ typedef enum ProcCallingConvention { } ProcCallingConvention; typedef enum VarDeclFlag { - VarDeclFlag_thread_local = 1<<0, - VarDeclFlag_using = 1<<1, - VarDeclFlag_immutable = 1<<2, + VarDeclFlag_using = 1<<0, + VarDeclFlag_immutable = 1<<1, + VarDeclFlag_thread_local = 1<<2, } VarDeclFlag; typedef enum StmtStateFlag { @@ -493,15 +493,11 @@ Token ast_node_token(AstNode *node) { case AstNode_ImportDecl: return node->ImportDecl.token; case AstNode_ForeignLibrary: return node->ForeignLibrary.token; - - case AstNode_Field: { + case AstNode_Field: if (node->Field.names.count > 0) { return ast_node_token(node->Field.names.e[0]); - } else { - return ast_node_token(node->Field.type); } - } - + return ast_node_token(node->Field.type); case AstNode_HelperType: return node->HelperType.token; case AstNode_ProcType: return node->ProcType.token; |