aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/builtins.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 15:54:04 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 15:54:04 +0330
commit0879d0a42d137054057cd2a1e37437e6be78ed0b (patch)
treefcb16d3185c1f80fae8d54cd9062bd68d6c0c88d /src/compiler/builtins.zc
parentmerge spec conformance suite (diff)
parentmerge main into work/line-tables (diff)
merge line tables
Diffstat (limited to 'src/compiler/builtins.zc')
-rw-r--r--src/compiler/builtins.zc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/builtins.zc b/src/compiler/builtins.zc
index 53d8597..5d7bc9c 100644
--- a/src/compiler/builtins.zc
+++ b/src/compiler/builtins.zc
@@ -507,6 +507,15 @@ int kw_docs() {
next(); expect(s_semi);
return 0;
}
+// lines on; records line tables for the functions that follow, lines off; stops (see lt_begin)
+int kw_lines() {
+ next();
+ if (is_id(s_on)) {
+ lines_on = 1;
+ } else if (is_id(s_off)) lines_on = 0; else die("lines on or lines off");
+ next(); expect(s_semi);
+ return 0;
+}
// hints on; / hints small; / hints off; from here to the end of the document (or the next such line)
int kw_hints() {
int level = 2, at = toff;
@@ -1167,7 +1176,7 @@ int types_init() {
s_le = intern("<=");
s_ge = intern(">=");
s_eqeq = intern("=="); s_ne = intern("!="); s_plus = intern("+");
- s_struct = intern("struct"); s_type = intern("type"); s_typedef = intern("typedef"); s_typecheck = intern("typecheck"); s_docs = intern("docs"); s_std = intern("std"); s_icon = intern("icon"); s_small = intern("small");
+ s_struct = intern("struct"); s_type = intern("type"); s_typedef = intern("typedef"); s_typecheck = intern("typecheck"); s_docs = intern("docs"); s_lines = intern("lines"); s_std = intern("std"); s_icon = intern("icon"); s_small = intern("small");
s_on = intern("on");
s_off = intern("off");
s_new = intern("rt.new");