From 566735b298cba545d9e32e4fc489fe1387d01326 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 30 Mar 2022 13:32:56 +0300 Subject: [PATCH] cgen: add `nil` to c_reserved (it is a macro defined in MacTypes.h on macos) --- vlib/v/gen/c/cgen.v | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index c48094e7e3..16c3ab7377 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -21,10 +21,10 @@ const ( c_reserved = ['array', 'auto', 'bool', 'break', 'calloc', 'case', 'char', 'class', 'complex', 'const', 'continue', 'default', 'delete', 'do', 'double', 'else', 'enum', 'error', 'exit', 'export', 'extern', 'false', 'float', 'for', 'free', 'goto', 'if', 'inline', 'int', 'link', - 'long', 'malloc', 'namespace', 'new', 'panic', 'register', 'restrict', 'return', 'short', - 'signed', 'sizeof', 'static', 'string', 'struct', 'switch', 'typedef', 'typename', 'union', - 'unix', 'unsigned', 'void', 'volatile', 'while', 'template', 'true', 'small', 'stdout', - 'stdin', 'stderr'] + 'long', 'malloc', 'namespace', 'new', 'nil', 'panic', 'register', 'restrict', 'return', + 'short', 'signed', 'sizeof', 'static', 'string', 'struct', 'switch', 'typedef', 'typename', + 'union', 'unix', 'unsigned', 'void', 'volatile', 'while', 'template', 'true', 'small', + 'stdout', 'stdin', 'stderr'] c_reserved_map = string_array_to_map(c_reserved) // same order as in token.Kind cmp_str = ['eq', 'ne', 'gt', 'lt', 'ge', 'le']