1 //===-- ResourceScriptToken.h -----------------------------------*- C++-*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===---------------------------------------------------------------------===//
10 // This declares the .rc script tokens.
11 // The list of available tokens is located at ResourceScriptTokenList.h.
13 // Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa380599(v=vs.85).aspx
15 //===---------------------------------------------------------------------===//
17 #ifndef LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_SCRIPTTOKEN_H
18 #define LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_SCRIPTTOKEN_H
20 #include "llvm/ADT/StringRef.h"
24 // A definition of a single resource script token. Each token has its kind
25 // (declared in ResourceScriptTokenList) and holds a value - a reference
26 // representation of the token.
27 // RCToken does not claim ownership on its value. A memory buffer containing
28 // the token value should be stored in a safe place and cannot be freed
33 #define TOKEN(Name) Name,
34 #define SHORT_TOKEN(Name, Ch) Name,
35 #include "ResourceScriptTokenList.h"
40 RCToken(RCToken::Kind RCTokenKind, StringRef Value);
42 // Get an integer value of the integer token.
43 uint32_t intValue() const;
44 bool isLongInt() const;
46 StringRef value() const;
49 // Check if a token describes a binary operator.
50 bool isBinaryOp() const;