Mercurial > hg > CbC > CbC_llvm
diff mlir/lib/Parser/Token.h @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 0572611fdcc8 |
children |
line wrap: on
line diff
--- a/mlir/lib/Parser/Token.h Mon May 25 11:55:54 2020 +0900 +++ b/mlir/lib/Parser/Token.h Tue Jun 08 06:07:14 2021 +0900 @@ -91,6 +91,15 @@ /// removing the quote characters and unescaping the contents of the string. std::string getStringValue() const; + /// Given a token containing a hex string literal, return its value or None if + /// the token does not contain a valid hex string. A hex string literal is a + /// string starting with `0x` and only containing hex digits. + Optional<std::string> getHexStringValue() const; + + /// Given a token containing a symbol reference, return the unescaped string + /// value. + std::string getSymbolReference() const; + // Location processing. llvm::SMLoc getLoc() const; llvm::SMLoc getEndLoc() const;