This is an archive of the discontinued LLVM Phabricator instance.

[llvm-rc] Add integer expressions parsing ability. [7/8]
ClosedPublic

Authored by mnbvmar on Aug 22 2017, 1:54 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

ecbeckmann edited edge metadata.Aug 22 2017, 2:38 PM

This looks fine to me.

mnbvmar updated this revision to Diff 112449.Aug 23 2017, 2:23 PM
mnbvmar retitled this revision from [llvm-rc] Add integer expressions parsing ability. to [llvm-rc] Add integer expressions parsing ability. [7/8].

[Testing] Change temporary files into pipes.

rnk accepted this revision.Sep 21 2017, 3:28 PM

lgtm

This revision is now accepted and ready to land.Sep 21 2017, 3:28 PM
rnk added inline comments.Sep 21 2017, 3:28 PM
llvm/tools/llvm-rc/ResourceScriptParser.cpp
121

These comments are great, thanks!

This revision was automatically updated to reflect the committed changes.