1 //===-- ResourceScriptToken.h -----------------------------------*- C++-*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===---------------------------------------------------------------------===//
9 // This declares the .rc script tokens.
10 // The list of available tokens is located at ResourceScriptTokenList.h.
12 // Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa380599(v=vs.85).aspx
14 //===---------------------------------------------------------------------===//
16 #ifndef LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_SCRIPTTOKEN_H
17 #define LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_SCRIPTTOKEN_H
19 #include "llvm/ADT/StringRef.h"
23 // A definition of a single resource script token. Each token has its kind
24 // (declared in ResourceScriptTokenList) and holds a value - a reference
25 // representation of the token.
26 // RCToken does not claim ownership on its value. A memory buffer containing
27 // the token value should be stored in a safe place and cannot be freed
32 #define TOKEN(Name) Name,
33 #define SHORT_TOKEN(Name, Ch) Name,
34 #include "ResourceScriptTokenList.h"
39 RCToken(RCToken::Kind RCTokenKind
, StringRef Value
);
41 // Get an integer value of the integer token.
42 uint32_t intValue() const;
43 bool isLongInt() const;
45 StringRef
value() const;
48 // Check if a token describes a binary operator.
49 bool isBinaryOp() const;