llvm.org GIT mirror llvm / ab499d8
[llvm-rc] Allow optional commas between the string table index and value This form is even used in one of the examples at https://msdn.microsoft.com/en-us/library/windows/desktop/aa381050(v=vs.85).aspx. Differential Revision: https://reviews.llvm.org/D46508 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331669 91177308-0d34-0410-b5e6-96231b3b80d8 Martin Storsjo 1 year, 6 months ago
2 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
33 0 "a"
44 }
55
6 // Commas are optional, so we make sure to test both cases.
67 STRINGTABLE {
7 1 "b"
8 16 "bb"
8 1, "b"
9 16, "bb"
910 }
1011
1112 STRINGTABLE
572572 // Some examples in documentation suggest that there might be a comma in
573573 // between, however we strictly adhere to the single statement definition.
574574 ASSIGN_OR_RETURN(IDResult, readInt());
575 consumeOptionalType(Kind::Comma);
575576 ASSIGN_OR_RETURN(StrResult, readString());
576577 Table->addString(*IDResult, *StrResult);
577578 }