================
@@ -0,0 +1,191 @@
+//===-- DILLexer.cpp
------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+// This implements the recursive descent parser for the Data Inspection
+// Language (DIL), and its helper functions, which will eventually underlie the
+// 'frame variable' command. The language that this parser recognizes is
+// described in lldb/docs/dil-expr-lang.ebnf
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/ValueObject/DILLexer.h"
+
+namespace lldb_private {
+
+namespace dil {
+
+const std::string DILToken::getTokenName(dil::TokenKind kind) {
+ std::string retval;
+ switch (kind) {
+ case dil::TokenKind::coloncolon:
+ retval = "coloncolon";
+ break;
+ case dil::TokenKind::eof:
+ retval = "eof";
+ break;
----------------
labath wrote:
```suggestion
llvm::StringRef DILToken::getTokenName(dil::TokenKind kind) {
switch (kind) {
case dil::TokenKind::coloncolon:
return "coloncolon";
case dil::TokenKind::eof:
return "eof";
...
```
https://github.com/llvm/llvm-project/pull/120971
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits