Received: from mail2.protonmail.ch (mail2.protonmail.ch [185.70.40.22]) by mail-b.sr.ht (Postfix) with ESMTPS id BC947FF145 for <~emersion/public-inbox@lists.sr.ht>; Tue, 17 Nov 2020 15:17:02 +0000 (UTC) Authentication-Results: mail-b.sr.ht; dkim=fail reason="key not found in DNS" (0-bit key) header.d=emersion.fr header.i=@emersion.fr header.b=S3Rbjs6k Date: Tue, 17 Nov 2020 15:16:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1605626221; bh=DRo4vJaQ9imzY8zT6xed3iRuZesqzF9UO0Mr30mT6J4=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=S3Rbjs6kyE4rGEb14h0Poq8CPSuKnlU/MEBc8AiTuO3J9EGMW1MrJD3JyZ4HYTG6L Azg3oA7vhUxMOa3XCCuaFjuzDUmvCHYTOzLWDDAi1hTklT2V2I7xGF640hVvIe7eYA 9wT7fyaOZFtFBBh130c1agNGGXMIZ/w6kfLznVqd7zi5qBz8Kd6cIyEGdN4mwSPa/p Ke5cCvNRuOAKu261zNoqFf0pVoXvI/t1qNKPuXpmaVeGEKhcBgy974P2C+yRYM8ucB LA+gABWt4DhUV+mpEjkg96Xs9R9Js8BUiR5VIAwvRm5DcLMKJDlWEVjLZhXywy0QTO tv1bxZwUee48Q== To: Adnan Maolood From: Simon Ser Cc: "~emersion/public-inbox@lists.sr.ht" <~emersion/public-inbox@lists.sr.ht> Reply-To: Simon Ser Subject: Re: [scfg] Question about comments Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch On Saturday, November 7, 2020 3:23 AM, Adnan Maolood wrote: > I want to use scfg to configure a simple stylesheet. > This currently doesn't work, because scfg thinks the colors are > comments: > > style { > background #000000 > foreground #ffffff > } > > Instead, the colors must be wrapped in quotes, which is somewhat > ugly-looking. > > What if comments were only allowed at the beginning of a line? > For example: > > block { > # This is a comment > color #000000 This is not a comment > } > > Or perhaps a character other than '#' can be used for comments. > What do you think? Yeah, I think this makes sense. Currently the Go library uses shlex to split tokens and will stop on any '#', but I think it should migrate to its own parser instead (like libscfg). The spec is currently missing comments in its grammar, but the prose does already say '#' in the middle of a line doesn't start a comment.