|
|
|||
File indexing completed on 2026-05-10 08:44:45
0001 //===-- ResourceScriptToken.h -----------------------------------*- C++-*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===---------------------------------------------------------------------===// 0008 // 0009 // This declares the .rc script tokens. 0010 // The list of available tokens is located at ResourceScriptTokenList.h. 0011 // 0012 // Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa380599(v=vs.85).aspx 0013 // 0014 //===---------------------------------------------------------------------===// 0015 0016 #ifndef LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_SCRIPTTOKEN_H 0017 #define LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_SCRIPTTOKEN_H 0018 0019 #include "llvm/ADT/StringRef.h" 0020 0021 namespace llvm { 0022 0023 // A definition of a single resource script token. Each token has its kind 0024 // (declared in ResourceScriptTokenList) and holds a value - a reference 0025 // representation of the token. 0026 // RCToken does not claim ownership on its value. A memory buffer containing 0027 // the token value should be stored in a safe place and cannot be freed 0028 // nor reallocated. 0029 class RCToken { 0030 public: 0031 enum class Kind { 0032 #define TOKEN(Name) Name, 0033 #define SHORT_TOKEN(Name, Ch) Name, 0034 #include "ResourceScriptTokenList.h" 0035 #undef TOKEN 0036 #undef SHORT_TOKEN 0037 }; 0038 0039 RCToken(RCToken::Kind RCTokenKind, StringRef Value); 0040 0041 // Get an integer value of the integer token. 0042 uint32_t intValue() const; 0043 bool isLongInt() const; 0044 0045 StringRef value() const; 0046 Kind kind() const; 0047 0048 // Check if a token describes a binary operator. 0049 bool isBinaryOp() const; 0050 0051 private: 0052 Kind TokenKind; 0053 StringRef TokenValue; 0054 }; 0055 0056 } // namespace llvm 0057 0058 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|