[llvm] [TableGen][Docs] Clarify `TokCode` definition. (PR #96201)

Piotr Fusik via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 07:58:42 PDT 2024


https://github.com/pfusik created https://github.com/llvm/llvm-project/pull/96201

"shortest" would be an empty sequence and the rule would never match.

>From 62ab411c8d30c6f0c990a5f458069ddaf3a12721 Mon Sep 17 00:00:00 2001
From: Piotr Fusik <piotr at fusion-lang.org>
Date: Thu, 20 Jun 2024 16:56:58 +0200
Subject: [PATCH] [TableGen][Docs] Clarify `TokCode` definition.

"shortest" would be an empty sequence and the rule would never match.
---
 llvm/docs/TableGen/ProgRef.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/docs/TableGen/ProgRef.rst b/llvm/docs/TableGen/ProgRef.rst
index 3919c2a9b1b62..dcea3b721dae2 100644
--- a/llvm/docs/TableGen/ProgRef.rst
+++ b/llvm/docs/TableGen/ProgRef.rst
@@ -174,7 +174,7 @@ TableGen has two kinds of string literals:
 
 .. productionlist::
    TokString: '"' (non-'"' characters and escapes) '"'
-   TokCode: "[{" (shortest text not containing "}]") "}]"
+   TokCode: "[{" (text not containing "}]") "}]"
 
 A :token:`TokCode` is nothing more than a multi-line string literal
 delimited by ``[{`` and ``}]``. It can break across lines and the



More information about the llvm-commits mailing list