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

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 21:35:31 PDT 2024


Author: Piotr Fusik
Date: 2024-06-21T06:35:28+02:00
New Revision: a2cd846b7bcc747825ed15b4ab1e9b243ff6b917

URL: https://github.com/llvm/llvm-project/commit/a2cd846b7bcc747825ed15b4ab1e9b243ff6b917
DIFF: https://github.com/llvm/llvm-project/commit/a2cd846b7bcc747825ed15b4ab1e9b243ff6b917.diff

LOG: [TableGen][Docs] Clarify `TokCode` definition. (#96201)

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

Added: 
    

Modified: 
    llvm/docs/TableGen/ProgRef.rst

Removed: 
    


################################################################################
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