From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gOtjAw5v62UZ6AAAbAwnHQ (envelope-from ) for ; Fri, 08 Mar 2024 21:03:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id OKtzOg1v62WVlQAAe85BDQ (envelope-from ) for ; Fri, 08 Mar 2024 21:03:26 +0100 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=o7dJ1BQL; dkim=pass header.d=johnnyrichard.com header.s=key1 header.b=EpJP1PyO; dmarc=pass (policy=quarantine) header.from=johnnyrichard.com; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht ARC-Seal: i=1; s=key1; d=johnnyrichard.com; t=1709928205; a=rsa-sha256; cv=none; b=BpNaaUFPXJAlHXwv6sL6Kos+M25ZqIGLGJCWEw2Yhon6xO2k6pya3FXJZ7ZFE6FwaSXTwe 98X2SSr/Nbcl8W0XmTpzrSuz4a4h9+Xw1CHNTp1cnLOzMoZw2sRurR9ch22pyGCVImpr6P d/t8P6dp5d+Zw/3tLNb2Jaz6BQsXXnokXELnQHBMF7j6saLt0pVmoNeb6B3sOiUJHduhJR lIFjdqfUnWlsoGhSDp+Ilo5nvQL/TJEcCb9jjQAgbwDo7HkyfEoNyZxWkOktLVAKuvaqHd up1saULHozjSKh+PEy5WVLT0hQj21zNN0fCphkYAInv2J9noYAjtQ0s1Ooh3Sg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=o7dJ1BQL; dkim=pass header.d=johnnyrichard.com header.s=key1 header.b=EpJP1PyO; dmarc=pass (policy=quarantine) header.from=johnnyrichard.com; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1709928205; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=BZXBrhYz5eQ6kfiUrIFaZlF01PBPkFauDQ7REtsXz58=; b=iXcGVTxumy0cTdDVEQeFk75viNt+QLrI/tJ9ouG2ZRgRvJ5ihbrMsRiQGPkmHl1OA7p3eM 1c97OU43dt/Sb215NwtoC2OiplRbdQLymk9bLVNpBHIaStnfUEdhuHA9qv0+N99qt8fmjH H4Q3fNtN/SHc2P3FuCYqMgqFh86oqtk3t9qAngsApgDBHl9fzRLkpJhA2vYKaWlyEyynnV V1ZZiLHb4MCl/y5Rhe3Zu4xa2tS3ArkrhEnQbKlQM3wKALlc/fCFKj/t3PYZ9DFHPozENF DBriK5kx18k8UGqIVUy9uXFLZnq3s0VN1WFjgbN7fxIm9FrUGtYRVReZzv5nxA== 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 93E7ABE29 for ; Fri, 8 Mar 2024 21:03:25 +0100 (CET) DKIM-Signature: a=rsa-sha256; bh=VMDJsIDA3T+HV8+jiaKQ5nezL8XbMAxptCwVaTgmIZQ=; c=simple/simple; d=lists.sr.ht; h=Date:From:To:Subject:References:In-Reply-To:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1709928205; v=1; b=o7dJ1BQL4ztCCl5onJF/sfVIBJwdHLIfzv689qcnsAXywSbefbq814oiP7XKtRRiTpLFhfHp Q/iF3+u97DS4MqXdJchuqaSuImx4qekVDtnPlDyH1xug8MzvBtIPNOvs2MrmDY/TBPbeivc7EyT 8RIRQMRdRaEv8RICS78sqSyNknbEauzIeXDsL0mKn6fNXXzAuB9zaqKnzlQ48Kx7dsFrXy0gXsv AZnBP/jFUol7U0vNo1pLSFlX0cUMycAAGcgZ9qAVnyFhzRtscKDNHk9DLT/RcN1d3fYKu0eOBbt ILS8EotnI4SOWAYnngmY2QeVsLCE5PS/Sci/RaDpExZNg== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 5D9812025F for ; Fri, 8 Mar 2024 20:03:25 +0000 (UTC) Received: from out-184.mta1.migadu.com (out-184.mta1.migadu.com [IPv6:2001:41d0:203:375::b8]) by mail-a.sr.ht (Postfix) with ESMTPS id AD42F20224 for <~johnnyrichard/olang-devel@lists.sr.ht>; Fri, 8 Mar 2024 20:03:24 +0000 (UTC) Date: Fri, 8 Mar 2024 22:03:46 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1709928204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BZXBrhYz5eQ6kfiUrIFaZlF01PBPkFauDQ7REtsXz58=; b=EpJP1PyO0txxTatRmvYumYQtp/xe52a60mF9uGLRowaGuXKGA3n7EusSt0jTuK9M6EMLRg NpG4eq3hozKh+lQ/LsNpThi8V70n0aHZ2xtgtiS3Ul+K3dNQ3+ek1s9JckZmbHpY52kgzg r89NrUnjb0jEkMQbbnRnRZCbw/WW15p53pKqZ9YVNThZr3VCd3L0BCBAF21YPNQzFsZ+az PDfIF3wW4OqtnblyktLiiYM5l1JTP7E9Ev0CV37hFsaJ+NTRgXsriBFBr5sTHvVcUdSxz6 B8nhSl3pPSzcxBH4kpxk4cJlXWHY2+Y4HqyX7YsD8kGfL8n/0wpJd9lp4fgy0Q== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Subject: Re: [PATCH olang] parser: abort when parser identifies a syntax error Message-ID: <55doydur4izrww2gzvfjsy42hlzsemaoxnsicoeiaakphcurus@4tqikkf7ne5w> References: <20240308205358.1046108-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240308205358.1046108-1-johnny@johnnyrichard.com> 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-Flow: FLOW_IN X-Migadu-Country: NL X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -10.05 X-Spam-Score: -10.05 X-Migadu-Queue-Id: 93E7ABE29 X-TUID: RTSB+BtPoul5 Ops... the lint failing again... Please consider the following fixup: -------->8-------- Subject: [PATCH olang] fixup! parser: abort when parser identifies a syntax error diff --git a/src/parser.c b/src/parser.c index cfea9ef..3316e07 100644 --- a/src/parser.c +++ b/src/parser.c @@ -173,7 +173,7 @@ expected_token(parser_t *parser, token_t *token, token_kind_t expected_kind) if (token->kind != expected_kind) { fprintf(stderr, - "%s:%lu:%lu: error: got '"SV_FMT"' token but expect <%s>\n", + "%s:%lu:%lu: error: got '" SV_FMT "' token but expect <%s>\n", parser->file_path, token->location.row + 1, (token->location.offset - token->location.bol) + 1,