From b832504f109d242adaa75e3cb20dba9e80fee80a Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Thu, 29 Oct 2026 21:25:17 +0100 Subject: [PATCH] style: spell AST flag masks in binary --- README.md | 2 +- source/ast/ast.hon | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a54488c..d97e1ae 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ build Honey from this directory: bro build ``` -the bootstrap must support contextual `&[]` literals for mutable slices; collection initialization and reset use these literals instead of a dedicated empty-slice helper. if the installed `bro` predates that feature, use `../brolang/build/brolang build` after rebuilding Bro. zero-sized elements with nonzero logical lengths still use the memory module's specialized storage handling. +the bootstrap must support contextual `&[]` literals for mutable slices and prefixed integer literals (`0b`, `0o`, `0x`); collection initialization uses contextual empty slices and AST flag masks use binary spelling. if the installed `bro` predates either feature, rebuild Bro with `make -C ../brolang build` and use `../brolang/build/brolang build`. zero-sized elements with nonzero logical lengths still use the memory module's specialized storage handling. run a source file with the interpreter: diff --git a/source/ast/ast.hon b/source/ast/ast.hon index 46c8086..097faa3 100644 --- a/source/ast/ast.hon +++ b/source/ast/ast.hon @@ -202,10 +202,10 @@ NodeData :: union { binary_operator BinaryOperator } -@hide:file file_local_flag u8 :: 1 -@hide:file foreign_type_flag u8 :: 2 -@hide:file variadic_flag u8 :: 4 -@hide:file opaque_flag u8 :: 8 +@hide:file file_local_flag u8 :: 0b0001 +@hide:file foreign_type_flag u8 :: 0b0010 +@hide:file variadic_flag u8 :: 0b0100 +@hide:file opaque_flag u8 :: 0b1000 @hide:file Node :: struct {