summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceScriptToken.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-rc] Don't strictly require quotes around external file namesMartin Storsjo2018-05-081-2/+3
| | | | | | | | | | | | Regardless of what docs may say, existing resource files in the wild can use this syntax. Rename a file used in an existing test, to make it usable for unquoted paths. Differential Revision: https://reviews.llvm.org/D46511 llvm-svn: 331747
* llvm-rc/ResourceScriptTokenList.h: Turns this into a .def file to imply that ↵David Blaikie2017-11-211-6/+2
| | | | | | | | it's non-modular Also undef the macros at the end of the file to make it easier to use. llvm-svn: 318714
* [llvm-rc] Have the tokenizer discard single & block comments.Zachary Turner2017-10-091-0/+53
| | | | | | | | | | This allows rc files to have comments. Eventually we should just use clang's c preprocessor, but that's a bit larger effort for minimal gain, and this is straightforward. Differential Revision: https://reviews.llvm.org/D38651 llvm-svn: 315207
* [llvm-rc] Implement escape sequences in .rc files.Zachary Turner2017-10-061-1/+4
| | | | | | | | | | | | | | | | | | | | | This allows the escape sequences (\a, \n, \r, \t, \\, \x[0-9a-f]*, \[0-7]*, "") to appear in .rc scripts. These are parsed and output in the same way as it's done in original MS implementation. The way these sequences are processed depends on the type of the resource it resides in, and on whether the user declared the string to be "wide" or "narrow". I tried to maintain the maximum compatibility with the original tool (and fail in some erroneous situations that are accepted by .rc). However, there are some (extremely rare) cases where Microsoft tool outputs nonsense. I found it infeasible to detect such casses. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D38426 llvm-svn: 315118
* [llvm-rc] Serialize VERSIONINFO resources to .res files.Zachary Turner2017-10-061-0/+4
| | | | | | | | | | | This is now able to dump VERSIONINFO resources. Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx Differential Revision: https://reviews.llvm.org/D38410 Patch by: Marek Sokolowski llvm-svn: 315110
* [llvm-rc] Add integer expressions parsing ability. [7/8]Marek Sokolowski2017-09-281-0/+12
| | | | | | | | | | | | | | This allows the ints to be written as integer expressions evaluating to unsigned 16-bit/32-bit integers. All the expressions may use the following operators: + - & | ~, and parentheses. Minus token - can be also unary. There is no precedence of the operators other than the unary operators binding stronger than their binary counterparts. Differential Revision: https://reviews.llvm.org/D37022 llvm-svn: 314477
* Fixing incorrectly capitalised regexps.Benjamin Kramer2017-09-071-1/+1
| | | | | | Patch by Sam Allen! llvm-svn: 312709
* Fix 'not all control paths return' warning on windows builds. NFCI.Simon Pilgrim2017-08-101-3/+1
| | | | llvm-svn: 310631
* Fixup for r310621: Hint the compilers about unreachable code.Marek Sokolowski2017-08-101-0/+4
| | | | llvm-svn: 310623
* Add .rc scripts tokenizer.Marek Sokolowski2017-08-101-0/+296
This extends the shell of llvm-rc tool with the ability of tokenization of the input files. Currently, ASCII and ASCII-compatible UTF-8 files are supported. Thanks to Nico Weber (thakis) for his original work in this area. Differential Revision: https://reviews.llvm.org/D35957 llvm-svn: 310621
OpenPOWER on IntegriCloud