aboutsummaryrefslogtreecommitdiff
path: root/boot/parser.yy
diff options
context:
space:
mode:
Diffstat (limited to 'boot/parser.yy')
-rw-r--r--boot/parser.yy11
1 files changed, 11 insertions, 0 deletions
diff --git a/boot/parser.yy b/boot/parser.yy
index 68af60e..ab386fe 100644
--- a/boot/parser.yy
+++ b/boot/parser.yy
@@ -100,6 +100,7 @@ along with GCC; see the file COPYING3. If not see
NIL "nil"
CONST "const"
VAR "var"
+ THREADVAR "threadvar"
PROCEDURE "proc"
TYPE "type"
RECORD "record"
@@ -191,6 +192,16 @@ module_declaration:
$$.insert($$.end(), variables.begin(), variables.end());
}
+ | "threadvar" variable_declarations
+ {
+ std::vector<boot::variable_declaration *> variables = $2;
+
+ for (boot::variable_declaration *const variable : variables)
+ {
+ variable->is_thread_local = true;
+ }
+ $$.insert($$.end(), variables.begin(), variables.end());
+ }
| procedure_declaration { $$.emplace_back($1); }
module_declarations:
%empty {}