Permalink
Browse files

Adding support for digits on argument constants

It also fixes wrong argument constants like WIN (where WIN32 is intended).
  • Loading branch information...
1 parent 8591c10 commit fde9731e4c55e191ae32b9be2874e1167bcd3c27 @frarees frarees committed with infininight Mar 11, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 Support/arg_separators.rb
  2. +1 −1 Syntaxes/CMake Listfile.tmLanguage
View
2 Support/arg_separators.rb
@@ -9,7 +9,7 @@
cmd = cmd.strip.upcase
help = `/usr/local/bin/cmake --help-command #{cmd}`
help.scan(/[a-zA-Z_]+\((.+?)\)/m) do |example|
- example[0].scan(/[A-Z_]{2,}/) do |constant|
+ example[0].scan(/[A-Z_\d]{2,}/) do |constant|
constants << constant
end
end
View
2 Syntaxes/CMake Listfile.tmLanguage
@@ -126,7 +126,7 @@
<string>There is a script in bundle support for generating this list:
ruby arg_separators.rb | /Library/Application\ Support/TextMate/Bundles/Objective-C.tmbundle/Support/list_to_regexp.rb | pbcopy</string>
<key>match</key>
- <string>\b(R(UN(_(RESULT_VAR|OUTPUT_VARIABLE)|TIME(_DIRECTORY)?)|E(G(ULAR_EXPRESSION|EX)|MOVE(_(RECURSE|ITEM|DUPLICATES|AT))?|S(OURCE|ULT_VAR(IABLE)?)|NAME|TURN_VALUE|PLACE|VERSE|QUIRED(_VARIABLE)?|LATIVE(_PATH)?|AD(_WITH_PREFIX)?)|AN(GE|DOM))|G(R(OUP_(READ|EXECUTE)|EATER)|ET|LOB(_RECURSE|AL)?)|M(ODULE|ESSAGE|A(COSX_BUNDLE|TCH(ES|ALL)?|IN_DEPENDENCY|KE_DIRECTORY))|B(RIEF_DOCS|UNDLE|EFORE)|S(HARED|YSTEM|CRIPT|T(R(GREATER|I(NGS|P)|EQUAL|LESS)|AT(IC|US))|O(RT|URCE)|UBSTRING|E(ND_ERROR|T))|HEX|N(NNN|O(_(MODULE|SYSTEM_ENVIRONMENT_PATH|HEX_CONVERSION|CMAKE_(BUILDS_PATH|SYSTEM_PATH|PATH|ENVIRONMENT_PATH|FIND_ROOT_PATH)|DEFAULT_PATH)|T(E(QUAL)?)?)|EW(LINE_CONSUME)?|AME(S(PACE)?|_WE|LINK_(SKIP|ONLY))?)|C(XX|M(P|AKE_(CROSSCOMPILING|F(IND_ROOT_PATH_BOTH|LAGS)))?|O(M(M(ENT|AND(_NAME)?)|P(ILE_(RESULT_VAR|OUTPUT_VARIABLE|DEFINITIONS)|ONENT(S)?|ARE))|NFIG(S|UR(E(_FILE)?|ATIONS))|DE|PY(_FILE|ONLY))|VS|LEAR|ACHE(D_VARIABLE)?)|T(IMEOUT|O(_(NATIVE_PATH|CMAKE_PATH)|UPPER|LOWER)|EST(_VARIABLE)?|ARGET(S)?)|I(MP(ORTED|LICIT_DEPENDS)|S_(NEWER_THAN|DIRECTORY|ABSOLUTE)|N(SERT|HERITED|CLUDE_(INTERNALS|DIRECTORIES)|PUT_FILE))|O(R|NLY(_CMAKE_FIND_ROOT_PATH)?|UTPUT(_(STRIP_TRAILING_WHITESPACE|DIRECTORY|VARIABLE|QUIET|FILE))?|PTIONAL|FFSET|WNER_(READ|EXECUTE|WRITE)|LD)|D(BAR|IRECTORY(_PERMISSIONS)?|O(C|WNLOAD)|E(STINATION|PENDS|FINED)|FOO)|USE_SOURCE_PERMISSIONS|P(R(IVATE_HEADER|O(GRAM(S|_ARGS)?|PERT(Y|IES))|E(_(BUILD|LINK)|ORDER))|O(ST_BUILD|P|LICY)|U(BLIC_HEADER|SH)|ERMISSIONS|A(RENT_SCOPE|T(H(S|_(SUFFIXES|TO_MESA))?|TERN)))|E(RROR_(STRIP_TRAILING_WHITESPACE|VARIABLE|QUIET|FILE)|X(CLUDE(_FROM_ALL)?|T(RA_INCLUDE)?|ISTS|P(R|ORT)|ACT)|SCAPE_QUOTES|NV|QUAL)|V(ER(BATIM|SION)|A(R(IABLE)?|LUE))|QUIET|F(RAMEWORK|I(ND|LE(S(_MATCHING)?|_PERMISSIONS)?)|ORCE|U(NCTION|LL_DOCS)|ATAL_ERROR)|W(RITE|IN|ORKING_DIRECTORY)|L(I(MIT(_(COUNT|INPUT|OUTPUT))?|BRARY|NK_(INTERFACE_LIBRARIES|DIRECTORIES|LIBRARIES))|OG|E(SS|NGTH(_M(INIMUM|AXIMUM))?))|A(R(GS|CHIVE)|BSOLUTE|SCII|ND|PPEND|FTER|L(PHABET|L)))\b</string>
+ <string>\b(R(UN(_(RESULT_VAR|OUTPUT_VARIABLE)|TIME(_DIRECTORY)?)|E(G(ULAR_EXPRESSION|EX)|MOVE(_(RECURSE|ITEM|DUPLICATES|AT))?|S(OURCE|ULT_VAR(IABLE)?)|NAME|TURN_VALUE|PLACE|VERSE|QUIRED(_VARIABLE(1|2))?|LATIVE(_PATH)?|A(D(_WITH_PREFIX)?|LPATH))|AN(GE|DOM(_SEED)?))|G(R(OUP_(READ|EXECUTE)|EATER)|ET|LOB(_RECURSE|AL)?)|M(ODULE|D5|ESSAGE|A(COSX_BUNDLE|TCH(ES|ALL)?|IN_DEPENDENCY|KE_DIRECTORY))|B(RIEF_DOCS|UNDLE|EFORE)|S(H(OW_PROGRESS|A(RED|1|2(24|56)|384|512))|YSTEM|CRIPT|T(R(GREATER|I(NGS|P)|EQUAL|LESS)|AT(IC|US))|O(RT|URCE(S)?)|UBSTRING|E(ND_ERROR|T))|H(INTS|EX)|N(NNN|O(_(MODULE|S(YSTEM_ENVIRONMENT_PATH|OURCE_PERMISSIONS)|HEX_CONVERSION|CMAKE_(BUILDS_PATH|SYSTEM_PA(CKAGE_REGISTRY|TH)|PA(CKAGE_REGISTRY|TH)|ENVIRONMENT_PATH|FIND_ROOT_PATH)|DEFAULT_PATH|POLICY_SCOPE)|T(E(QUAL)?)?)|EW(LINE_(STYLE|CONSUME))?|AME(S(PACE)?|_WE|LINK_(SKIP|ONLY))?)|C(RLF|M(P(0017)?|AKE_(MODULE_PATH|CROSSCOMPILING|DISABLE_FIND_PACKAGE_|F(IND_ROOT_PATH_BOTH|LAGS)))?|O(M(M(ENT|AND(_NAME)?)|P(ILE_(RESULT_VAR|OUTPUT_VARIABLE|DEFINITIONS)|ONENT(S)?|ARE))|NFIG(S|UR(E(_FILE)?|ATION(S)?))|DE|PY(_FILE|ONLY)?)|VS|LEAR|ACHE(D_VARIABLE)?)|_(COMMAND|VERSION(_(M(INOR|AJOR)|COUNT|TWEAK|PATCH))?)|T(RUE|IMEOUT|O(_(NATIVE_PATH|CMAKE_PATH)|UPPER|LOWER)|EST(_VARIABLE)?|ARGET(S|_FILE)?)|I(MP(ORTED|LICIT_DEPENDS)|S_(SYMLINK|NEWER_THAN|DIRECTORY|ABSOLUTE)|N(S(TALL|ERT)|HERITED|CLUDE_(INTERNALS|DIRECTORIES)|PUT_FILE|ACTIVITY_TIMEOUT)?|TEMS|DE)|O(R|NLY(_CMAKE_FIND_ROOT_PATH)?|UTPUT(_(STRIP_TRAILING_WHITESPACE|DIRECTORY|VARIABLE|QUIET|FILE))?|PTIONAL|FF(SET)?|WNER_(READ|EXECUTE|WRITE)|LD)|D(BAR|IRECTORY(_PERMISSIONS)?|O(S|C|WNLOAD)|E(STINATION|PENDS|FIN(ITION|ED))|FOO)|U(SE_SOURCE_PERMISSIONS|N(IX|KNOWN)|PLOAD)|P(R(IVATE_HEADER|O(GRAM(S|_ARGS)?|JECT_NAME|PERT(Y|IES))|E(_(BUILD|LINK)|ORDER))|O(ST_BUILD|P|LICY)|U(BLIC_HEADER|SH)|ERMISSIONS|A(RENT_SCOPE|CKAGE(_(VERSION(_(COMPATIBLE|UNSUITABLE|EXACT))?|FIND_(NAME|VERSION(_(M(INOR|AJOR)|COUNT|TWEAK|PATCH))?)))?|T(H(S|_(SUFFIXES|TO_MESA))?|TERN)))|E(RROR_(STRIP_TRAILING_WHITESPACE|VARIABLE|QUIET|FILE)|X(CLUDE(_FROM_ALL)?|T(RA_INCLUDE)?|ISTS|P(R|ORT|ECTED_MD5)|ACT)|SCAPE_QUOTES|NV|QUAL)|V(S|ER(BATIM|SION(_(GREATER|EQUAL|LESS))?)|A(R(2|IABLE)?|LUE))|QUIET|F(RAMEWORK|I(ND|LE(S(_MATCHING)?|_PERMISSIONS)?)|O(RCE|LLOW_SYMLINKS)|U(NCTION|LL_DOCS)|ATAL_ERROR)|W(RITE|IN(32|DOWS)|ORKING_DIRECTORY|ARNING)|L(I(MIT(_(COUNT|INPUT|OUTPUT))?|BRARY|STS|NK_(INTERFACE_LIBRARIES|DIRECTORIES|P(RIVATE|UBLIC)|LIBRARIES))|OG|D_LIBRARY_PATH|E(SS|NGTH(_M(INIMUM|AXIMUM))?)|F)|A(R(G(S|_VAR)|CHIVE)|BSOLUTE|SCII|ND|UTHOR_WARNING|PPEND(_STRING)?|FTER|L(PHABET|L)))\b</string>
<key>name</key>
<string>keyword.other.argument-separator.cmake</string>
</dict>

0 comments on commit fde9731

Please sign in to comment.