aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-11-03 23:11:06 +0000
committergingerBill <bill@gingerbill.org>2017-11-03 23:11:06 +0000
commit0b29e42adb1a9eebec6c5ecc630be91a41af07f1 (patch)
treef908cc1a2489ff30ab69bc444bf4dfad98868adb /src/parser.cpp
parentfcc8b89e6b8f2df503ff19abbca67f8cbddf11dc (diff)
`link_prefix`; `thread_local`; fix `link_name` for file-scope variables
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 4595909d9..72c689674 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -116,8 +116,7 @@ enum ProcCallingConvention {
};
enum VarDeclFlag {
- VarDeclFlag_using = 1<<0,
- VarDeclFlag_thread_local = 1<<1,
+ VarDeclFlag_using = 1<<0,
};
enum StmtStateFlag {
@@ -4650,22 +4649,6 @@ AstNode *parse_stmt(AstFile *f) {
}
expect_semicolon(f, s);
return s;
- } else if (tag == "thread_local") {
- AstNode *s = parse_stmt(f);
-
- if (s->kind == AstNode_ValueDecl) {
- if (!s->ValueDecl.is_mutable) {
- syntax_error(token, "`thread_local` may only be applied to variable declarations");
- }
- if (f->curr_proc != nullptr) {
- syntax_error(token, "`thread_local` is only allowed at the file scope");
- } else {
- s->ValueDecl.flags |= VarDeclFlag_thread_local;
- }
- return s;
- }
- syntax_error(token, "`thread_local` may only be applied to a variable declaration");
- return ast_bad_stmt(f, token, f->curr_token);
} else if (tag == "bounds_check") {
s = parse_stmt(f);
s->stmt_state_flags |= StmtStateFlag_bounds_check;