From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MHCpH/suB2c2CgAA62LTzQ:P1 (envelope-from ) for ; Thu, 10 Oct 2024 03:33:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id MHCpH/suB2c2CgAA62LTzQ (envelope-from ) for ; Thu, 10 Oct 2024 03:33:47 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=BPvXJP4N; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b=R3PZWECO; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=pass (policy=none) header.from=maniero.me; arc=pass ("mailchannels.net:s=arc-2022:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1728524027; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=nUvWWLSHTKPbER3kBudU2GLLf60Jj/RKKwmh4mkWQs0=; b=EnbwVTwoRCFvk2BvbztYgwyoGOS3HqV/Zx8fLrJqj7RVkCgl8ztYWYWJegbpx6ECDkpfpz uoAKQwB6kOQTTbKXPulQ3crDy/KUkyxjfGA0TEDb6mvL5Hx0NMZOsmM2cqt+BKj/hVGeZJ bTwBPCquelaYvhkd6yiHbRObpeHtSQldoRtD9B1YqNd/fA+45NdlugUvxlCd9XVJ1GurUJ T4slUJ5Dz9Of+fRARNeShm5cVXPaiqjRnQZgezbum/7GcXm3oWjP8VXIr1nAMIfVxm+iA8 w3iVLKdZVvJ3fi8s27UWZe1XqMsHE836E9ryPje4kRItHqB9ybhIwUP44ce0Wg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=BPvXJP4N; dkim=pass header.d=maniero.me header.s=hostingermail1 header.b=R3PZWECO; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht; dmarc=pass (policy=none) header.from=maniero.me; arc=pass ("mailchannels.net:s=arc-2022:i=1") ARC-Seal: i=2; s=key1; d=johnnyrichard.com; t=1728524027; a=rsa-sha256; cv=pass; b=ifl5vRQ3lH5LThqYCngRO7EJzq3oR/czLPdVErMRVRaYR1hY/OWITmsdaWfcVmMjvhCTtk LviUrIHZycr15b7P75oK/0m2I8WPMJQXE1JNtswkh5USqDMCDgVbGgtoXhuve4Mvl5py1Y VkWfXqHAaDhLa16jDF/l17bU22BQx3pPdR52HkRoQbzmkQdf+1whjz5H27NsuWCRdWbHeL gU6MC82qROosirGq0pibtfxhMpYNy7NpTxz2s9tegLfhjn7+ErenWFK79GW5zvm7C3EbsK AtKFQtS5MMdPHH/w9K3w+tnepeXXJKoGr2iNhSMUUwHxegApBJlfOEhUfgAtGQ== Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2541F870C0 for ; Thu, 10 Oct 2024 03:33:46 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=VK8/8m5GH6yQyzHRDZHNqdqK9bdAxeh1U4cEPg3reKc=; c=simple/simple; d=lists.sr.ht; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1728524025; v=1; b=BPvXJP4N3CIrDxNXP545LGTgZPFFhlVhvt50VPhy8hCxti2WBjnu6a8vfCkDheyLYNIoWxwl SVPveB3v3bSeRklcQ/u2Q7i+1sb5CEJnRH+VsSEPncqeUx6fgbmpu8HgJAQOytCG7CHWDDDollr zNZ9W/u2EZmniyulDHNRd4khkg5KNbapG+DYugI4kD2fjO6iAF9EXUZOfcgXVX9TYmLu3nNEkdb /dtWcZBw++yDGxf02OCpBZNPCfH65idK9H1nNC2eGxVA3YmU4xvM7w+nk6QBVugP1W66g5+E45w Tzs3yoXI6smPakGGtDRD05QS2zI3j597V3Hu3dgME383g== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id BA3C72020B for ; Thu, 10 Oct 2024 01:33:45 +0000 (UTC) Received: from dog.elm.relay.mailchannels.net (dog.elm.relay.mailchannels.net [23.83.212.48]) by mail-a.sr.ht (Postfix) with ESMTPS id CC80F201E1 for <~johnnyrichard/olang-devel@lists.sr.ht>; Thu, 10 Oct 2024 01:33:44 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5A5151A2EBE for <~johnnyrichard/olang-devel@lists.sr.ht>; Thu, 10 Oct 2024 01:33:43 +0000 (UTC) Received: from nl-srv-smtpout1.hostinger.io (trex-13.trex.outbound.svc.cluster.local [100.100.145.244]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id AE4FB1A421D for <~johnnyrichard/olang-devel@lists.sr.ht>; Thu, 10 Oct 2024 01:33:42 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1728524022; a=rsa-sha256; cv=none; b=1hpJrF8kYwRPooyDMXT2/HfsQgu7RqvDgAWA8khHswPfsd+qDPqAmS0AqzFNOh9m8QN9Pt ddaTMmtFOTAK+Gu9lWasRmBcm9lqJAMCOuCW5eM5FlyhOlg/4deEATOYG2S/XFb6/Gaskk 2qxyCVnNGxiFd85xiO4/ARyNFTU9k2Qzwp4YoeAgcbJX5vw90+ZHeKevwyeLI7HjYJv8S0 VZG9tLiuMK2cvQOlSVQHFT1YtskXj9df2VfnG6vc4OmOUvd13fr2C2hCZG0njzqjeocGDn RAQfm6CdknK4BNZpHdoh4pfNvEfweRJ1Hgl4D6yDABaBgSqvywmjtAB9sPlkUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1728524022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nUvWWLSHTKPbER3kBudU2GLLf60Jj/RKKwmh4mkWQs0=; b=h2SIl8poBbIFYxUfuhbIf3MNxIkO7622QKbDGs0fUZNHLSo7NKBO0k4mvH8fzFlZI8zSms jSWswBSo78NqQEZYnAICJxihyNm2rFbrRX+RANBJryqg+VgqUGz6YmqiRLxgFxMWczNlJg cmr5P2UfBS3RwpgqFMB/+Jep5yJWtB2lPPjq5Y5wopjghle0xTZMTPkAj1hEbJ09OXBuqo 2lC8TUF0D4l1pGs8W518X/TKgsKLVgCz2hXUn/n4o4De4Ax6R3H27vW4Mq5FEW3szDrnoh jp7eZw/WlSMG1n3YqN44+RhlaDNpri9NU33y5/PGgVUzX7a6lyqlXqcXJV9jCw== ARC-Authentication-Results: i=1; rspamd-585564d48b-vph9r; auth=pass smtp.auth=hostingeremail smtp.mailfrom=carlos@maniero.me X-Sender-Id: hostingeremail|x-authuser|carlos@maniero.me X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|carlos@maniero.me X-MailChannels-Auth-Id: hostingeremail X-Blushing-Descriptive: 78ed89ca49bfd8a1_1728524023175_2361321905 X-MC-Loop-Signature: 1728524023175:335694834 X-MC-Ingress-Time: 1728524023174 Received: from nl-srv-smtpout1.hostinger.io (nl-srv-smtpout1.hostinger.io [145.14.150.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.100.145.244 (trex/7.0.2); Thu, 10 Oct 2024 01:33:43 +0000 From: Carlos Maniero DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maniero.me; s=hostingermail1; t=1728524020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nUvWWLSHTKPbER3kBudU2GLLf60Jj/RKKwmh4mkWQs0=; b=R3PZWECO1wnSJAv6asrOBzG0lbH7nmj+GL7qX8+WTy1q+wSMCE3oCxbqGpO0ZdbIJINM+k YrJYzgqr8ZTwRF+pE2OYpbeBR9C1Gpg7//Dk1xnSujj67EB2oIK38lvbV2GX+rjLjBI9pe lATzC5DPQfr4L2DNztDDTU3eVe7BIjukHHQ4jHD+XvN8xJKQ4OdadgxqLMBQ8ajpSCjbpI fJIo3xcJnQzCJ8+biGOMciFv4ngPOrIgXKyyjd+nF8Lrztil3bU7gK/h9O92kh3H272o5e yTEsSVQa127fj5fPjCo2FBQ4/qt8CRrdVzHOguwqdpcu/Wa9+cRth9g68Z2hMA== To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Carlos Maniero Subject: [PATCH olang v1 4/6] codestyle: do not allow single line enums Message-ID: <20241010013318.222905-5-carlos@maniero.me> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241010013318.222905-1-carlos@maniero.me> References: <20241010013318.222905-1-carlos@maniero.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Thu, 10 Oct 2024 01:33:40 +0000 (UTC) X-CM-Envelope: MS4xfDjn9HNEsB8Cd6PYv039U6r+JNJWlOSe0ZNl/XIb+CAVABC1y0GAE0gLsvsuSSUqEp4Jw88UDuCcklan8ZRjhB1dveegVTnm0iih8llLwamP4aIgUJ/Y tWImbyjRv1fQhryxlVZVW+UWSq7/EbYlj2xyCo9Rsj1Q8VoAWrk+UHFSVCZ6VjeI91iL8QXulQVYLtpFnRoClU/c24dMh3GZCbom1d0XW1aOOtV4h8qv5E/w X-CM-Analysis: v=2.4 cv=bZY5U/PB c=1 sm=1 tr=0 ts=67072ef4 a=WwxFCuf3mf1fs3oSi6/dng==:117 a=WwxFCuf3mf1fs3oSi6/dng==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=U1-6Yha2LN1R7IznBW8A:9 a=BXDaF_L80NY05PYiAFlV:22 X-AuthUser: carlos@maniero.me X-Sourcehut-Patchset-Status: UNKNOWN List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Country: NL X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -1.60 X-Spam-Score: -1.60 X-Migadu-Queue-Id: 2541F870C0 X-TUID: THkpyIhBehjx Signed-off-by: Carlos Maniero --- .clang-format | 2 +- src/ast.h | 4 +++- src/type.h | 13 +++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index f106b8f..a1e9892 100644 --- a/.clang-format +++ b/.clang-format @@ -33,7 +33,7 @@ AlignOperands: Align AlignTrailingComments: true AllowAllArgumentsOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: false -AllowShortEnumsOnASingleLine: true +AllowShortEnumsOnASingleLine: false AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline diff --git a/src/ast.h b/src/ast.h index b220708..98e035f 100644 --- a/src/ast.h +++ b/src/ast.h @@ -89,7 +89,9 @@ typedef struct ast_var_definition { scope_t *scope; } ast_var_definition_t; -typedef enum { AST_LITERAL_U32 } ast_literal_kind_t; +typedef enum { + AST_LITERAL_U32 +} ast_literal_kind_t; typedef struct ast_literal { ast_node_meta_t meta; diff --git a/src/type.h b/src/type.h index edc421b..204f849 100644 --- a/src/type.h +++ b/src/type.h @@ -21,9 +21,18 @@ typedef union type type_t; -typedef enum { TYPE_UNKNOWN, TYPE_PRIMITIVE, TYPE_PTR } type_kind_t; +typedef enum { + TYPE_UNKNOWN, + TYPE_PRIMITIVE, + TYPE_PTR +} type_kind_t; -typedef enum { TYPE_U8, TYPE_U16, TYPE_U32, TYPE_U64 } type_primitive_kind_t; +typedef enum { + TYPE_U8, + TYPE_U16, + TYPE_U32, + TYPE_U64 +} type_primitive_kind_t; typedef struct type_primitive { type_kind_t _type_kind; -- 2.46.0